private void bwPost_DoWork(object sender, DoWorkEventArgs e) { CProxy userState = null; BackgroundWorker worker = (BackgroundWorker) sender; CPostInfo pi = new CPostInfo(); srand((uint) ((int) DateTime.Now.Ticks)); Label_0024: if (proxies_count() == 0) { worker.ReportProgress(0, "No more proxies, stopping\r\n"); abort = true; return; } if (abort) { return; } bool flag = false; List<CProxy>[] proxytable = this.proxytable; int index = 0; if (0 >= proxytable.Length) { goto Label_0659; } do { List<CProxy> list = proxytable[index]; int num = 0; if (0 < list.Count) { do { if (DateTime.Now > list[num].tm) { userState = list[num]; flag = true; break; } num++; } while (num < list.Count); } index++; } while (index < proxytable.Length); if (!flag) { goto Label_0659; } srand((uint) ((int) DateTime.Now.Ticks)); pi.prx = userState; if (captchas.Count == 0) { worker.ReportProgress(1); return; } worker.ReportProgress(0, (userState.ip + ":") + userState.port + " posting\r\n"); pi.submiturl = "https://sys.4chan.org/" + board + "/post"; NameValueCollection values = new NameValueCollection(); pi.formdata = values; string text = textBoxMessage.Text; values.Add("com", text); if (checkBoxNew.Checked) { values.Add("resto", "new"); } else { values.Add("resto", thread);} values.Add("name", textBoxName.Text); if (checkBoxSage.Checked) { values.Add("email", "sage"); } else { values.Add("email", ""); } values.Add("sub", ""); values.Add("recaptcha_response_field", "manual_challenge"); values.Add("pwd", (rand() * rand()).ToString("x")); values.Add("mode", "regist"); if (checkBoxImage.Checked) { new MemoryStream(); par.Param[0] = new EncoderParameter(System.Drawing.Imaging.Encoder.Quality, 12L); MemoryStream stream = GeneratePicture(); pi.pic = stream; pictureBox.Image = DelayBitmap; stream.Seek(0L, SeekOrigin.Begin); } else { pi.pic = null; } switch (doPost(pi)) { case proxy_status.STATUS_BAND: worker.ReportProgress(0, (userState.ip + ":") + userState.port + " B&\r\n"); worker.ReportProgress(0x63, userState); break; case proxy_status.STATUS_OK: { int num3; worker.ReportProgress(0, (userState.ip + ":") + userState.port + " post success!\r\n"); worker.ReportProgress(2); worker.ReportProgress(4); int failures = userState.Failures; if (failures <= 0) { num3 = 0; } else { num3 = failures - 1; } userState.Failures = num3; return; } case proxy_status.STATUS_FLOOD: { worker.ReportProgress(0, (userState.ip + ":") + userState.port+ " tripped flood detection\r\n"); DateTime time3 = DateTime.Now.AddSeconds(120.0); userState.tm = time3; goto Label_05C4; } case proxy_status.STATUS_DUPE: worker.ReportProgress(0, (userState.ip + ":") + userState.port + " duplicate?\r\n"); break; case proxy_status.STATUS_CAP: worker.ReportProgress(0, (userState.ip + ":") + userState.port + " bad captcha?\r\n"); break; case proxy_status.STATUS_LIMIT: worker.ReportProgress(0, (userState.ip + ":") + userState.port + " image limit\r\n"); worker.ReportProgress(3); break; case proxy_status.STATUS_INVALID: worker.ReportProgress(0, (userState.ip + ":") + userState.port+ " invalid thread specified\r\n"); worker.ReportProgress(3); break; case proxy_status.STATUS_NOBOARD: worker.ReportProgress(0, (userState.ip + ":") + userState.port + " board doesn't exist\r\n"); break; case proxy_status.STATUS_ABORT: worker.ReportProgress(0, (userState.ip + ":") + userState.port+ " operation aborted\r\n"); break; case proxy_status.STATUS_CONFAIL: worker.ReportProgress(0, (userState.ip + ":") + userState.port+ " connection failed mid transfer"); worker.ReportProgress(5, userState); break; case proxy_status.STATUS_RCVFAIL: worker.ReportProgress(0, (userState.ip + ":") + userState.port+ " failed to receive response from 4chan"); worker.ReportProgress(5, userState); break; default: worker.ReportProgress(0, (userState.ip + ":") + userState.port+ " encountered unknown failure"); worker.ReportProgress(5, userState); break; } if (checkBoxSage.Checked ) { DateTime time2 = DateTime.Now.AddSeconds(60.0); userState.tm = time2; } else if (checkBoxNew.Checked) { DateTime time = DateTime.Now.AddSeconds(120.0); userState.tm = time; } else { DateTime time3 = DateTime.Now.AddSeconds(30.0); userState.tm = time3; } Label_05C4: Thread.Sleep(0x3e8); goto Label_0024; Label_0659: worker.ReportProgress(0, "No proxies available.\r\n"); }
private void bwTimedSpamPost_DoWork(object sender, DoWorkEventArgs e) { CProxy userState = null; proxy_status _status; BackgroundWorker worker = (BackgroundWorker) sender; CPostInfo pi = new CPostInfo(); int argument = (int) e.Argument; Label_001E: if (proxies_count() == 0) { worker.ReportProgress(0, "No more proxies, stopping\r\n"); abort = true; return; } if (abort) { return; } bool flag = false; List<CProxy>[] proxytable = this.proxytable; int index = 0; if (0 < proxytable.Length) { do { List<CProxy> list = proxytable[index]; int num = 0; if (0 < list.Count) { do { if (DateTime.Now > list[num].tm) { userState = list[num]; flag = true; break; } num++; } while (num < list.Count); } index++; } while (index < proxytable.Length); if (flag) { srand((uint) ((int) DateTime.Now.Ticks)); pi.prx = userState; if (captchas.Count == 0) { worker.ReportProgress(1); return; } worker.ReportProgress(0, (userState.ip + ":") + userState.port + " posting\r\n"); pi.submiturl = "https://sys.4chan.org/" + board + "/post"; NameValueCollection values = new NameValueCollection(); pi.formdata = values; string str = GenerateText(); values.Add("com", str); if (checkBoxNew.Checked) { values.Add("resto", "new"); } else { values.Add("resto", thread); } values.Add("name", ""); if (checkBoxSage.Checked) { values.Add("email", "sage"); } else { values.Add("email", ""); } values.Add("sub", ""); values.Add("recaptcha_response_field", "manual_challenge"); values.Add("pwd", (rand() * rand()).ToString("x")); values.Add("mode", "regist"); if (checkBoxImage.Checked) { MemoryStream stream = GeneratePicture(); pi.pic = stream; pictureBox.Image = DelayBitmap; stream.Seek(0L, SeekOrigin.Begin); } else { pi.pic = null; } if (checkBox50.Checked && ((rand() % 2) == 0)) { pi.pic = null; } attempts++; _status = doPost(pi); if (checkBoxCheck.Checked) { userState.Failures = 0; } switch (_status) { case proxy_status.STATUS_BAND: worker.ReportProgress(0, (userState.ip + ":") + userState.port + " B&\r\n"); worker.ReportProgress(0x63, userState); goto Label_060D; case proxy_status.STATUS_OK: { int num3; posts++; worker.ReportProgress(0, (userState.ip + ":") + userState.port + " post success!\r\n"); worker.ReportProgress(2); worker.ReportProgress(4); int failures = userState.Failures; if (failures <= 0) { num3 = 0; } else { num3 = failures - 1; } userState.Failures = num3; goto Label_060D; } case proxy_status.STATUS_FLOOD: { worker.ReportProgress(0, (userState.ip + ":") + userState.port + " tripped flood detection\r\n"); DateTime time4 = DateTime.Now.AddSeconds(120.0); userState.tm = time4; goto Label_001E; } case proxy_status.STATUS_DUPE: worker.ReportProgress(0, (userState.ip + ":") + userState.port + " duplicate?\r\n"); goto Label_060D; case proxy_status.STATUS_CAP: worker.ReportProgress(0, (userState.ip + ":") + userState.port + " bad captcha?\r\n"); goto Label_060D; case proxy_status.STATUS_LIMIT: worker.ReportProgress(0, (userState.ip + ":") + userState.port + " image limit\r\n"); worker.ReportProgress(3); goto Label_060D; case proxy_status.STATUS_INVALID: worker.ReportProgress(0, (userState.ip + ":") + userState.port + " invalid thread specified\r\n"); worker.ReportProgress(3); goto Label_060D; case proxy_status.STATUS_NOBOARD: worker.ReportProgress(0, (userState.ip + ":") + userState.port + " board doesn't exist\r\n"); goto Label_060D; case proxy_status.STATUS_ABORT: worker.ReportProgress(0, (userState.ip + ":") + userState.port + " operation aborted\r\n"); goto Label_060D; case proxy_status.STATUS_CONFAIL: worker.ReportProgress(0, (userState.ip + ":") + userState.port + " connection failed mid transfer"); worker.ReportProgress(5, userState); goto Label_060D; case proxy_status.STATUS_RCVFAIL: worker.ReportProgress(0, (userState.ip + ":") + userState.port + " failed to receive response from 4chan"); worker.ReportProgress(5, userState); goto Label_060D; } worker.ReportProgress(0, (userState.ip + ":") + userState.port + " encountered unknown failure"); worker.ReportProgress(5, userState); goto Label_060D; } } worker.ReportProgress(0, "No proxies available, waiting 20 seconds...\r\n"); Thread.Sleep(0x4e20); goto Label_001E; Label_060D: if (thread == "") { DateTime time3 = DateTime.Now.AddSeconds(300.0); userState.tm = time3; } else if (checkBoxSage.Checked) { DateTime time2 = DateTime.Now.AddSeconds(60.0); userState.tm = time2; } else { DateTime time = DateTime.Now.AddSeconds(30.0); userState.tm = time; } if (_status == proxy_status.STATUS_OK) { worker.ReportProgress(0, "Sleeping for " + argument + " seconds.\r\n"); Thread.Sleep((int) (argument * 0x3e8)); } goto Label_001E; }
private proxy_status doPost(CPostInfo pi) { int num4; proxy_status _status2; string str = ""; new MemoryStream(); CProxy prx = pi.prx; new WebClient { Proxy = new WebProxy(prx.ip, prx.port) }; srand((uint)((int)DateTime.Now.Ticks)); int num6 = rand() % 3; rand(); switch (num6) { case 0: num4 = (rand() % 0x63) + 50; break; case 1: num4 = (rand() % 0x3e7) + 100; break; default: num4 = (rand() % 0x3e7) << 1; break; } DateTime time = new DateTime(0x7b2, 1, 1, 0, 0, 0); TimeSpan span = (TimeSpan)(DateTime.UtcNow - time); long num3 = Convert.ToInt64(span.TotalMilliseconds); int num2 = 0; if (0 < (rand() % 6)) { long num9 = num4 * 0xf4240; do { num3 -= num9; num2++; } while (num2 < (rand() % 6)); } string str2 = (num3 - rand()).ToString(); if (checkBoxDot.Checked) { str2 = str2 + ".png"; } else { str2 = str2 + ".jpg"; } byte[] buffer2 = new byte[0x200]; int num8 = rand() * rand(); int num7 = rand() * num8; int num5 = rand() * num7; string str4 = num5.ToString("x"); byte[] bytes = Encoding.ASCII.GetBytes("\r\n--" + str4 + Environment.NewLine); string format = "\r\n--" + str4 + "\r\nContent-Disposition: form-data; name=\"{0}\";\r\n\r\n{1}"; string str10 = "Content-Disposition: form-data; name=\"upfile\"; filename=\"{0}\"\r\nContent-Type: application/octet-stream\r\nContent-Transfer-Encoding: binary\r\n\r\n"; ServicePointManager.Expect100Continue = false; try { int num; prx = pi.prx; WebProxy proxy2 = new WebProxy(prx.ip, prx.port) { UseDefaultCredentials = true }; HttpWebRequest request = (HttpWebRequest)WebRequest.Create(pi.submiturl); request.ContentType = "multipart/form-data; boundary=" + num5.ToString("x"); request.UserAgent = "Mozilla/5.0 (Windows NT 5.0; WOW64; rv:6.0) Gecko/20100101 Firefox/6.0"; request.Method = "POST"; request.Credentials = CredentialCache.DefaultCredentials; request.Proxy = proxy2; request.Timeout = 0x3a98; request.ReadWriteTimeout = 0x3a98; Stream requestStream = request.GetRequestStream(); IEnumerator enumerator = pi.formdata.Keys.GetEnumerator(); try { while (enumerator.MoveNext()) { string current = (string)enumerator.Current; string str9 = string.Format(format, current, pi.formdata[current]); byte[] buffer5 = Encoding.UTF8.GetBytes(str9); requestStream.Write(buffer5, 0, buffer5.Length); } } finally { IEnumerator enumerator2 = enumerator; IDisposable disposable = enumerator as IDisposable; if (disposable != null) { disposable.Dispose(); } } requestStream.Write(bytes, 0, bytes.Length); if (abort) { return proxy_status.STATUS_ABORT; } string val = ""; if (checkBoxCheck.Checked) { val = (rand() * rand()).ToString(); } else { val = captchas[0].val; captchas.RemoveAt(0); } string s = string.Format(format, "recaptcha_challenge_field", val); byte[] buffer = Encoding.UTF8.GetBytes(s); requestStream.Write(buffer, 0, buffer.Length); requestStream.Write(bytes, 0, bytes.Length); if (pi.pic != null) { string str7 = string.Format(str10, str2); byte[] buffer3 = Encoding.UTF8.GetBytes(str7); requestStream.Write(buffer3, 0, buffer3.Length); while (true) { num = pi.pic.Read(buffer2, 0, buffer2.Length); if (num == 0) { break; } if (abort) { return proxy_status.STATUS_ABORT; } requestStream.Write(buffer2, 0, num); } } requestStream.Flush(); bytes = Encoding.ASCII.GetBytes("\r\n--" + str4 + "--\r\n"); requestStream.Write(bytes, 0, bytes.Length); requestStream.Close(); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); Stream responseStream = response.GetResponseStream(); while (true) { num = responseStream.Read(buffer2, 0, buffer2.Length); if (num <= 0) { break; } str = str + Encoding.ASCII.GetString(buffer2, 0, num); } responseStream.Close(); response.Close(); if (str.IndexOf("Post successful") != -1) { return proxy_status.STATUS_OK; } if (str.IndexOf("Flood") != -1) { return proxy_status.STATUS_FLOOD; } if (str.IndexOf("Duplicate") != -1) { return proxy_status.STATUS_DUPE; } if (str.IndexOf("verification") != -1) { return proxy_status.STATUS_CAP; } if (str.IndexOf("board doesn") != -1) { return proxy_status.STATUS_NOBOARD; } if (str.IndexOf("ISP") != -1) { return proxy_status.STATUS_BAND; } if (str.IndexOf("Max limit of") != -1) { return proxy_status.STATUS_LIMIT; } if (str.IndexOf("Thread specified") != -1) { return proxy_status.STATUS_INVALID; } goto Label_054F; } catch (WebException exception) { if (exception.Response != null) { if (((HttpWebResponse)exception.Response).StatusCode == HttpStatusCode.Forbidden) { return proxy_status.STATUS_BAND; } goto Label_054F; } if (exception.Status == WebExceptionStatus.ReceiveFailure) { return proxy_status.STATUS_RCVFAIL; } if (exception.Status != WebExceptionStatus.Success) { return proxy_status.STATUS_CONFAIL; } _status2 = proxy_status.STATUS_UNKNOWNWEB; } catch (Exception) { goto Label_054F; } return _status2; Label_054F: return proxy_status.STATUS_UNKNOWN; }
private void bwSpamPost_DoWork(object sender, DoWorkEventArgs e) { CProxy proxy; int num5; BackgroundWorker worker = (BackgroundWorker) sender; CPostInfo pi = new CPostInfo(); int argument = (int) e.Argument; Label_001B: if (proxytable[argument].Count == 0) { worker.ReportProgress(0, ("No more proxies in table" + argument + ", thread ") + argument + " stopping\r\n"); return; } if (abort) { return; } int num2 = this.proxycounter[argument]; if (DateTime.Now <= proxytable[argument][num2].tm) { while (true) { int[] numArray2 = this.proxycounter; numArray2[argument]++; if (this.proxycounter[argument] >= proxytable[argument].Count) { break; } num2 = this.proxycounter[argument]; if (DateTime.Now > proxytable[argument][num2].tm) { goto Label_00E9; } } this.proxycounter[argument] = 0; Thread.Sleep(0x1388); goto Label_001B; } Label_00E9: proxy = proxytable[argument][num2]; int[] proxycounter = this.proxycounter; int num6 = proxycounter[argument]; if (num6 >= (proxytable[argument].Count - 1)) { num5 = 0; } else { num5 = num6 + 1; } proxycounter[argument] = num5; srand((uint) ((int) DateTime.Now.Ticks)); pi.prx = proxy; if (captchas.Count == 0) { worker.ReportProgress(1); } else { worker.ReportProgress(0, (proxy.ip + ":") + proxy.port + " posting\r\n"); pi.submiturl = "https://sys.4chan.org/" + board + "/post"; NameValueCollection values = new NameValueCollection(); pi.formdata = values; string str = GenerateText(); values.Add("com", str); if (checkBoxNew.Checked) { values.Add("resto", "new"); } else { values.Add("resto", thread); } values.Add("name", ""); if (checkBoxSage.Checked) { values.Add("email", "sage"); } else { values.Add("email", ""); } values.Add("sub", ""); values.Add("recaptcha_response_field", "manual_challenge"); values.Add("pwd", (rand() * rand()).ToString("x")); values.Add("mode", "regist"); if (checkBoxImage.Checked) { MemoryStream stream = GeneratePicture(); pi.pic = stream; pictureBox.Image = DelayBitmap; stream.Seek(0L, SeekOrigin.Begin); } else { pi.pic = null; } if (checkBox50.Checked && ((rand() % 3) == 0)) { pi.pic = null; } attempts++; switch (doPost(pi)) { case proxy_status.STATUS_BAND: worker.ReportProgress(0, (proxy.ip + ":") + proxy.port + " B&\r\n"); worker.ReportProgress(0x63, proxy); break; case proxy_status.STATUS_OK: { int num3; posts++; worker.ReportProgress(0, (proxy.ip + ":") + proxy.port + " post success!\r\n"); worker.ReportProgress(2); worker.ReportProgress(4); int failures = proxy.Failures; if (failures <= 0) { num3 = 0; } else { num3 = failures - 1; } proxy.Failures = num3; break; } case proxy_status.STATUS_FLOOD: { worker.ReportProgress(0, (proxy.ip + ":") + proxy.port + " tripped flood detection\r\n"); DateTime time5 = DateTime.Now.AddSeconds(120.0); proxy.tm = time5; goto Label_001B; } case proxy_status.STATUS_DUPE: worker.ReportProgress(0, (proxy.ip + ":") + proxy.port + " duplicate?\r\n"); break; case proxy_status.STATUS_CAP: worker.ReportProgress(0, (proxy.ip + ":") + proxy.port + " bad captcha?\r\n"); break; case proxy_status.STATUS_LIMIT: worker.ReportProgress(0, (proxy.ip + ":") + proxy.port + " image limit\r\n"); worker.ReportProgress(3); break; case proxy_status.STATUS_INVALID: worker.ReportProgress(0, (proxy.ip + ":") + proxy.port+ " invalid thread specified\r\n"); worker.ReportProgress(3); break; case proxy_status.STATUS_NOBOARD: worker.ReportProgress(0, (proxy.ip + ":") + proxy.port + " board doesn't exist\r\n"); break; case proxy_status.STATUS_ABORT: worker.ReportProgress(0, (proxy.ip + ":") + proxy.port + " operation aborted\r\n"); break; case proxy_status.STATUS_CONFAIL: worker.ReportProgress(0, (proxy.ip + ":") + proxy.port + " connection failed mid transfer"); worker.ReportProgress(5, proxy); break; case proxy_status.STATUS_RCVFAIL: worker.ReportProgress(0, (proxy.ip + ":") + proxy.port + " failed to receive response from 4chan"); worker.ReportProgress(5, proxy); break; default: worker.ReportProgress(0, (proxy.ip + ":") + proxy.port + " encountered unknown failure"); worker.ReportProgress(5, proxy); break; } if (thread == "") { DateTime time4 = DateTime.Now.AddSeconds(300.0); proxy.tm = time4; } else if (checkBoxSage.Checked) { DateTime time3 = DateTime.Now.AddSeconds(60.0); proxy.tm = time3; } else { DateTime time2 = DateTime.Now.AddSeconds(30.0); proxy.tm = time2; } goto Label_001B; } }