sounds interesting. care to share your findings?
hi guys im wondern if anyone has or is willing to share a php script that will do the following....
1)scan sub folders for rogue pages or file extenstions
2)have an exclude list so these files dont show in the scan
3)must be in php format
ie so if i use the script to scan images folder it will return any extensions showing .txt .html .php in that folder
i think if it can be modded to suit lava it will be good to modify such a script to run on a server to
check for rogue files hackers try uploading
...................... any input on this will be appreciated i been googlen but not found much
Added after 58 minutes:
dont worry i found the answer i needed it works
![]()
Last edited by ozziemale31; 12-07-12 at 05:20.
Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer..
sounds interesting. care to share your findings?
<?php
include ('Ghost');
if ($Post == true) {
echo '
alt='coding-talk.com!!' />';
echo 'Sharing Is Caring!';
} else {
echo '
alt='the username GHOST has been comprimised!' />';
echo 'OMG SOMEBODY HELP ME!!';
}
?>
i was looking at modifyn the scanner code used in johncms440 script it pics up rogue php and html files while using an exclude list at same time im studying the scandir function to see if can make myownOriginally Posted by Ghost [Only registered and activated users can see links. Click Here To Register...]
Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer..
cool. may look into this at some point when i get some spare time.
its interesting.
<?php
include ('Ghost');
if ($Post == true) {
echo '
alt='coding-talk.com!!' />';
echo 'Sharing Is Caring!';
} else {
echo '
alt='the username GHOST has been comprimised!' />';
echo 'OMG SOMEBODY HELP ME!!';
}
?>
Originally Posted by Shannon388 [Only registered and activated users can see links. Click Here To Register...]
[PHP]
hi mate i got a soloution for that code
Added after 17 minutes:PHP Code:<?php
$dir = "images/"; //You could add a $_GET to change the directory
$files = scandir($dir);
echo "<list>";
foreach($files as $key => $value){
//////// Add File Extensions To Be Displayed
if(strpos($value, ".php") > 0) {
/////// Return results
echo "".$value."<br/>";
}
echo "</list>";
}
?>
i also found by using
will return a list in alphabetical orderPHP Code:<?php
$dir = "images/"; //You could add a $_GET to change the directory
$files = scandir($dir);
echo "<list>";
foreach($files as $key => $value){
if(strpos($value, ".png") > 0) {
echo "".$value."<br/>";
}
if(strpos($value, ".php") > 0) {
echo "".$value."<br/>";
}
if(strpos($value, ".txt") > 0) {
echo "".$value."<br/>";
}
echo "</list>";
}
?>
like eg:
11.php
acdc.txt
bank.png
blueribbon.png
book.png
forum.png
greenribbon.png
news.png
pokes.png
poll.png
reputation.png
search.png
test.txt
wall_icon.png
warning.png
yellowribbon.png
Added after 15 minutes:
Last edited by ozziemale31; 13-07-12 at 13:42.
Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer..
Ghost (13-07-12)
another version ive done using style sheet
PHP Code:<?php
/*
--------------------------------------
Shell Scanner Script
By Ozziemale
--------------------------------------
*/
header("Content-type: text/html; charset=ISO-8859-1");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
?>
<meta name="description" content="www.m-zonez.net" />
<meta name="keywords" content="free downloads and more for your phone " />
<link rel="shortcut icon" href="images/favicon.ico" />
<link rel="icon" href="images/favicon.gif" type="image/gif" />
<?php
echo "<head>";
echo "<title>Error!!!</title>";
echo "<style type=\"text/css\">
* {
margin: 0;
padding: 0;
}
/*
Css Style by
Rampage
Default Theme
*/
body {
color : #FFFFFF;
font-size : 12px;
font-family : arial;
background-color : #000000;
max-width : 640px;
max-height : 75px;
margin : auto;
}
<!-- Script By Rampage -->
</style>";
echo "<head>";
echo "<title>Data Base Error!</title>";
echo "</head>";
echo "<body>";
?>
<?php
$dir = "images/"; //You could add a $_GET to change the directory
$files = scandir($dir);
echo "<font color=\"#00CC00\">------------------------------------------------<br /></font>";
echo "<font color=\"#00CC00\">Shell Scanner V.1 By Ozziemale31<br /></font>";
echo "<font color=\"#00CC00\">------------------------------------------------<br /></font>";
echo "<list><center>";
foreach($files as $key => $value){
if(strpos($value, ".php") > 0) {
echo "<font color=\"#00CC00\"><strong>Possible Shell Script:</strong> </font><font color=\"#FF0000\">".$value."</font><br/>";
}
if(strpos($value, ".php4") > 0) {
echo "<font color=\"#00CC00\"><strong>Possible Shell Script:</strong> </font><font color=\"#FF0000\">".$value."</font><br/>";
}
if(strpos($value, ".php5") > 0) {
echo "<font color=\"#00CC00\"><strong>Possible Shell Script:</strong> </font><font color=\"#FF0000\">".$value."</font><br/>";
}
if(strpos($value, ".asp") > 0) {
echo "<font color=\"#00CC00\"><strong>Possible Shell Script:</strong> </font><font color=\"#FF0000\">".$value."</font><br/>";
}
if(strpos($value, "php.jpg") > 0) {
echo "<font color=\"#00CC00\"><strong>Possible Shell Script:</strong> </font><font color=\"#FF0000\">".$value."</font><br/>";
}
if(strpos($value, "php.gif") > 0) {
echo "<font color=\"#00CC00\"><strong>Possible Shell Script:</strong> </font><font color=\"#FF0000\">".$value."</font><br/>";
}
if(strpos($value, ".xhtml") > 0) {
echo "<font color=\"#00CC00\"><strong>Possible Shell Script:</strong> </font><font color=\"#FF0000\">".$value."</font><br/>";
}
if(strpos($value, ".cgi") > 0) {
echo "<font color=\"#00CC00\"><strong>Possible Shell Script:</strong> </font><font color=\"#FF0000\">".$value."</font><br/>";
}
if(strpos($value, ".wml") > 0) {
echo "<font color=\"#00CC00\"><strong>Possible Shell Script:</strong> </font><font color=\"#FF0000\">".$value."</font><br/>";
}
if(strpos($value, ".txt") > 0) {
echo "<font color=\"#00CC00\"><strong>Possible Shell Script:</strong> </font><font color=\"#FF0000\">".$value."</font><br/>";
}
echo "</list></center>";
}
echo "<font color=\"#00CC00\">------------------------------------------------<br /></font>";
echo "<font color=\"#00CC00\">www.m-zonez.net<br />© copyright 2012 ©<br />All Rights Reserved</font>";
echo "</body>";
echo "</html>";
?>
Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer..
Ghost (13-07-12)
nice work bud, with a little change in it to "know" what files should exist first
and this will be a very handy tools indeed.![]()
<?php
include ('Ghost');
if ($Post == true) {
echo '
alt='coding-talk.com!!' />';
echo 'Sharing Is Caring!';
} else {
echo '
alt='the username GHOST has been comprimised!' />';
echo 'OMG SOMEBODY HELP ME!!';
}
?>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks