PDA

View Full Version : ok i know this is a real dumb question....


Atian
03-27-2002, 10:57 AM
how do i insert hacks to my board?
i am a newbie at php and stuff,i got alot of scripts,
but i dont know how to insert them,
can someone tell me?

Elanor
03-27-2002, 11:14 AM
Just take a look at the instructions that are written in the txt files. Most of them say: Open file xxx.php - find code 'bla bla this' and replace it with 'bla bla that'. It's just a 'copy n' paste' work.
And always keep a copy of your original file in case you did something wrong.
For practise you should try it with some simple hacks first (which need only little modifications to the files).

TECK
03-27-2002, 11:33 AM
Atian, what makes this community different from other BB's is that we help eachothers. dont feel shy to ask. if you dont get the answer rightaway, be patient, one of us will help u.. for sure.

as for your prob, follow those rules:
- backup ur files always (as elanor said).
- make sure you know what php and mysql version your host is running.
- read carefully the install files and make sure you understand what exacly must be modified. (do not modify nothing if you are not sure, ask in the forums your question, in the thread the hacker opened, to get support)
- since you claim not to have alot experience in php and mysql, start with simple hacks. soon you will understand the mechanism and be able to install more complex ones.
- if possible, install a test board, where you test your hack there. if everything is ok, aply it to the live one. contact your host if they can add a "test" mysql database on your server and install your test board there.
- always double check everything you hack. a dot extra could make a huge difference.

regards,
nakkid.

Atian
03-27-2002, 11:39 AM
ok,what do i do for example if i want to insert this hack


<?php
$usergroupida = 6 ;
$usergroupidb = 7 ;
$usergroupidc = 5 ;
if(!isset($PHP_AUTH_USER)) {
header("WWW-Authenticate: Basic realm=\"Karma Login\"");
header("HTTP/1.0 401 Unauthorized");
echo "Sorry no instant windows network login cancel authority allowed\n";
exit;
} else {
$link = mysql_connect("localhost", "peerbooks_zack", "rpm123123") //mysql server address , login name , password
or die ("Could not connect");
print ("Connected successfully");
echo "<br>";
mysql_select_db ("ffu_vb") //this shouldn't need changing unless you have it in a different database
or die ("Could not select database");

$query = ("SELECT password FROM user WHERE username='$PHP_AUTH_USER'");
$result = mysql_query ($query)
or die ("Query failed");
while ($line = mysql_fetch_array($result)) {
while(list($col_name, $col_value) = each($line)) {
$password = $col_value ;
}
}
if ($password != $PHP_AUTH_PW) {
echo "You must enter a valid login ID and password to access this
resource\n";
exit;
}
else {
mysql_free_result ($result);
$query = "SELECT usergroupid FROM user WHERE username='$PHP_AUTH_USER'";
$result = mysql_query ($query)
or die ("Query failed");
while ($line = mysql_fetch_array($result)) {
while(list($col_name, $col_value) = each($line)) {
$turkpower = $col_value ;
}
}
}
mysql_free_result ($result);
if ($turkpower = 1) {
echo "You are not permitted to do this action. Please go back.\n";
exit;
}
else {
if ($turkpower = 2) {
echo "You are not permitted to do this action. Please go back.\n";
exit;
}
else {
if ($turkpower = 3) {
echo "You are not permitted to do this action. Please go back.\n";
exit;
}
else {
if ($turkpower = 4) {
echo "You are not permitted to do this action. Please go back.\n";
exit;
}
else {
if ($turkpower = 5) {
echo "</p>Welcome: $PHP_AUTH_USER<br>";
}
}
mysql_close ($link);
echo "<form action=\"karma2.php\" method=\"post\">";
echo "<input type=\"hidden\" name=\"auth\" value=\"'yes'\">";
echo "<input type=\"text\" name=\"username\"><br>";
echo "<input type=\"submit\">";
echo "</form>";
}
else {
if ($turkpower = 6) {
echo "</p>Welcome: $PHP_AUTH_USER<br>";
}
}
mysql_close ($link);
echo "<form action=\"karma2.php\" method=\"post\">";
echo "<input type=\"hidden\" name=\"auth\" value=\"'yes'\">";
echo "<input type=\"text\" name=\"username\"><br>";
echo "<input type=\"submit\">";
echo "</form>";
}
else {
if ($turkpower = 6) {
echo "</p>Welcome: $PHP_AUTH_USER<br>";
}
}
mysql_close ($link);
echo "<form action=\"karma2.php\" method=\"post\">";
echo "<input type=\"hidden\" name=\"auth\" value=\"'yes'\">";
echo "<input type=\"text\" name=\"username\"><br>";
echo "<input type=\"submit\">";
echo "</form>";
}
?>