PHP: #!/usr/bin/perl -w sub interact { # reading messages... $_=shift(@_); $seed=shift(@_); $step=shift(@_); my @lexx=split(/'/, $_); $lexx[1]=~s/^message.phtml\?//; print "$gon * Looking up messages at ".$_." $goff\n"; $uri="http://my.flirtru.ru/messages_show.phtml?".$lexx[1]; # this operation will mark messages read.... system("curl '$uri' > $seed.$step.mess"); system("iconv -c -f UTF8 -t KOI8 $seed.$step.mess > $seed.$step.mess.koi"); open(mess1, "$seed.$step.mess.koi"); $body=""; while(<mess1>) { $body.=$_; } close(mess1); $body=~s/<br \/>//gs; my @mlex=split(/[<>]/, $body); my $from_cnt=0; my $to_cnt=0; my $dialog=""; for (my$i=0;$i<=$#mlex;$i++) { if ($mlex[$i]=~/td class="mto"/ && $mlex[$i+2]=~/\/td/) { $mlex[$i+1]=~s/[\n\r]/\|/gs; print "\t\t->".$mlex[$i+1]."\n"; $dialog.=">".$mlex[$i+1]."\n\n"; $to_cnt++; } if ($mlex[$i]=~/td class="mfrom"/ && $mlex[$i+2]=~/\/td/) { print "\t\t<-".$mlex[$i+1]."\n"; $dialog.="<".$mlex[$i+1]."\n\n"; $from_cnt++; } } if ($from_cnt<3 && $to_cnt<5) { # oops! it looks like I've forgot to talk to this contact... need to send message... $uri="http://my.flirtru.ru/message.phtml?".$lexx[1]; print " $gon Loading [$uri] to discover message posting arguments... $goff\n"; system("curl '$uri' > $seed.$step.send1"); system("iconv -c -f UTF8 -t KOI8 $seed.$step.send1 > $seed.$step.send1.koi"); $body=""; open(mess2, "$seed.$step.send1.koi"); while(<mess2>) { $body.=$_; } close(mess2); my @slex=split(/[<>]/, $body); my $collect=0; $uri=""; for ($i=0;$i<=$#slex;$i++) { if ($slex[$i]=~/^form/i && $slex[$i]=~/defaultMessageForm/i) { $collect=1; } if ($slex[$i]=~/^/form/i) { $collect=0; } if ($slex[$i]=~/^input/ && $collect==1) { print $slex[$i]."\n"; my @ilex=split(/[" ]/, $slex[$i]); if ($slex[$i] =~ /submit/) { next; } for (my$j=0;$j<=$#ilex;$j++) { if ($ilex[$j] =~ /^name/i) { $uri.="&".$ilex[$j+1]."="; } if ($ilex[$j] =~ /value/i) { if (!defined($ilex[$j+1])) { $ilex[$j+1]=""; } $uri.=$ilex[$j+1]; } } } } # AI block begin.... # what message to send...? if ($from_cnt==0) { $str="Привет...."; } if ($from_cnt==1) { $str="текст1"; } if ($from_cnt==2) { $str="текст2"; } # AI block ends here....) $str =~ s/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg; $uri.="&message=".$str; $uri=~s/^\&//; $uri="http://my.flirtru.ru/message.phtml?".$uri; print "Collected uri is [$uri]\n"; system("curl '$uri' > $seed.$step.send2"); } open(DIALOG,">>dialoglog"); print DIALOG "\n".$dialog; system("date >> dialoglog"); print DIALOG "==================\n"; close(DIALOG); } my $seed=rand(); $seed=~s/^0.//; $gon="[01;32m"; $goff="[00m"; my $login="логин"; my $password="пасс"; system("curl http://tips.flirtru.ru/?tip=Login > $seed.tip"); system("iconv -f UTF8 -t KOI8 $seed.tip > $seed.tip.koi"); open(step1, "$seed.tip.koi"); my $body=""; while(<step1>) { $body.=$_; } close(step1); my @lexx=split(/[<>]/,$body); my $uri=""; for (my $i=0;$i<=$#lexx;$i++) { if ( $lexx[$i]=~/^form/i ) { print "$gon Form found... dumping possible inputs...$goff\n"; my $flag=1; my $j=$i+1; my @args=split(/[= ]/,$lexx[$i]); for (my$k=0;$k<=$#args;$k++) { if ($args[$k] =~ /action/i) { print "Posting to [".$args[$k+1]."]\n"; $uri=$args[$k+1]."?"; } } while($flag) { if ($lexx[$j]=~/^/form/i) { $flag=0; } if ($lexx[$j]=~/^input/i) { print "\t".$lexx[$j]."\n"; my @ilex=split(/[= ]/,$lexx[$j]); for(my$k=0;$k<=$#ilex;$k++) { if ($ilex[$k] =~ /type/i && $ilex[$k+1] =~ /submit/i) { last; } if ($ilex[$k] =~ /^name/i) { $uri.="&".$ilex[$k+1]."="; if ($ilex[$k+1]=~/login/i && $ilex[$k+1]!~/login_action/i) { $uri.=$login; } if ($ilex[$k+1]=~/password/i) { $uri.=$password; } } if ($ilex[$k] =~ /^value/i) { $uri.=$ilex[$k+1]; } } } $j++; } } } $uri=~s/"//gs; $uri=~s/^\&//; print "$gon Post string is [".$uri."] $goffn"; system("curl '$uri' > $seed.login"); system("iconv -f UTF8 -t KOI8 $seed.login > $seed.login.koi"); #system("cat $seed.login.koi"); open(step2, "$seed.login.koi"); $body=""; while(<step2>) { if ($_=~/window.location.href/) { my @lexx=split(/\'/ ); $uri=$lexx[1]; last; } } close(step2); if (!defined($uri)) { $uri=""; } if ($uri=~/my.flirtru.ru/) { print "$gon Logged in... continue... $goffn"; } else { print "$gon Bad password $goffn"; exit; } print "$gon Posting to $uri $goffn"; system("curl '$uri' > $seed.inner"); system("iconv -c -f UTF8 -t KOI8 $seed.inner > $seed.inner.koi"); open(step3, "$seed.inner.koi"); while(<step3>) { if ($_=~/messages.phtml/i) { my @lexx=split(/[\"]/); for (my$i=0;$i<$#lexx;$i++) { if ($lexx[$i]=~/href=/i) { $uri=$lexx[$i+1]; last; } } } } close(step3); $step=0; print "$gon Loading messages from [$uri]... $goffn"; while(1) { system("curl '$uri' > $seed.$step"); system("iconv -c -f UTF8 -t KOI8 $seed.$step > $seed.$step.koi"); open(view1, "$seed.$step.koi"); $body=""; while(<view1>) { $body.=$_; } close(view1); my @lexx=split(/[\n ]/, $body); my %fresh; my %new; if ($body=~/Status 302/i) { print "Fatal... some redirection occuredn$bodyn"; exit(0); } for (my$i=0;$i<$#lexx;$i++) { if ($lexx[$i] =~ /openContact/ && $lexx[$i]=~/message.phtml/) { if ($lexx[$i-14]=~/b_newmess2/) { $new{$lexx[$i]}++; } if ($lexx[$i-3]=~/red/) { $fresh{$lexx[$i]}++; } } } # processing dialogs... print "Dialog...:n"; foreach (keys %fresh) { print $_." ".$fresh{$_}."n"; interact($_, $seed, $step); sleep(1); } # processing new conctacts... print "New contacts...:n"; foreach (keys %new) { print $_." ".$new{$_}."n"; interact($_, $seed, $step); sleep(1); } $|++; sleep(165); exit(0); } скрипт perl смысл прозь,ы перекодировать его так чтоб можно было запускать на разных компах на которых нету perl и curl, я не сику в програмированеи ничего так-что не орать плз ) писал это не я_ ps я тему создавал в разделе халява , сюда ее перекинули (= так-что если есть добрые люди то сделайте плз
Имхо, не будет у вас сие работать, ибо в скрипте вызываются внешние команды iconv и curl, специфичные для юникс-систем. Решением может быть небольшое изменение скрипта - вместо iconv и curl заюзать стандартные модули LWP и Encode, и уже тогда можно сделать при помощи perl2exe исполняемый файл
ты походу просто не умеешь читать. krypt3r сказал, что нужно использовать софт без дополнительных библиотек, а использовать встроенные. Поправьте , если ошибаюсь.
я не секу в этом ! и языки програмировая нифига не знаю , но скрипт уменя вот есть такой , и если кто -то возьмется за него я буду очень и очень сильно благодарен!