Файл: wapmaster/wapmaster/scanner/index.php
Строк: 71
<?php
include_once '../../sys/inc/start.php';
include_once '../../sys/inc/compress.php';
include_once '../../sys/inc/sess.php';
include_once '../../sys/inc/home.php';
include_once '../../sys/inc/settings.php';
include_once '../../sys/inc/db_connect.php';
include_once '../../sys/inc/ipua.php';
include_once '../../sys/inc/fnc.php';
include_once '../../sys/inc/user.php';
$set['title']='Сканер сайтов';
include_once '../../sys/inc/thead.php';
title();
err();
//aut();
$fe = str_replace ("http://", "", $home);
$arand = rand(0, 99999);
switch ($_GET["s"])
{
case 'scan':
$f = stripslashes(trim($_POST["url"]));
$input = htmlspecialchars(stripslashes(trim($_POST["input"])));
$file = @file_get_contents($f);
if (!$f)
{
echo "Вы не ввели адрес - <a href="index.php">Еще раз";
}else{
$url = str_replace("https", "http", $f);
if(!preg_match('#^(http://){1}[-a-z0-9_.]+[-a-z0-9_.]+[_-a-Z0-9.]?#i', $url))
{
echo "Адрес имеет не верный формат! Адрес может начинаться только с http://";
}else{
echo "Код:<br />";
if ($input == "yes")
{
}else{
echo "<form action="index.php?s=scanage" method="post">";
}
echo "<textarea cols="50" rows="30" name="age">$file</textarea><br />";
if ($input == "yes")
{
$fo = fopen ("files/$arand.txt", "w+");
$str = "$file";
fputs ($fo,$file);
echo "<a href="files/$arand.txt">Скачать txt</a>";
}else{
echo "<input type="submit" value="Сохранить txt">";
echo "</form>";
}
}
}
break;
case 'scanage':
$age = stripslashes(trim($_POST["age"]));
$fo = fopen ("files/$arand.txt", "w+");
$str = "$age";
fputs ($fo,$age);
echo "Код:";
echo "<textarea cols="50" rows="30" name="age">$age</textarea><br />";
echo "<a href="files/$arand.txt">Скачать txt</a>";
break;
default:
echo "Сканер сайтов:<br />";
echo "
<form action="index.php?s=scan" method="post">
Адрес:<br />
<input type="text" name="url" value="http://"><br />
Сохранить в файл
<input type="checkbox" name="input" value="yes"><br />
<input type="submit" value="Сканировать">
</form>
";
break;
}
echo '<br /><a href="/wapmaster/">В раздел</a><br/>';
include_once '../../sys/inc/tfoot.php';
?>