Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- internal class GroupScanner
- {
- private readonly Random _groupnumberGenerator;
- public GroupScanner()
- {
- _groupnumberGenerator = new Random();
- }
- public void Initialize(int userSpecifiedTaskAmount)
- {
- ParallelOptions options = new ParallelOptions();
- options.MaxDegreeOfParallelism = userSpecifiedTaskAmount;
- Parallel.For(0, Int32.MaxValue, options, (p) =>
- {
- MainScan();
- });
- }
- private async void MainScan()
- {
- HtmlDocument htmlDocument = new HtmlDocument();
- string link = $"https://www.roblox.com/Groups/Group.aspx?gid={_groupnumberGenerator.Next(1300000)}";
- HttpWebRequest request = (HttpWebRequest)WebRequest.Create(link);
- using (HttpWebResponse response = (HttpWebResponse)await request.GetResponseAsync())
- if (response != null && response.StatusCode == HttpStatusCode.OK)
- using (StreamReader sr = new StreamReader(response.GetResponseStream()))
- htmlDocument.LoadHtml(await sr.ReadToEndAsync());
- request = null;
- if (htmlDocument.GetElementbyId("MemberCount") != null
- && htmlDocument.GetElementbyId("MemberCount").InnerText.Equals("Members: 0"))
- {
- if (htmlDocument.GetElementbyId("ctl00_cphRoblox_rbxGroupFundsPane_GroupFunds") != null)
- {
- uint amount = uint.Parse(htmlDocument.GetElementbyId("ctl00_cphRoblox_rbxGroupFundsPane_GroupFunds").ChildNodes[3].InnerText, NumberStyles.AllowThousands);
- if (amount != 0)
- Console.WriteLine($"Group Link: {link} | Robux: {amount}");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement