Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Auth_in_API_3(no_show_Auth_in_API_3="")
- {
- global
- Static otvet,post,url,hash,reconn_data,location
- if(no_show_Auth_in_API_3="")
- {
- TrayTip("Auth in API","Please wait")
- }
- url:="http://oauth.vk.com/authorize?client_id=2274003&response_type=token&redirect_uri=http://api.vk.com/blank.html&_hash=0"
- http_%os%(otvet:="",url)
- ip_h:=RegexReplace(otvet, ".*ip_h' value='(.*?)'.*", "$1")
- to:=RegexReplace(otvet, ".*to' value='(.*?)'.*", "$1")
- // ну а если произошла какая либо ошибка (не спарсился или не нашелся например ip_h
- // мы все равно шлем дальше запросы. мы же в танке.
- url:="https://login.vk.com/?act=login&soft=1"
- post:="q=1&ip_h=" ip_h "&from_host=api.vk.com&to=" to "&expire=0&email=" UrlEncode(mail) "&pass=" UrlEncode(pass)
- reconn_data:=http_%os%(otvet:="",url,post)
- location:=RegexReplace(reconn_data, ".*Location: (.*?)`n.*", "$1")
- reconn_data:=http_%os%(otvet:="",location)
- cookie:="cookie: remixsid=" . RegexReplace(reconn_data, ".*remixsid=(.*?);.*", "$1") . "; remixap=1; remixchk=5"
- location:=parse(otvet,"ocation.href = '","'")
- reconn_data:=http_%os%(otvet:="",location,"",cookie)
- api_token:=parse(reconn_data,"access_token=","&")
- iphone_mid:=parse(reconn_data,"user_id=","`n")
- TrayTip()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement