Hack Forums
[.NET] Pron Download modules - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] Pron Download modules (/showthread.php?tid=4665377)



Pron Download modules - KingDeath360 - Feb 1, 2015

Don't ask for screenshots!
------Made by me------
Do i really need to write a paragraph on what this does?
Parses the download link from the page source code.
allowing you to paste it into a browser and download the video
VPORN
Code
Public Sub download_vporn(ByVal url As String)
      Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(url) : request.Proxy = Nothing
      Dim response As System.Net.HttpWebResponse = request.GetResponse()
      Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream())
      Dim ddf As String = DirectCast(DirectCast((New System.Text.RegularExpressions.Regex("<script type=""text/javascript"">(.*?)</script>", System.Text.RegularExpressions.RegexOptions.IgnoreCase Or System.Text.RegularExpressions.RegexOptions.Singleline)).Matches(sr.ReadToEnd()), System.Text.RegularExpressions.MatchCollection)(2).Groups(1).Value, String)
      TextBox2.Text = ddf

      End Sub
Xvideos
Code
Public Sub download_Xvideos(ByVal url As String) 'working as of 20/05/2014... downloads website text, finds the 'flashvars' parses it to get direct download link
      Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(url) : request.Proxy = Nothing
      Downloader(System.Web.HttpUtility.UrlDecode(DirectCast((New System.Text.RegularExpressions.Regex("flv_url=(.*?)&amp;", System.Text.RegularExpressions.RegexOptions.IgnoreCase)).Matches(DirectCast((New System.Text.RegularExpressions.Regex("<embed type=""application/x-shockwave-flash"" id=""flash-player-embed"" wmode=""transparent"" src=""http://static.xvideos.com/swf/xv-player.swf"" quality=""high"" allowfullscreen=""true"" allowscriptaccess=""always"" flashvars=""(.*?)"" width=""588"" height=""476"">", System.Text.RegularExpressions.RegexOptions.IgnoreCase)).Matches((New System.IO.StreamReader(DirectCast(request.GetResponse(), System.Net.HttpWebResponse).GetResponseStream())).ReadToEnd()), System.Text.RegularExpressions.MatchCollection)(0).Groups(1).Value.Trim()), System.Text.RegularExpressions.MatchCollection)(0).Groups(1).Value.Trim()), url)
    End Sub
playvid
Code
Public Sub download_Playvid(ByVal url As String) 'working as of 20/05/2014... downloads website text, finds the 'flashvars' parses it to get direct download link
      Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(url) : request.Proxy = Nothing
      Downloader("http" & System.Web.HttpUtility.UrlDecode(DirectCast((New System.Text.RegularExpressions.Regex("http(.*?)mp4", System.Text.RegularExpressions.RegexOptions.IgnoreCase)).Matches(DirectCast((New System.Text.RegularExpressions.Regex("<embed type=""application/x-shockwave-flash"" src=""(.*?)"" id=""video_player"" flashvars=""(.*?)"" style=""width: 100%; height: 100%;"" allowscriptaccess=""always"" allowfullscreen=""true"" wmode=""opaque"" />", System.Text.RegularExpressions.RegexOptions.IgnoreCase)).Matches((DirectCast((New System.IO.StreamReader(DirectCast(request.GetResponse(), System.Net.HttpWebResponse).GetResponseStream())), System.IO.StreamReader).ReadToEnd())), System.Text.RegularExpressions.MatchCollection)(0).Groups(2).Value.Trim()), System.Text.RegularExpressions.MatchCollection)(0).Groups(1).Value.Trim()) & "mp4", url)
    End Sub

Usage:
Code
download_vporn("url of video")



* - Ninja - Feb 1, 2015

Why cant people just save the video from the browser instead of getting a URL from the browser, opening the program, pasting the URL, etc. Also, who downloads porn these days, except pedophiles and people with weird and illegal fetishes like necrophilia.


* - Only3 - Feb 1, 2015

isnt it what his code doing getting the url from the browser


* - Ninja - Feb 1, 2015

(Feb 1, 2015 10:49 AM)Only3 Wrote:  isnt it what his code doing getting the url from the browser

From what I could understand you give a video URL and it extracts the MP4 video file from it and downloads it.


* - iSynthesis - Feb 1, 2015

(Feb 1, 2015 10:42 AM)Tyranitar Wrote:  Why cant people just save the video from the browser instead of getting a URL from the browser, opening the program, pasting the URL, etc. Also, who downloads porn these days, except pedophiles and people with weird and illegal fetishes like necrophilia.

Well can't say i disagree, but what you can do, is to add a simple clipboard monitor which copies the original URL, and sets the clipboard to the direct .MP4 link,
Other than that, this is pretty useless, thought it might help people understanding basic regex.


* - SIM-1456245 - Feb 1, 2015

(Feb 1, 2015 11:51 AM)iSynthesis Wrote:  Well can't say i disagree, but what you can do, is to add a simple clipboard monitor which copies the original URL, and sets the clipboard to the direct .MP4 link,
Other than that, this is pretty useless, thought it might help people understanding basic regex.

Lol, there are better sites to understand regex than these ones xD


* - mauz - Mar 11, 2015

how to create the program using these sources, and this code how can I start the project?


* - xVipX - Mar 13, 2015

very good so you have use Regex
thanx for shear this
[img]Regex[/img]