Вход Регистрация
Файл: WM-Koder/page/21/scanner/index.php
Строк: 40
<?php

require '../../../system/sid.php';
require 
'../../../system/config.php';
include 
'../../../system/user.php';
include 
'../../../system/head.php';

whorm(0, 'work');

echo 
$div_title . 'Сканнер сайтов' . $div_end;
echo 
'<div class="menu">';
$fe = str_replace('http://', '', $home);
$arand = mt_rand(0, 99999);

$s = isset($_GET['s']) ? $_GET['s'] : NULL;

switch(
$s)
{
case 
scan:
$f = stripslashes(trim($_POST['url']));
$input = htmlspecialchars(stripslashes(trim($_POST['input'])));
$file = @file_get_contents($f);
if (!
$f)
{
err('Вы не ввели адрес');
} else {
$url = str_replace('https', 'http', $f);
if (!
preg_match('#^(http://){1}[-a-z0-9_.]+[-a-z0-9_.]+[_-a-Z0-9.]?#i', $url))
{
err('Адрес имеет не верный формат! Адрес может начинаться только с 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"/>
      </form>'
;
}
}
}
break;

case 
scanage:
$age = stripslashes(trim($_POST['age']));
$fo = fopen('files/' . $arand . '.txt', 'w+');
$str = $age;
fputs($fo, $age);

echo 
'Код:<textarea cols="50" rows="30" name="age">' . $age . '</textarea><br/>
      <a href="files/' 
. $arand . '.txt">Скачать txt</a>';
break;

default:
echo 
'<form action="index.php?s=scan" method="post">
      <label>Адрес:</label><br/>
      <input type="text" name="url" value="http://"><br/>
      <label>Сохранить в файл</label>&nbsp;
      <input type="checkbox" name="input" value="yes"><br/>
      <input type="submit" value="Сканировать"/>
      </form>'
;
break;
}
echo 
'</div><div class="menu"><a class="ssyl2" href="/page/21/">В раздел</a></div>';
include 
'../../../system/foot.php';
?>
Онлайн: 0
Реклама