diff --git a/burp/close.png b/burp/close.png new file mode 100644 index 0000000..5bf0fd5 Binary files /dev/null and b/burp/close.png differ diff --git a/src/api.rs b/src/api.rs index 9b7f48c..4cc7b46 100644 --- a/src/api.rs +++ b/src/api.rs @@ -5,7 +5,6 @@ use ntex::web::HttpRequest; use crate::providers::perverzija::PerverzijaProvider; use crate::{providers::*, status::*, videos::*}; -// this function could be located in a different module pub fn config(cfg: &mut web::ServiceConfig) { cfg.service( web::resource("/status") @@ -165,17 +164,6 @@ async fn status(req: HttpRequest) -> Result { async fn videos_post( video_request: web::types::Json, ) -> Result { - // let mut format = Video_Format::new( - // "https://pervl2.xtremestream.xyz/player/xs1.php?data=794a51bb65913debd98f73111705738a" - // .to_string(), - // "1080p".to_string(), - // "m3u8".to_string(), - // ); - // format.add_http_header( - // "Referer".to_string(), - // "https://pervl2.xtremestream.xyz" - // .to_string(), - // ); let mut videos = Videos { pageInfo: PageInfo { hasNextPage: true, @@ -213,102 +201,5 @@ async fn videos_post( .get_videos(channel, sort, query, page.to_string(), perPage.to_string(), featured) .await; videos.items = video_items.clone(); - - /// #### MOCK RESPONSE - /// - // let mut format = Video_Format::new( - // "https://pervl2.xtremestream.xyz/player/xs1.php?data=794a51bb65913debd98f73111705738a" - // .to_string(), - // "1080p".to_string(), - // "m3u8".to_string(), - // ); - // format.add_http_header( - // "Referer".to_string(), - // "https://pervl2.xtremestream.xyz" - // .to_string(), - // ); - // let videos = Videos { - // pageInfo: PageInfo { - // hasNextPage: true, - // resultsPerPage: 10, - // }, - // items: vec![ - // Video_Item{ - // duration: 110, // 110, - // views: Some(14622653), // 14622653, - // rating: Some(0.0), // 0.0, - // id: "794a51bb65913debd98f73111705738a".to_string(), // "c85017ca87477168d648727753c4ded8a35f173e22ef93743e707b296becb299", - // title: "BrazzersExxtra – Give Me A D! The Best Of Cheerleaders".to_string(), // "20 Minutes of Adorable Kittens BEST Compilation", - // // url: "https://tube.perverzija.com/brazzersexxtra-give-me-a-d-the-best-of-cheerleaders/".to_string(), - // // url : "https://pervl2.xtremestream.xyz/player/xs1.php?data=794a51bb65913debd98f73111705738a".to_string(), // "https://www.youtube.com/watch?v=y0sF5xhGreA", - // url : "https://pervl2.xtremestream.xyz/player/index.php?data=794a51bb65913debd98f73111705738a".to_string(), - // channel: "perverzija".to_string(), // "youtube", - // thumb: "https://tube.perverzija.com/wp-content/uploads/2025/05/BrazzersExxtra-Give-Me-A-D-The-Best-Of-Cheerleaders.jpg".to_string(), // "https://i.ytimg.com/vi/y0sF5xhGreA/hqdefault.jpg", - // uploader: Some("Brazzers".to_string()), // "The Pet Collective", - // uploaderUrl: Some("https://brazzers.com".to_string()), // "https://www.youtube.com/@petcollective", - // verified: Some(false), // false, - // tags: Some(vec![]), // [], - // uploadedAt: Some(1741142954), // 1741142954 - // formats: Some(vec![format]), // Additional HTTP headers if needed - // embed: None, - - // } - // ], - // }; - - // println!("Video: {:?}", videos); - // #### - - Ok(web::HttpResponse::Ok().json(&videos)) -} - -// async fn videos_get(_req: HttpRequest) -> Result { -// let mut http_headers: HashMap = HashMap::new(); -// // http_headers.insert( -// // "Referer".to_string(), -// // "https://pervl2.xtremestream.xyz/player/index.php?data=794a51bb65913debd98f73111705738a" -// // .to_string(), -// // ); -// let mut format = Video_Format::new( -// "https://pervl2.xtremestream.xyz/player/xs1.php?data=794a51bb65913debd98f73111705738a" -// .to_string(), -// "1080p".to_string(), -// "m3u8".to_string(), -// ); -// format.add_http_header( -// "Referer".to_string(), -// "https://pervl2.xtremestream.xyz/player/index.php?data=794a51bb65913debd98f73111705738a" -// .to_string(), -// ); -// let videos = Videos { -// pageInfo: PageInfo { -// hasNextPage: true, -// resultsPerPage: 10, -// }, -// items: vec![ -// Video_Item{ -// duration: 110, // 110, -// views: Some(14622653), // 14622653, -// rating: Some(0.0), // 0.0, -// id: "794a51bb65913debd98f73111705738a".to_string(), // "c85017ca87477168d648727753c4ded8a35f173e22ef93743e707b296becb299", -// title: "BrazzersExxtra – Give Me A D! The Best Of Cheerleaders".to_string(), // "20 Minutes of Adorable Kittens BEST Compilation", -// // url: "https://tube.perverzija.com/brazzersexxtra-give-me-a-d-the-best-of-cheerleaders/".to_string(), -// // url : "https://pervl2.xtremestream.xyz/player/xs1.php?data=794a51bb65913debd98f73111705738a".to_string(), // "https://www.youtube.com/watch?v=y0sF5xhGreA", -// url : "https://pervl2.xtremestream.xyz/player/index.php?data=794a51bb65913debd98f73111705738a".to_string(), -// channel: "perverzija".to_string(), // "youtube", -// thumb: "https://tube.perverzija.com/wp-content/uploads/2025/05/BrazzersExxtra-Give-Me-A-D-The-Best-Of-Cheerleaders.jpg".to_string(), // "https://i.ytimg.com/vi/y0sF5xhGreA/hqdefault.jpg", -// uploader: Some("Brazzers".to_string()), // "The Pet Collective", -// uploaderUrl: Some("https://brazzers.com".to_string()), // "https://www.youtube.com/@petcollective", -// verified: Some(false), // false, -// tags: Some(vec![]), // [], -// uploadedAt: Some(1741142954), // 1741142954 -// formats: Some(vec![format]), // Additional HTTP headers if needed - -// } -// ], -// }; - -// println!("Video: {:?}", videos); -// Ok(web::HttpResponse::Ok().json(&videos)) -// } +} \ No newline at end of file diff --git a/src/providers/perverzija.rs b/src/providers/perverzija.rs index 5f6d1b1..f0cc8ad 100644 --- a/src/providers/perverzija.rs +++ b/src/providers/perverzija.rs @@ -47,11 +47,13 @@ impl PerverzijaProvider { let client = match env::var("BURP_URL").as_deref() { - Ok(burp_url) => reqwest::Client::builder() + Ok(burp_url) => { + println!("Using Burp Proxy: {}", burp_url); + reqwest::Client::builder() .user_agent("Mozilla/5.0 (iPhone; CPU iPhone OS 14_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/33.0 Mobile/15E148 Safari/605.1.15") .proxy(Proxy::https(burp_url).unwrap()) .danger_accept_invalid_certs(true) - .build()?, + .build()?}, Err(_) => reqwest::Client::builder() .user_agent("Mozilla/5.0 (iPhone; CPU iPhone OS 14_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/33.0 Mobile/15E148 Safari/605.1.15") .danger_accept_invalid_certs(true) @@ -158,16 +160,11 @@ impl PerverzijaProvider { println!("Skipping video segment with unexpected length: {}", vid.len()); continue; } - // for line in vid.clone() { - // println!("{}: {}\n\n", index, line); - // index += 1; - // } let mut title = vid[1].split(">").collect::>()[1] .split("<") .collect::>()[0] .to_string(); - println!("Title: {}", title); // html decode title = decode(title.as_bytes()).to_string().unwrap_or(title); let url = vid[1].split("iframe src="").collect::>()[1] @@ -210,9 +207,6 @@ impl PerverzijaProvider { .split("'") .collect::>()[0] .to_string(); - - // println!("Embed HTML: {}\n\n", embed_html); - // println!("Url: {}\n\n", url.clone()); let embed = Video_Embed::new(embed_html, url.clone()); let mut video_item = Video_Item::new( id, @@ -244,23 +238,15 @@ impl PerverzijaProvider { .split("video-item post") .collect::>()[1..] .to_vec(); - // println!("Raw Videos: {:?}", raw_videos); for video_segment in &raw_videos { let vid = video_segment.split("\n").collect::>(); if vid.len() > 20 { continue; } - // let mut index = 0; - // for line in vid.clone() { - // println!("{}: {}\n\n", index, line); - // index += 1; - // } - let mut title = vid[3].split("title='").collect::>()[1] .split("'") .collect::>()[0] .to_string(); - // html decode title = decode(title.as_bytes()).to_string().unwrap_or(title); let url = vid[4].split("iframe src="").collect::>()[1] .split(""") @@ -309,9 +295,6 @@ impl PerverzijaProvider { .split("'") .collect::>()[0] .to_string(); - - // println!("Embed HTML: {}\n\n", embed_html); - // println!("Url: {}\n\n", url.clone()); let embed = Video_Embed::new(embed_html, url.clone()); let mut video_item = Video_Item::new( id, diff --git a/supervisord/supervisord.conf b/supervisord/supervisord.conf index a36fa92..17c0ca8 100644 --- a/supervisord/supervisord.conf +++ b/supervisord/supervisord.conf @@ -13,8 +13,6 @@ directory=/app command=/dockerstartup/vnc_startup.sh --wait autostart=true autorestart=true -stdout_logfile=/dev/stdout -stderr_logfile=/dev/stderr [program:burpsuite] command=bash /app/supervisord/burpsuite.sh