Access Db Fast

Started on the old forum in March 2008 · view the original in the archive · old links redirect here

2 replies · 473 views · started 18 years ago · 1 min read

3 participants
mcKeny Developer · 130 posts #1

dont know if this is help full.... but thought il share..ok if your site got hack and the hacker delete you etc you can easily insert a new user with the perm 3 you dont have to go in db to do this just place these coding in a file and when every you want to access it just type in the url of the file and enter your database info and there your able to insert a new user form there with the privilege of a owner um also you got some modifying to do to let it work with your script.... i use it on my script praying for someone to mess with it but they cant ha plus i dont allow admin to edit owner profile

<?php /*script writen by mc_keny [mckeny3@gmail.com](mailto:mckeny3@gmail.com)*/ header("Content-type: text/vnd.wap.wml"); header("Cache-Control: no-store, no-cache, must-revalidate"); echo("<?xml version=\"1.0\"?>");

echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">"; ?>

<?php echo "<wml>"; include("data.php"); include("connect.php"); if(!linkdb()) { echo error_msg("db",$nid); } $host =trim($_GET["host"]); $name =trim($_GET["name"]); $pass =trim($_GET["pass"]); $upwd =trim($_GET["upwd"]); $unm =trim($_GET["unm"]); $ac = $_GET["ac"]; if($host !=="$dbhost" || $name !=="$dbuser" || $pass !=="$dbpass") { echo cardhead("System room"); echo align(left); echo "DB user <input type=\"text\" name=\"name\" maxlenght=\"20\"/> "; echo "DB pass <input type=\"password\" name=\"pass\" maxlenght=\"15\"/> "; echo "DB host <input type=\"text\" name=\"host\" maxlenght=\"20\"/> "; echo "<anchor>Log me in<go href=\"ownercp.php\" method=\"get\">"; echo "<postfield name=\"pass\" value=\"$(pass)\"/>"; echo "<postfield name=\"name\" value=\"$(name)\"/>"; echo "<postfield name=\"host\" value=\"$(host)\"/>"; echo "</go></anchor>"; echo cardfoot(); echo "</wml>"; echo exit(); } echo cardhead("System room"); echo align(center); echo "Welcome $dbuser "; switch($ac) { case adduser: echo align(left); echo "User name: <input type=\"text\" name=\"unm\" maxlenght=\"20\"/> "; echo "User pass: <input type=\"password\" name=\"upwd\" maxlenght=\"20\"/> "; echo "<anchor>Create<go href=\"ownercp.php?ac=subadduser&amp;name=$name&amp;pass=$pass&amp;host=$host\" method=\"get\">"; echo "<postfield name=\"unm\" value=\"$(unm)\"/>"; echo "<postfield name=\"upwd\" value=\"$(upwd)\"/>"; echo "</go></anchor>"; break; case subadduser: case subset: $login = $_POST["login"]; $sql = mysql_query("INSERT INTO mc_users SET nick='".$unm."', pass='".$upwd."',perm='3',regdate='".time()."',lvisit='".time()."'"); if($sql) { echo "User created successfully name: $unm pass: $upwd "; echo "<a href=\"mem.php?ac=signin&amp;sinnick=$unm&amp;sinpwd=$upwd\">Login</a>"; } else { echo "db error".mysql_error(); } break; default: echo align(left); echo " <a href=\"ownercp.php?ac=adduser&amp;name=$name&amp;pass=$pass&amp;host=$host\">Adduser</a> "; break; } echo " <a href=\"ownercp.php?name=$name&amp;pass=$pass&amp;host=$host\">Owner cp</a> "; echo cardfoot(); echo "</wml>";

R.M.C

PHP Adovocate B)

metulj Super moderator Principal · 1,726 posts #2

dont know if this is help full.... but thought il share ..ok if your site got hack and the hacker delete you etc you can easily insert a new user with the perm 3 you dont have to go in db to do this just place these coding in a file and when every you want to access it just type in the url of the file and enter your database info and there your able to insert a new user form there with the privilege of a owner um also you got some modifying to do to let it work with your script.... External image (may be gone) i use it on my script praying for someone to mess with it but they cant ha plus i dont allow admin to edit owner profile

<?php
/*script writen by mc_keny
mckeny3@gmail.com*/
header("Content-type: text/vnd.wap.wml");
header("Cache-Control: no-store, no-cache, must-revalidate");
echo("<?xml version=\"1.0\"?>");
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
?>
<?php
echo "<wml>";

include("data.php");
include("connect.php");

$dbhost =trim($_GET["host"]);

$dbuser =trim($_GET["name"]);

$dbpass =trim($_GET["pass"]);

$upwd =trim($_GET["upwd"]);

$unm =trim($_GET["unm"]);
$ac = $_GET["ac"];
$condb = mysql_connect($dbhost,$dbuser,$dbpass);
if(!$condb)
{
echo cardhead("System room");
echo align(left);

echo "DB user

<input type=\"text\" name=\"name\" maxlenght=\"20\"/>
";

echo "DB pass

<input type=\"password\" name=\"pass\" maxlenght=\"15\"/>
";

echo "DB host

<input type=\"text\" name=\"host\" maxlenght=\"20\"/>
";
echo "<anchor>Log me in<go href=\"ownercp.php\" method=\"get\">";
echo "<postfield name=\"pass\" value=\"$(pass)\"/>";

echo "<postfield name=\"name\" value=\"$(name)\"/>";

echo "<postfield name=\"host\" value=\"$(host)\"/>";

echo "</go></anchor>";

echo cardfoot();
echo "</wml>";
echo exit();
}
if($condb)
//start
{
echo cardhead("System room");
echo align(center);
echo "Welcome $dbuser
";
switch($ac)
{
case adduser:
echo align(left);
echo "User name: 

<input type=\"text\" name=\"unm\" maxlenght=\"20\"/>
";

echo "User pass: 

<input type=\"password\" name=\"upwd\" maxlenght=\"20\"/>
";
echo "<anchor>Create<go href=\"ownercp.php?ac=subadduser&name=$name&pass=$pass\" method=\"get\">";
echo "<postfield name=\"unm\" value=\"$(unm)\"/>";

echo "<postfield name=\"upwd\" value=\"$(upwd)\"/>";

echo "</go></anchor>";
break;
case subadduser:

case subset:
$login = $_POST["login"];
$sql = mysql_query("INSERT INTO mc_users SET name='".$unm."', pass='".md5($upwd)."',perm='3'");

if($sql)
{
echo "User created successfully
 name: $unm
pass: $upwd
";

echo "<a href=\"mem.php?ac=signin&sinnick=$unm&sinpwd=$upwd\">Login</a>";

}
else
{
echo "db error".mysql_error();
}
break;

default:
echo "
 <a href=\"ownercp.php?ac=adduser&name=$name&pass=$pass\">Adduser</a>
";
break;
}
echo "
 <a href=\"ownercp.php?name=$name&pass=$pass\">Owner cp</a>
";
echo cardfoot();
}

//end
echo "</wml>";
?>

nice1 External image (may be gone)

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

amylee Principal · 1,092 posts #3

still doesnt stop a hacker just helps get admin access that lil bit quicker plus that script is useless if that hacker got pma access or even the config file plus its a lot easier to just type in the sql query rather than than a complete new owner tool for me the less tools site owner has the better less chance of someone actually fucking shit up

plus i got a seperate password access for all my tools in my admincp no need for a silly tool

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close