Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //paste this into the execute button
- HtmlDocument text = webBrowser1.Document;
- string scriptName = "GetText";
- object[] args = new string[0];
- object obj = text.InvokeScript(scriptName, args);
- string script = obj.ToString();
- if (webBrowser1.Text.Contains("loadstring(game:HttpGet(("))
- {
- int num = script.IndexOf("('") + 2;
- int length = script.IndexOf("')") - num;
- WebRequest webRequest = WebRequest.Create(script.Substring(num, length));
- webRequest.Credentials = CredentialCache.DefaultCredentials;
- HttpWebResponse httpWebResponse = (HttpWebResponse)webRequest.GetResponse();
- Console.WriteLine(httpWebResponse.StatusDescription);
- string loadstring = new StreamReader(httpWebResponse.GetResponseStream()).ReadToEnd();
- api.SendLuaScript(loadstring);
- }
- else
- {
- api.SendLuaScript(script);
- }
- if (webBrowser1.Text.Contains("loadstring(game:GetObjects(("))
- {
- int num = script.IndexOf("('") + 2;
- int length = script.IndexOf("')") - num;
- WebRequest webRequest = WebRequest.Create(script.Substring(num, length));
- webRequest.Credentials = CredentialCache.DefaultCredentials;
- HttpWebResponse httpWebResponse = (HttpWebResponse)webRequest.GetResponse();
- Console.WriteLine(httpWebResponse.StatusDescription);
- string str3 = new StreamReader(httpWebResponse.GetResponseStream()).ReadToEnd();
- api.SendLuaScript(str3);
- }
- if (webBrowser1.Text.Contains("game:GetObjects(("))
- {
- int num = script.IndexOf("('") + 2;
- int length = script.IndexOf("')") - num;
- WebRequest webRequest = WebRequest.Create(script.Substring(num, length));
- webRequest.Credentials = CredentialCache.DefaultCredentials;
- HttpWebResponse httpWebResponse = (HttpWebResponse)webRequest.GetResponse();
- Console.WriteLine(httpWebResponse.StatusDescription);
- string urmomgei = new StreamReader(httpWebResponse.GetResponseStream()).ReadToEnd();
- api.SendLuaScript(urmomgei);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement