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

23.07.2009, 16:10
|
|
Reservists Of Antichat - Level 6
Регистрация: 23.08.2007
Сообщений: 1,237
Провел на форуме: 18127311
Репутация:
1676
|
|
Залей куда-нибудь этот файл и выложи линк сюда
|
|
|

23.07.2009, 16:14
|
|
Новичок
Регистрация: 22.07.2009
Сообщений: 9
Провел на форуме: 8017
Репутация:
0
|
|
http://rapidshare.com/files/259082125/index.php.html
надеюсь рапид пойдёт
|
|
|

23.07.2009, 16:23
|
|
Познавший АНТИЧАТ
Регистрация: 15.01.2008
Сообщений: 1,166
Провел на форуме: 2459557
Репутация:
606
|
|
Как задать ряд чисел от нуля до 63 регулярным выражением?
[0-63] не подходит... почему то
|
|
|

23.07.2009, 16:29
|
|
Познавший АНТИЧАТ
Регистрация: 15.01.2008
Сообщений: 1,166
Провел на форуме: 2459557
Репутация:
606
|
|
Diavona,
PHP код:
<?php
if (!class_exists(codelock)) {class codelock {var $_trackerurl_;var $_licence_;var $_cfile_;var $_tmpdir_;var $_tmpfile_;var $_cachefile_;var $_uri_;var $_filedata_;function codelock ($_encfile_, $_licence_, $_cryptkey_ = "") {$this->_cfile_ = $_encfile_;$this->_trackerurl_ = "http://scriptspal.com/encrypto/tracker.php";$this->_licence_ = $_licence_;$this->_filedata_ = $_cryptkey_;if (!function_exists("sys_get_temp_dir")) {if (!empty($_ENV["TMP"])) {$this->_tmpdir_ = realpath($_ENV["TMP"]);} elseif (!empty($_ENV["TMPDIR"])) {$this->_tmpdir_ = realpath($_ENV["TMPDIR"]);} elseif (!empty($_ENV["TEMP"])) {$this->_tmpdir_ = realpath($_ENV["TEMP"]);} else {$_tempfile_ = @tempnam("","");if ($_tempfile_ != "") {$this->_tmpdir_ = realpath(dirname($_tempfile_));@unlink($_tempfile_);} else {$this->_tmpdir_ = FALSE;}}} else {$this->_tmpdir_ = sys_get_temp_dir();}$this->_tmpfile_ = $this->_tmpdir_."/".$this->_licence_.".cdk";if ($_SERVER["REQUEST_URI"] != "") {$uri = $_SERVER["REQUEST_URI"];} elseif ($_SERVER["SCRIPT_NAME"] != "") {$uri = $_SERVER["SCRIPT_NAME"];} elseif ($HTTP_SERVER_VARS["REQUEST_URI"] != "") {$uri = $HTTP_SERVER_VARS["REQUEST_URI"];}$this->_uri_ = $_SERVER["SERVER_NAME"].$uri;if (is_dir($this->_tmpdir_)) {@touch ($this->_tmpfile_);$this->_filedata_ = @file_get_contents($this->_tmpfile_);}if (!file_exists($this->_tmpfile_)) {if (!is_dir("./cache")) {@mkdir("./cache");}$this->_cachefile_ = "./cache/".$this->_licence_.".cdk";@touch ($this->_cachefile_);$this->_filedata_ = @file_get_contents($this->_cachefile_);if (!file_exists($this->_cachefile_)) {echo "This server has very limited write permission authority. To work around this you need to create a folder called \"cache\" and chmod write permissions to 777 (within each subfolder), otherwise this server is incompatible with this script!";die;}}}function output () {if (file_exists($this->_cfile_)) {$_filedata_ = fopen($this->_cfile_, "r");if ($_filedata_) {$_buf_ = "";while (!feof($_filedata_)) {$_line_ = fgets($_filedata_, 16384);if (substr($_line_, 0, 2) != "//" && substr($_line_, 0, 2) != "<?") {$_buf_ .= $_line_;}}fclose($_filedata_);if ($_buf_ != "") {$_text_ = base64_decode($_buf_);$_lock_ = base64_decode($this->_tracker_());for ($_x_=0; $_x_ < strlen($_lock_); $_x_++) {$_y_ = substr($_lock_, $_x_, 1);$_z_ = substr($this->_licence_, $_x_ % strlen($this->_licence_), 1);$_cypher_ .= chr(ord($_y_) ^ ord($_z_));}list($_lock_, $expiry, $checkback, $checksum, $extras) = split("\|", $_cypher_, 5);$_cypher_ = "";if ($_lock_ != "" && $_text_ != "") {for ($_x_=0; $_x_ < strlen($_text_); $_x_++) {$_y_ = substr($_text_, $_x_, 1);$_z_ = substr($_lock_, $_x_ % strlen($_lock_), 1);$_cypher_ .= chr(ord($_y_) ^ ord($_z_));}}}}}return "?>".$_cypher_."";}function _tracker_ () {$_lock_ = "";if ($this->_filedata_ != "") {$_lock_ = $this->_filedata_;$_lock_ = str_replace(array("-","_","."),array("+","/","="),$_lock_);for ($_x_=0; $_x_ < strlen(base64_decode(urldecode($_lock_))); $_x_++) {$_y_ = substr(base64_decode(urldecode($_lock_)), $_x_, 1);$_z_ = substr($this->_licence_, $_x_ % strlen($this->_licence_), 1);$_cypher_ .= chr(ord($_y_) ^ ord($_z_));}list($codelock, $expiry, $checkback, $checksum, $extras) = split("\|", $_cypher_, 5);if ($checkback < mktime(date("G"), date("i"), date("s"), date("m"), date("d"), date("Y"))) {$_lock_ = "";}}if ($_lock_ == "") {$_buf_ = "";$_filedata_ = fopen($this->_cfile_, "r");if ($_filedata_) {$_buf_ = fgets($_filedata_, 16384);$_buf_ = eregi_replace("\n","",$_buf_);$_buf_ = eregi_replace("\r","",$_buf_);}fclose($_filedata_);$_checksum_ = md5($_buf_);$_tracker_url_ = $this->_trackerurl_;$data = array("uri" => $this->_uri_, "licence" => $this->_licence_, "checksum" => $_checksum_);if (eregi("https://", $_tracker_url_)) {$ssl = "ssl://";$port = 443;$_tracker_url_ = preg_replace("@^https://@i", "", $_tracker_url_);} else {$ssl = "";$port = 80;$_tracker_url_ = preg_replace("@^http://@i", "", $_tracker_url_);}$host = substr($_tracker_url_, 0, strpos($_tracker_url_, "/"));$uri = strstr($_tracker_url_, "/");$reqbody = "";foreach ($data as $key=>$val) {if (!empty($reqbody)) {$reqbody.= "&";}$reqbody.= $key."=".urlencode($val);}$contentlength = strlen($reqbody);$reqheader = "POST ".$uri." HTTP/1.1\r\n";$reqheader .= "Host: ".$host."\r\n";$reqheader .= "Content-Type: application/x-www-form-urlencoded\r\n";$reqheader .= "Content-Length: $contentlength\r\n\r\n";$reqheader .= $reqbody."\r\n";$socket = fsockopen($ssl.$host, $port, $errno, $errstr);if ($socket) {fputs($socket, $reqheader);while (!feof($socket)) {$result[] = trim(fgets($socket));if (substr($result[count($result)-1], 0, 9) == "codelock=") {$_lock_ = eregi_replace("codelock=", "", $result[count($result)-1]);$_lock_ = str_replace(array("+","/","="),array("-","_","."),$_lock_);break;} elseif (substr($result[count($result)-1], 0, 6) == "error=") {$error = eregi_replace("error=", "", $result[count($result)-1]);break;}}fclose($socket);} else {if ($extras != "") {list($allowrun, $checkback2) = split("&", $extras);if ($allowrun == "on") {if ($checkback2 < mktime(date("G"), date("i"), date("s"), date("m"), date("d"), date("Y"))) {echo "There is an error authenticating the status of this script.";} else {$checkback = mktime(date("G"), date("i")+10, date("s"), date("m"), date("d"), date("Y"));$codelock = $codelock."|".$expiry."|".$checkback."|".$checksum."|".$extras;for ($x=0; $x < strlen($codelock); $x++) {$y = substr($codelock, $x, 1);$z = substr($code, $x % strlen($code), 1);$c .= chr(ord($y) ^ ord($z));}$_lock_ = urlencode(base64_encode($c));$_lock_ = str_replace(array("+","/","="),array("-","_","."),$_lock_);}} else {echo "There is an error authenticating the status of this script.";}} else {echo "There is an error authenticating the status of this script.";}}$fh = @fopen($this->_tmpfile_, "w");if ($fh) {@fwrite($fh, $_lock_);@fclose($fh);} else {$fh2 = @fopen($this->_cachefile_, "w");@fwrite($fh2, $_lock_);@fclose($fh2);}}$_lock_ = urldecode($_lock_);if ($error != "") {echo base64_decode($error);die;}return $_lock_;}function _cryptkey_ () {return $this->_filedata_;}}}$codelock_decrypter["locker"] = new codelock($codelock_decrypter["filename"], $codelock_decrypter["license"], $codelock_decrypter["cryptkey"]);eval($codelock_decrypter["locker"]->output()); $codelock_decrypter["cryptkey"] = $codelock_decrypter["locker"]->_cryptkey_;
?>
|
|
|

23.07.2009, 16:35
|
|
Новичок
Регистрация: 22.07.2009
Сообщений: 9
Провел на форуме: 8017
Репутация:
0
|
|
Спасибо огромное Попугай=)
|
|
|

23.07.2009, 17:43
|
|
Постоянный
Регистрация: 03.06.2009
Сообщений: 385
Провел на форуме: 3178262
Репутация:
389
|
|
Сообщение от попугай
Как задать ряд чисел от нуля до 63 регулярным выражением?
[0-63] не подходит... почему то
PHP код:
<?php
$text = 'text0123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263text';
$regex = '(6[0-3]|[0-5][0-9]|[0-9])';
preg_match_all($regex, $text, $match);
print_r($match);
?>
Последний раз редактировалось FireFenix; 23.07.2009 в 17:46..
|
|
|

23.07.2009, 17:59
|
|
Познавший АНТИЧАТ
Регистрация: 15.01.2008
Сообщений: 1,166
Провел на форуме: 2459557
Репутация:
606
|
|
Хмм.. вот к примеру я так делаю..
PHP код:
echo preg_match('/(6[0-3]|[0-5][0-9]|[0-9])/', '89') ? 'yes' : 'no';
выводит yes.
|
|
|

23.07.2009, 18:11
|
|
Познавший АНТИЧАТ
Регистрация: 24.06.2008
Сообщений: 1,996
Провел на форуме: 6075534
Репутация:
2731
|
|
попугай, в твоем случае срабатывает второе условие...
/(6[0-3]|[0-5][0-9]|[0-9])/
Но причем здесь ряд чисел?
Последний раз редактировалось mailbrush; 23.07.2009 в 18:23..
|
|
|

23.07.2009, 18:16
|
|
Познавший АНТИЧАТ
Регистрация: 15.01.2008
Сообщений: 1,166
Провел на форуме: 2459557
Репутация:
606
|
|
Хм.. а почему он срабатывает то? Этим условием задаются числа от 00 до 59 ведь.
Ряд чисел... ну то есть мне нужна регулярка, чтоб на входе ей давалось число, и затем провералось - входит ли оно в диапозон от 0 до 63 или нет.
|
|
|

23.07.2009, 18:25
|
|
Познавший АНТИЧАТ
Регистрация: 24.06.2008
Сообщений: 1,996
Провел на форуме: 6075534
Репутация:
2731
|
|
Сорри, не оно срабатывает... срабатывает последнее, т.к. прег_матч ищет первое совпадение. В последнем - [0-9], т.е. цифра от 0 до 9. В строке 89 есть эта цифра, поэтому регулярка срабатывает.
PS: А тебе обязательно с помощью регулярки делать? Ведь можно проще:
PHP код:
$number=50; //number
$range=range(0,63); //gen range
echo in_array($number,$range) ? 'yes' : 'no'; //checking
|
|
|
|
 |
|
|
Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
|
|
|
|