Advertisement
TrunghieuTH10

_temp_mail.org

Aug 14th, 2017
1,133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 3.65 KB | None | 0 0
  1.  
  2. ;~================================================================
  3. ;
  4. ;   User Defined Functions For https://temp-mail.org
  5. ;
  6. ;       By TrunghieuTH10 - trunghieuth10@gmail.com
  7. ;
  8. ;           _TempMail_Creater: Truy vấn trang web và trả về email
  9. ;           _TempMail_Changer: Đổi email theo email định sẵn, trả về mã nguồn trang web
  10. ;           _TempMail_viewer: làm mới trang web và trả về mã nguồn trang web
  11. ;           _FacebookGetCode: Tách và trả về mã đăng kí tài khoản facebook (mã là số) từ nguồn trang web
  12. ;
  13. ;~================================================================
  14. AutoItSetOption("TrayAutoPause", 0)
  15. AutoItSetOption('TrayMenuMode', 1)
  16. AutoItSetOption('MustDeclareVars', 1)
  17. AutoItSetOption("TrayOnEventMode", 1)
  18.  
  19. Global $oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
  20.  
  21. ;~ Example
  22.  
  23. ;~ Global $temp_mail = _TempMail_Creater($oHTTP) ;~ Truy vấn và trả về emmail
  24. ;~ ConsoleWrite($temp_mail & @CRLF)
  25.  
  26. Global $set_mail = _TempMail_Changer($oHTTP, "Fafux@cocovpn.com")
  27. Global $readmail = _TempMail_viewer($oHTTP)
  28. Global $code = _FacebookGetCode($readmail)
  29. MsgBox('','',"Mã của bạn là: " & $code)
  30.  
  31.  
  32. Func _FacebookGetCode($oSource)
  33.     $oSource = StringRegExp($oSource, '<h4 class="pm-subject">(\d+)\s', 3)
  34.     If @error Then Return SetError(-1, 0, False)
  35.     Return $oSource[0]
  36. EndFunc
  37.  
  38. Func _TempMail_Creater($oHTTP)
  39.     Local $sEmail = _Winhttp_Request_obj($oHTTP, "https://temp-mail.org/en/", 'class="mail opentip" value="(.*?)"')
  40.     If @error Then SetError(-1, 0, 0)
  41.     Return $sEmail
  42. EndFunc
  43.  
  44. Func _TempMail_Changer($oHTTP, $sMail)
  45.     Local $sUrLServer = "https://temp-mail.org/en/option/change/"
  46.     Local $csrf = _Winhttp_Request_obj($oHTTP, $sUrLServer, '"csrf" value="(.*?)"')
  47.     If @error Then SetError(-1, 0, 0)
  48.     Local $oReceived = _Winhttp_Request_obj($oHTTP, $sUrLServer, "0", "POST", "csrf=" & $csrf & "&mail=" & StringReplace($sMail, "@", "&domain=@"))
  49.     If @error Then SetError(-1, 0, 0)
  50.     ConsoleWrite(StringRegExp($oReceived, 'class="mail opentip" value="(.*?)"', 3)[0] & @CRLF)
  51.     Return $oReceived
  52. EndFunc
  53.  
  54. Func _TempMail_viewer($oHTTP)
  55.     Local $sUrLServer = "https://temp-mail.org/en/"
  56.     Local $_Refresh_link = _Winhttp_Request_obj($oHTTP, $sUrLServer & "option/refresh/", $sUrLServer & 'view(.*?)"')
  57.     If @error Then Return "Email is empty!"
  58.     Local $oReceived = _Winhttp_Request_obj($oHTTP, $sUrLServer & "view" & $_Refresh_link)
  59.     If @error Then SetError(-1, 0, 0)
  60.     ConsoleWrite(StringRegExp($oReceived, 'class="mail opentip" value="(.*?)"', 3)[0] & @CRLF)
  61.     Return $oReceived
  62. EndFunc
  63.  
  64. Func _Winhttp_Request_obj($oHTTP, $_iServer, $regEx = "0", $oAction = "GET", $oData = "")
  65.     Local $User_Agent='Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36'
  66.     If BitOR($oHTTP = 1, $oHTTP = Default, $oHTTP = "HTTP") Then $oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
  67.     $oHTTP.Open($oAction, $_iServer, False)
  68.     $oHTTP.SetRequestHeader('User-Agent', $User_Agent)
  69.     If Not @error Then $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded");~ Content-Type: "application/x-www-form-urlencoded,"application/json", "multipart/form-data", "website"
  70.     $oHTTP.SetRequestHeader('Referer', $_iServer)
  71.     If Not @error Then $oHTTP.Send($oData)
  72.     If Not @error Then $oHTTP.WaitForResponse
  73.     Local $oReceived = $oHTTP.ResponseText
  74.     Local $oStatusCode = $oHTTP.Status
  75. ;~  If $oStatusCode <> 200 Then ConsoleWrite("Response code: " & $oStatusCode & @CRLF)
  76.     If $regEx <> "0" Then
  77.         $oReceived = StringRegExp($oReceived, $regEx, 3)
  78.         If @error Then Return SetError(-1, 0, 0)
  79. ;~      ConsoleWrite($oReceived[0] & @CRLF)
  80.         Return $oReceived[0]
  81.     EndIf
  82.     Return $oReceived
  83. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement