I use Regex.
May be is it possible to execute javascript without browser?
May be from htmlfile object?
Will be glad for any help or link how to do it.
Code: Select all
link := "http://forum.teamspeak.com"
HTTP := ComObjCreate("WinHTTP.WinHTTPRequest.5.1")
HTTP.Open("GET", link, true)
HTTP.SetRequestHeader("User-Agent", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)")
HTTP.Send()
HTTP.WaitForResponse()
msgbox % ResponseText := HTTP.ResponseText
RegexMatch(ResponseText, "s)var t,r,a,f, (.+?)=\{""(.+?)"":(.+?)}.+?jschl_vc"" value=""(.+?)"".+?pass"" value=""(.+?)""", match)
var := match1 "." match2
jschl_vc := match4
pass := match5
FinalResult := Count(match3)
match := "", Pos := 1
While Pos := RegExMatch(ResponseText, "s);" var "(..)(.+?)(?=;)",match,Pos+StrLen(match))
{
result := Count(match2)
if (match1 = "+=")
FinalResult += result
if (match1 = "-=")
FinalResult -= result
if (match1 = "*=")
FinalResult *= result
}
finalresult += StrLen(RegexReplace(link, "^https?://"))
JsLink := link "/cdn-cgi/l/chk_jschl?jschl_vc=" jschl_vc "&pass=" pass "&jschl_answer=" finalresult
sleep 5000
HTTP.Open("GET", Jslink, true)
HTTP.SetRequestHeader("User-Agent", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)")
HTTP.Send()
HTTP.WaitForResponse()
msgbox % ResponseText := HTTP.ResponseText
Count(var)
{
match := digit := "", Pos := 1
While Pos := RegExMatch(var, ".+?(\+\(|$)",match,Pos+StrLen(match))
{
RegexReplace(match, "(!\+\[]|\+!!\[])",,count)
digit .= count
}
return digit
}
; +[] = 0
; +!![] = 1
; !+[] = 1
; *=+((!+[]+!![]+!![]+!![]+[])+(+!![])) 41
; ; +=+((+!![]+[])+(+[])) 10