Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;~================================================================
- ;
- ; User Defined Functions For https://temp-mail.org
- ;
- ; By TrunghieuTH10 - trunghieuth10@gmail.com
- ;
- ; _TempMail_Creater: Truy vấn trang web và trả về email
- ; _TempMail_Changer: Đổi email theo email định sẵn, trả về mã nguồn trang web
- ; _TempMail_viewer: làm mới trang web và trả về mã nguồn trang web
- ; _FacebookGetCode: Tách và trả về mã đăng kí tài khoản facebook (mã là số) từ nguồn trang web
- ;
- ;~================================================================
- AutoItSetOption("TrayAutoPause", 0)
- AutoItSetOption('TrayMenuMode', 1)
- AutoItSetOption('MustDeclareVars', 1)
- AutoItSetOption("TrayOnEventMode", 1)
- Global $oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
- ;~ Example
- ;~ Global $temp_mail = _TempMail_Creater($oHTTP) ;~ Truy vấn và trả về emmail
- ;~ ConsoleWrite($temp_mail & @CRLF)
- Global $set_mail = _TempMail_Changer($oHTTP, "Fafux@cocovpn.com")
- Global $readmail = _TempMail_viewer($oHTTP)
- Global $code = _FacebookGetCode($readmail)
- MsgBox('','',"Mã của bạn là: " & $code)
- Func _FacebookGetCode($oSource)
- $oSource = StringRegExp($oSource, '<h4 class="pm-subject">(\d+)\s', 3)
- If @error Then Return SetError(-1, 0, False)
- Return $oSource[0]
- EndFunc
- Func _TempMail_Creater($oHTTP)
- Local $sEmail = _Winhttp_Request_obj($oHTTP, "https://temp-mail.org/en/", 'class="mail opentip" value="(.*?)"')
- If @error Then SetError(-1, 0, 0)
- Return $sEmail
- EndFunc
- Func _TempMail_Changer($oHTTP, $sMail)
- Local $sUrLServer = "https://temp-mail.org/en/option/change/"
- Local $csrf = _Winhttp_Request_obj($oHTTP, $sUrLServer, '"csrf" value="(.*?)"')
- If @error Then SetError(-1, 0, 0)
- Local $oReceived = _Winhttp_Request_obj($oHTTP, $sUrLServer, "0", "POST", "csrf=" & $csrf & "&mail=" & StringReplace($sMail, "@", "&domain=@"))
- If @error Then SetError(-1, 0, 0)
- ConsoleWrite(StringRegExp($oReceived, 'class="mail opentip" value="(.*?)"', 3)[0] & @CRLF)
- Return $oReceived
- EndFunc
- Func _TempMail_viewer($oHTTP)
- Local $sUrLServer = "https://temp-mail.org/en/"
- Local $_Refresh_link = _Winhttp_Request_obj($oHTTP, $sUrLServer & "option/refresh/", $sUrLServer & 'view(.*?)"')
- If @error Then Return "Email is empty!"
- Local $oReceived = _Winhttp_Request_obj($oHTTP, $sUrLServer & "view" & $_Refresh_link)
- If @error Then SetError(-1, 0, 0)
- ConsoleWrite(StringRegExp($oReceived, 'class="mail opentip" value="(.*?)"', 3)[0] & @CRLF)
- Return $oReceived
- EndFunc
- Func _Winhttp_Request_obj($oHTTP, $_iServer, $regEx = "0", $oAction = "GET", $oData = "")
- 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'
- If BitOR($oHTTP = 1, $oHTTP = Default, $oHTTP = "HTTP") Then $oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
- $oHTTP.Open($oAction, $_iServer, False)
- $oHTTP.SetRequestHeader('User-Agent', $User_Agent)
- 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"
- $oHTTP.SetRequestHeader('Referer', $_iServer)
- If Not @error Then $oHTTP.Send($oData)
- If Not @error Then $oHTTP.WaitForResponse
- Local $oReceived = $oHTTP.ResponseText
- Local $oStatusCode = $oHTTP.Status
- ;~ If $oStatusCode <> 200 Then ConsoleWrite("Response code: " & $oStatusCode & @CRLF)
- If $regEx <> "0" Then
- $oReceived = StringRegExp($oReceived, $regEx, 3)
- If @error Then Return SetError(-1, 0, 0)
- ;~ ConsoleWrite($oReceived[0] & @CRLF)
- Return $oReceived[0]
- EndIf
- Return $oReceived
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement