Results 1 to 7 of 7
Like Tree3Likes
  • 1 Post By ozziemale31
  • 2 Post By ozziemale31

Thread: php scanner

  1. #1
    Senior Member ozziemale31's Avatar
    Join Date
    Jan 2007
    Location
    Sydney Australia
    Posts
    817
    Thanks
    27
    Thanked 264 Times in 90 Posts
    Rep Power
    0

    Default re

    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..


  2. #2
    Senior Member Ghost's Avatar
    Join Date
    Jan 2007
    Location
    Cardiff, Wales
    Posts
    295
    Thanks
    12
    Thanked 138 Times in 37 Posts
    Rep Power
    0

    Default

    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!!';
    }
    ?>

  3. #3
    Senior Member ozziemale31's Avatar
    Join Date
    Jan 2007
    Location
    Sydney Australia
    Posts
    817
    Thanks
    27
    Thanked 264 Times in 90 Posts
    Rep Power
    0

    Default re

    Quote Originally Posted by Ghost [Only registered and activated users can see links. Click Here To Register...]
    sounds interesting. care to share your findings?
    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 myown







    Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer..


  4. #4
    Senior Member Ghost's Avatar
    Join Date
    Jan 2007
    Location
    Cardiff, Wales
    Posts
    295
    Thanks
    12
    Thanked 138 Times in 37 Posts
    Rep Power
    0

    Default

    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!!';
    }
    ?>

  5. #5
    Senior Member ozziemale31's Avatar
    Join Date
    Jan 2007
    Location
    Sydney Australia
    Posts
    817
    Thanks
    27
    Thanked 264 Times in 90 Posts
    Rep Power
    0

    Default re

    Quote Originally Posted by Shannon388 [Only registered and activated users can see links. Click Here To Register...]
    sounds interesting. care to share your findings?

    [PHP]
    hi mate i got a soloution for that code

    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>";
    }
    ?>
    Added after 17 minutes:

    i also found by using

    PHP 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>";
    }
    ?>
    will return a list in alphabetical order

    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.
    Ghost likes this.







    Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer..


  6. The Following User Says Thank You to ozziemale31 For This Useful Post:

    Ghost (13-07-12)

  7. #6
    Senior Member ozziemale31's Avatar
    Join Date
    Jan 2007
    Location
    Sydney Australia
    Posts
    817
    Thanks
    27
    Thanked 264 Times in 90 Posts
    Rep Power
    0

    Default

    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 />&copy; copyright 2012 &copy;<br />All Rights Reserved</font>";
    echo 
    "</body>";
        echo 
    "</html>";
    ?>
    Ghost and asifnayem like this.







    Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer..


  8. The Following User Says Thank You to ozziemale31 For This Useful Post:

    Ghost (13-07-12)

  9. #7
    Senior Member Ghost's Avatar
    Join Date
    Jan 2007
    Location
    Cardiff, Wales
    Posts
    295
    Thanks
    12
    Thanked 138 Times in 37 Posts
    Rep Power
    0

    Default

    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!!';
    }
    ?>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. System Scanner Shell script
    By redrdx in forum Scripts Forum
    Replies: 0
    Last Post: 10-08-11, 10:51
  2. Host Scanner
    By i0nutzxp in forum Scripts Forum
    Replies: 1
    Last Post: 04-09-10, 17:05
  3. TraceYahoo - Yahoo Invisible Checker Scanner Tracer
    By opticalpigion in forum Sites / Links
    Replies: 0
    Last Post: 14-06-10, 07:15
  4. Yahoo/Hi5 Scanner
    By kiss in forum Site / Script testing and error fixing
    Replies: 1
    Last Post: 11-10-09, 14:47

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19