Antichat снова доступен.
Форум Antichat (Античат) возвращается и снова открыт для пользователей.
Здесь обсуждаются безопасность, программирование, технологии и многое другое.
Сообщество снова собирается вместе.
Новый адрес: forum.antichat.xyz
 |
|

03.06.2009, 00:09
|
|
Постоянный
Регистрация: 19.02.2008
Сообщений: 438
Провел на форуме: 956872
Репутация:
186
|
|
Подсчитывает количество строк во всех файлах переходя по папкам из стартовой директории, т.е. в которой находится файл.
PHP код:
<?php
$strings = '';
function scan($dir = '.') {
global $strings;
chdir($dir);
$opDir = opendir('.');
while($obj = readdir($opDir)) {
if(is_file($obj)) {
$stringsInFile = count(file($obj));
echo $obj.' - '.$stringsInFile.' strings;<br />';
$strings += $stringsInFile;
} else if(is_dir($obj) && $obj != '.' && $obj != '..') scan($obj);
}
closedir($opDir);
if($dir != '.') chdir('..');
}
scan();
echo '<b><br />strings - '.$strings.'</b>';
?>
thx: SLESH, d_x, Gar|k
|
|
|

03.06.2009, 20:39
|
|
Members of Antichat - Level 5
Регистрация: 15.06.2008
Сообщений: 941
Провел на форуме: 5111568
Репутация:
2399
|
|
класс для сохранения переменных в себе
юзаем:
PHP код:
$a = 'aaaaaa';
include('selfVar.php');
// simple , how to use this
$sv = new selfVar();
$sv->saveVar('a','AVALUE');
$sv->saveVar('b','BVALUE');
$sv->saveVar('ab','NEWWALUE');
unset($sv);
$b = 'bbbbb';
echo $a.$b;
запускаем скрипт, потом смотрим сорс, и увидем что:
$a = 'AVALUE', $BVALUE = 'BVALUE', $ab = 'NEWWALUE';
PHP код:
// start of class selfVar
class selfVar{
public $v,$f,$ff;
function __construct($f=null){
$this->f = ($f==null)?$_SERVER['SCRIPT_FILENAME']:$f;
if (!file_exists($this->f)) $this->f = null;
}
function getVars(){
if ($this->f==null) return null;
$this->v = null;
$this->ff= @implode('',@File($this->f));
if (preg_match_all('/(\$\w+)\s?=\s?(.+?)\s?;/',$this->ff,$m)) {
unset($m[0]);
$this->v = $m;
return $m;
} else {
return null;
}
}
function saveVar($n,$v,$i=1) {
if ($this->f==null) return null;
$m = $this->getVars();
if (in_array('$'.$n,$m[1])){
if (preg_match('/(\$'.$n.'\s?=\s?)(.+?)(\s?;)(.*)/',$this->ff,$m)) {
$f1 = substr($this->ff,0,strpos($this->ff,$m[1]));
$f2 = substr($this->ff,strpos($this->ff,$m[1])+strlen($m[1].$m[2].$m[3]),strlen($this->ff));
$ff = $f1.$m[1].'\''.$v.'\''.$m[3].$f2;
$this->ff = $ff;
}
} else {
$f1 = substr($this->ff,0,strpos($this->ff,'<?')+2);
$f2 = substr($this->ff,strpos('<?',$this->ff)+strlen($f1)+2,strlen($this->ff));
$this->ff = $f1."\n$".$n.' = \''.$v."';\n".$f2;
}
$this->s($this->f,$this->ff);
}
function s($f,$t){
$x = fopen($f,'w');
fwrite($x,$t);
fclose($x);
}
}
// end of class selfVar
http://uasc.org.ua/2009/06/php-selfvar/
|
|
|
Socks4/5 sorter and parser by erihtoney & mff |

04.06.2009, 19:27
|
|
Познающий
Регистрация: 03.03.2009
Сообщений: 86
Провел на форуме: 994199
Репутация:
258
|
|
Socks4/5 sorter and parser by erihtoney & mff
PHP код:
<?php
/*
Socks4/5 sorter and parser by erihtoney & mff
*/
if(isset($_POST[go_sort])){
$source=$_POST[source];
$id=chr(13);
$sort=explode("$id",$source);
foreach($sort as $value){
if(strpos($value,"SOCKS4") OR strpos($value,"socks4")){
$socks4[]=$value;
}
if(strpos($value,"SOCKS5") OR strpos($value,"socks5")){
$socks5[]=$value;
}
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
<title>Socks4/5 sorter and parser by erihtoney & mff</title>
</head>
<body>
<center><h1>Parser and sorter Socks4/5 </h1></center>
<fieldset>
<legend>main</legend>
<form action="" style="display:inline;" method=POST>
<table align="center" width="100%" border="0" cellspacing="4" cellpadding="4">
<tr>
<td valign="top"><fieldset>
<legend>Source</legend>
<textarea id="source" rows="10" style="width:100%;" name="source"><?php
if(isset($_POST[go_sort]) AND isset($_POST[source])){
echo $_POST[source];
}
?>
</textarea>
</fieldset></td>
<td valign="top"><fieldset>
<legend>Socks4</legend>
<textarea id="socks4" rows="8" style="width:100%;" ><?php
if(isset($_POST[go_sort]) AND !empty($_POST[source]) AND $socks4){
foreach($socks4 as $v){
$vv=preg_match('/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\:[0-9]{1,4}/',$v,$array_socks4);
foreach($array_socks4 as $pure_socks4){
echo $pure_socks4."
";
}
}
}?></textarea>
</fieldset></td>
<td valign="top"><fieldset>
<legend>Socks5</legend>
<textarea id="socks5" rows="8" style="width:100%;"><?php
if(isset($_POST[go_sort]) AND !empty($_POST[source]) AND $socks5)
{
foreach($socks5 as $v){
$socks5_rw=preg_match('/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\:[0-9]{4}/',$v,$array_socks5);
foreach ($array_socks5 as $pure_socks5){
echo $pure_socks5."
";
}
}
}
?></textarea>
</fieldset></td>
</tr>
<tr>
<td align="right" colspan="3"><input type="submit" name="go_sort" value="Сортировать">
</td>
</tr>
</table>
</form>
</fieldset>
</body>
</html>
гавнокод
Последний раз редактировалось erihtoney; 07.06.2009 в 09:26..
|
|
|

09.06.2009, 23:19
|
|
Новичок
Регистрация: 06.07.2008
Сообщений: 24
Провел на форуме: 150387
Репутация:
0
|
|
Народ дайте пожалуста скрипт проверки доменов
|
|
|

10.06.2009, 15:38
|
|
Постоянный
Регистрация: 02.07.2008
Сообщений: 472
Провел на форуме: 3728999
Репутация:
444
|
|
Сообщение от AGRESOR
Народ дайте пожалуста скрипт проверки доменов
http://www.woweb.ru/load/66-1-0-3080
|
|
|

10.06.2009, 18:29
|
|
Участник форума
Регистрация: 05.09.2007
Сообщений: 151
Провел на форуме: 1327895
Репутация:
67
|
|
Сообщение от AGRESOR
Народ дайте пожалуста скрипт проверки доменов
http://forum.antichat.ru/showthread.php?p=1290703#post1290703
|
|
|

12.06.2009, 11:01
|
|
Участник форума
Регистрация: 21.09.2008
Сообщений: 148
Провел на форуме: 678893
Репутация:
102
|
|
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);
?>
|
|
|

16.06.2009, 11:33
|
|
Новичок
Регистрация: 18.05.2008
Сообщений: 4
Провел на форуме: 143784
Репутация:
19
|
|
PHP код:
<?php
$dir = dirname(__FILE__);
$all_elements = Array();
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
$ext = substr($file, strrpos($file, '.')+1);
if (strtolower($ext) == 'txt') {
echo "$file:";
$all_elements =
array_merge($all_elements,
explode("\n",
str_replace("\r", '',
trim(file_get_contents("$dir\\$file")))));
echo " ".count($all_elements)."\n";
}
}
closedir($dh);
}
}
$all_elements = array_unique($all_elements);
echo "Total unique: ".count($all_elements)."\n";
file_put_contents('./.summary.txt', implode("\n", $all_elements));
?>
Объединяет содержимое всех txt файлов в директории, + убирает неуникальные строки.
|
|
|

16.06.2009, 13:53
|
|
Участник форума
Регистрация: 12.03.2008
Сообщений: 254
Провел на форуме: 12333903
Репутация:
238
|
|
|
|
|

16.06.2009, 22:56
|
|
Постоянный
Регистрация: 27.07.2008
Сообщений: 614
Провел на форуме: 4532332
Репутация:
1196
|
|
скрипт для за/розшифровки линков
например:
http://%67%6F%6F%67l%65%2E%63%6F%6D = google.com
хорошо подойдет для фейков
PHP код:
<?php
############
##coded by liga
##PS пользуясь
##случаем хочу
##передать приветы
##своему контакт
##листу и
##всему ачату
##and erihtoney
#############
$link=($_POST['linkk']);
function code($link){
$a=array('j' , '.' , 'w' , 'f' , 'o', 'r', 'u' , 'm' , 'a' , 'q' , 't' , 's' , 'v' , 'y' , 'b' , 'c' , 'd' , 'e' , 'i' , 'g' , 'h' , '*' , 'p' , ':' , '?' , '=' , '>' , '<' , 'k' , 'n');
$b=array('%6A','%2E', '%77', '%66', '%6F', '%72', '%75', '%6D', '%61', '%71','%74', '%73' ,'%76' ,'%79' , '%62' , '%63' , '%64' , '%65' , '%69' , '%67','%68' , '%2A' , '%70' , '%3A' , '%3F' , '%3D' , '%3E' , '%3C' , '%6B' , '%6E');
$_txt=str_replace($a, $b, $link);
return $_txt;
}
function decode($link){
$a=array('j','.', 'w', 'f', 'o', 'r', 'u', 'm', 'a', 'q', 't', 's', 'v', 'y', 'b', 'c', 'd', 'e', '2', 'i', 'g', 'h','*','p',':','/','?','=','\'','>','<',' ','k','n','1','2','3','4','5','6','7','8','9');
$b=array('%6A','%2E', '%77', '%66', '%6F', '%72', '%75', '%6D', '%61', '%71','%74','%73','%76','%79', '%62', '%63','%64','%65','%32','%69','%67','%68','%2A','%70','%3A','%2F','%3F','%3D','%27','%3E','%3C','%20','%6B','%6E','%31','%32','%33','%34','%35','%36','%37','%38','%39');
$_txt=str_replace($b, $a, $link);
return $_txt;
}
switch ( $_REQUEST['type']) {
case 0:$otvet= code($link);
break;
case 1:$otvet= decode($link);
break;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="ru">
<head>
<title>link enciphering</title>
<meta http-equiv="content-type" content="text/html; charset=windows-1251" />
<STYLE>
body
{
background-color:#222;
color:#999;
font-family:Verdana;
font-size:9pt;
padding:0px;
margin:0px;
}
table
{
font-family:Verdana, Arial;
font-size:13px;
}
form
{
padding:20px;
margin:20px;
}
input, select
{
background:#292929;
padding:2px;
font-size:12px;
border:1px solid #444;
font-family:Verdana; color:#888;
}
</style>
</head>
<body>
<table align="center" >
<tr><td align="center">link enciphering</td></tr>
<form method=post>
<tr><td align="center"><br>
<input name="type" type="radio" value="0" checked>enciphering
<input name="type" type="radio" value="1" checked>deenciphering
</td></tr>
<tr>
<td >
<input type=input name="linkk" size=48>
<input type=input name=datafromuser size=48 value="<? echo $otvet;?> " ></td></tr>
<br>
<tr><td align="center"><br><input type="submit" value="[enciphering-deenciphering]" style="width:608px;">
</form>
</td></tr>
</body>
</html>
Последний раз редактировалось L I G A; 16.06.2009 в 23:13..
|
|
|
|
 |
|
|
Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
|
|
|
|