a7m3dalbalawi

Untitled

Aug 24th, 2017
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 3.56 KB | None | 0 0
  1.     Dim c As New CookieContainer
  2.     Function registry_email(c As CookieContainer) As String
  3.         Try
  4.             Dim request As HttpWebRequest = HttpWebRequest.Create("https://10minutemail.net/")
  5.             request.CookieContainer = c
  6.             request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0"
  7.             request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
  8.             request.Headers.Add("Accept-Language: en-US,en;q=0.5")
  9.             Dim rs As String = New StreamReader(request.GetResponse().GetResponseStream()).ReadToEnd()
  10.             Return Regex.Match(rs, "<input type=""text"" id=""fe_text"" class=""mailtext"" value=""(.*?)""/>").Groups.Item(1).Value
  11.         Catch : Return "Error" : End Try
  12.     End Function
  13.     Function get_message(c As CookieContainer) As String
  14.         Try
  15.             Dim request As HttpWebRequest = HttpWebRequest.Create("https://10minutemail.net/")
  16.             request.CookieContainer = c
  17.             request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0"
  18.             request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
  19.             request.Headers.Add("Accept-Language: en-US,en;q=0.5")
  20.             Dim rs As String = New StreamReader(request.GetResponse().GetResponseStream()).ReadToEnd()
  21.             Dim result As New StringBuilder()
  22.             For Each x As Match In Regex.Matches(rs, "<table id=""maillist"">(.*?)</table>")
  23.                 For Each xx As Match In Regex.Matches(x.Groups.Item(1).Value, "onclick=""location='(.*?)'""")
  24.                     Select Case xx.Groups.Item(1).Value = "readmail.html?mid=welcome"
  25.                         Case False
  26.                             result.AppendLine(xx.Groups.Item(1).Value)
  27.                     End Select
  28.                 Next
  29.             Next
  30.             Return result.ToString
  31.         Catch : Return "Error" : End Try
  32.     End Function
  33.     Function get_message_content(url As String, c As CookieContainer) As String
  34.         Try
  35.             Dim request As HttpWebRequest = HttpWebRequest.Create("https://10minutemail.net/" & url)
  36.             request.CookieContainer = c
  37.             request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0"
  38.             request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
  39.             request.Headers.Add("Accept-Language: en-US,en;q=0.5")
  40.             Dim rs As String = New StreamReader(request.GetResponse().GetResponseStream()).ReadToEnd()
  41.             Return rs
  42.         Catch : Return "Error" : End Try
  43.     End Function
  44.     Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  45.         Dim email As String = registry_email(c)
  46.         Label5.Text = email
  47.     End Sub
  48.     Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
  49.         Dim messagurl() As String = Split(get_message(c), vbNewLine)
  50.         For i As Integer = 0 To messagurl.Length - 1
  51.             Select Case messagurl(i).Trim() = Nothing
  52.                 Case False
  53.                     Dim result As String = get_message_content(messagurl(i), c)
  54.                     Dim mailhtml As String = Regex.Match(result, "<div class=""mailinhtml"">(.*?)</div><div ").Groups.Item(1).Value
  55.                     Dim mailfrom As String = Regex.Match(result, "<span class=""mail_from"">(.*?)</span>").Groups.Item(1).Value
  56.                     MsgBox(mailfrom & vbNewLine & vbNewLine & mailhtml)
  57.             End Select
  58.         Next
  59.     End Sub
Advertisement
Add Comment
Please, Sign In to add comment