paswords on cp tools and on owner tools wapdesire v2

Started on the old forum in September 2010 · view the original in the archive · old links redirect here

12 replies · 2,102 views · started 16 years ago · 1 min read

TL;DR · summary of 12 replies
  • Reply by floyd: tried it, it worked fine for the first login but now just keeps coming up with a blank password after i log in can you help me furthe on this please and thanks.
  • Reply by something else: Try renaming "pass" to something else like "adminpass".
  • Reply by floyd: It works fine mate for the first time then when I come out my tools and go to go back in and insert password again it just hangs on the password screen and blanks the password tab.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

6 participants
floyd Junior · 15 posts #1

can someone please help to password protect the tools within the wapdesire v2 script the tools are set up like this :-

<?php define('WCS',true); include('../core/main.inc'); header_type(); cleardata(); if(ipbanned(ip(),browser())){ if(!shield(getuid_sid($sid))){ echo head_tag("Ip Blocked!!!",0,0); echo ipbanned_msg(); echo foot_tag(); exit(); } } if(!islogged($sid)){ echo head_tag("Error!!!",0,0); echo session_expired(); echo foot_tag(); exit(); } if(banned(getuid_sid($sid))){ echo head_tag("Error!!!",1,getnick_sid($sid)); echo banned_msg($sid); echo foot_tag(); exit(); } mysql_query("UPDATE users SET browser='".browser()."', ipaddress='".ip()."', host='".subno()."' WHERE id='".getuid_sid($sid)."'"); /////////////////////////TOOLS///////////////////////// addonline(getuid_sid($sid),"Admin Tools",""); echo head_tag(getnick_sid($sid)." Admin Tools",1,getnick_sid($sid)); $level=mysql_fetch_array(mysql_query("SELECT level FROM users WHERE id='".getuid_sid($sid)."'")); $title="**Admin Tools**"; $main=" \n"; if(use_tools(getuid_sid($sid))){ if($type==tools){ $noi=mysql_fetch_array(mysql_query("SELECT count(*) FROM banned WHERE penalty>'0'")); $main.="<a href=\"./banned.php?sid=$sid\">$noi[0] Banned</a>"; $noi=mysql_fetch_array(mysql_query("SELECT count(*) FROM users WHERE validated='0'")); if(validate(getuid_sid($sid))){ $main.=" \n<a href=\"./validate.php?sid=$sid\">$noi[0] Awaiting Validation</a>"; }else{ $main.=" $noi[0] Awaiting Validation</a>"; } if(site_settings(getuid_sid($sid))){ $main.=" \n<a href=\"./settings.php?sid=$sid\">Site Settings</a>"; }else{ $main.=" Site Settings</a>"; } $main.=" \n<a href=\"./blocked.php?type=site&amp;sid=$sid\">Blocked Sites</a> <a href=\"./blocked.php?type=browser&amp;sid=$sid\">Blocked Browsers</a> <a href=\"./blocked.php?type=ipaddress&amp;sid=$sid\">Blocked Ip-Addresses</a> <a href=\"./blocked.php?type=network&amp;sid=$sid\">Blocked Networks</a>"; if($level[0]>=4){ $main.=" \n<a href=\"./forums.php?sid=$sid\">Forums</a>"; }else{ $main.=" Forums</a>"; } if($level[0]>=4){ $main.=" \n<a href=\"./chat.php?sid=$sid\">Chat</a>"; }else{ $main.=" Chat</a>"; } if($level[0]>=4){ $main.=" \n<a href=\"./groups.php?sid=$sid\">Groups</a>"; }else{ $main.=" Groups</a>"; } if($level[0]>=4){ $main.=" <a href=\"../admin/pmall.php?sid=$sid\">Inbox Members</a> <a href=\"../admin/points.php?sid=$sid\">Add/Subtract Points</a> <a href=\"../smilies/upload.php?sid=$sid\">Add Smilies</a> <a href=\"../smilies/smilies.php?sid=$sid\">Smilies List</a> <a href=\"./delsht.php?sid=$sid\">Delete Shouts</a> <a href=\"./delinboxes.php?sid=$sid\">Delete Inboxes</a> <a href=\"./delpopups.php?sid=$sid\">Delete Popups</a> <a href=\"./dellogs.php?sid=$sid\">Delete Logs</a>"; }else{ $main.=" Add Smilies <a href=\"../smilies/smilies.php?sid=$sid\">Smilies List</a> Delete Inboxes Delete Popups Delete Logs"; } $main.=" <a href=\"./tools.php?type=modtools&amp;sid=$sid\">View Forums/Chatrooms To Moderate</a>"; }else if($type==modtools){ $query=mysql_query("SELECT * FROM modtools WHERE uid='".getuid_sid($sid)."' AND fid>'0' AND clubid='0'"); if(mysql_num_rows($query)>0){ $main.="**Forums To Moderate:**"; while($array=mysql_fetch_array($query)){ $row=mysql_fetch_array(mysql_query("SELECT * FROM forums WHERE id='".$array[fid]."'")); $main.=" ".$row[name].""; } }else{ $main.="No Forums To Moderate!!!"; } $query=mysql_query("SELECT * FROM modtools WHERE uid='".getuid_sid($sid)."' AND rid>'0' AND clubid='0'"); if(mysql_num_rows($query)>0){ $main.="\n **Chatrooms To Moderate:**"; while($array=mysql_fetch_array($query)){ $row=mysql_fetch_array(mysql_query("SELECT * FROM chatrooms WHERE id='".$array[fid]."'")); $main.=" ".$row[name].""; } }else{ $main.=" No Chatrooms To Moderate!!!"; } $query=mysql_query("SELECT * FROM modtools WHERE uid='".getuid_sid($sid)."' AND rid>'0' AND clubid>'0'"); if(mysql_num_rows($query)>0){ $main.="\n **Clubs To Moderate:**"; while($array=mysql_fetch_array($query)){ $row=mysql_fetch_array(mysql_query("SELECT * FROM clubs WHERE id='".$array[clubid]."'")); $main.=" ".$row[name]." Club"; } }else{ $main.=" No Clubs To Moderate!!!"; } $main.=" <a href=\"./tools.php?type=tools&amp;sid=$sid\">Back To Tools</a>"; } }else{ addonline(getuid_sid($sid),"In The Forbidden Zone!",""); $main.="<img src=\"../images/error.gif\" alt=\"x\"/> Permission Denied!\n"; } $main.="\n \n"; $L1="$sixkey<a $key6 href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>"; $L2="$sevenkey<a $key7 href=\"../buds/buds.php?sid=$sid\">BuddyList</a>"; $L3="$eightkey<a $key8 href=\"../chat/public.php?sid=$sid\">Chat</a>"; $L4="$ninekey<a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a>"; $L5="$zerokey<a $key0 href=\"../main.php?sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>"; echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main); ?>

can someone please help me badly need them thanks i also need the edit users tools passworded is there anyone out there that can help me i tried copying them off a lavalair script and modifying them but it kept throwing up a unexpected error in the $end please help and thanks

something else Fellow · 2,296 posts #2

Heres a quick password protecting page that i just made that will work with any php script just place this code before everything else on your page ( including <?php )

<?php
session_start();
$pass = Array();
$pass[] = md5('1st password');  // change to your password
$pass[] = md5('2nd password'); // change to another password
//add more passwords here if u need to
if(!empty($_POST['pass']))
{
$_SESSION['pass'] = md5($_POST['pass']);
}
if(!in_array($_SESSION['pass'],$pass)){
?>
<html>
<head>
<title>Password</title>
</head>
<body>
<form action="<?=$_SERVER['REQUEST_URI']?>" method="post">
<b>Password:</b><br/>
<input type="password" name="pass"><br/>
<input type="submit" value="login">
</form>
</body>
</html>
<?
exit();
}
?>
floyd Junior · 15 posts #3

thanks i will try it but i really need on that logs hack attempts to my sql thanks mate this will help for now i will test it now and let you know 🙂

floyd Junior · 15 posts #4

mate tried it, it worked fine for the first login but now just keeps coming up with a blank password after i log in can you help me furthe on this please and thanks 🙂

something else Fellow · 2,296 posts #5

i just tested it and its working fine for me.... if you are using a magic wand tool to auto login it might have saved a different password for the word "pass" for you site if this is the case try renaming "pass" to something else eg: adminpass

<?php 
session_start(); 
$pass = Array(); 
$pass[] = md5('1st password');  // change to your password 
$pass[] = md5('2nd password'); // change to another password 
//add more passwords here if u need to 
if(!empty($_POST['pass'])) 
{ 
$_SESSION['pass'] = md5($_POST['adminpass']); 
} 
if(!in_array($_SESSION['pass'],$pass)){ 
?> 
<html> 
<head> 
<title>Password</title> 
</head> 
<body> 
<form action="<?=$_SERVER['REQUEST_URI']?>" method="post"> 
<b>Password:</b><br/> 
<input type="password" name="adminpass"><br/> 
<input type="submit" value="login"> 
</form> 
</body> 
</html> 
<? 
exit(); 
} 
?>
floyd Junior · 15 posts #6

it works fine mate for the first time then after that just wont work i will try again mate think its something to do with the session ids have you got the code without them please and i will try them your a star mate and thanks for the help 🙂

Added after 17 minutes:

no mate still the same works great the first time then when i come out my tools and go to go back in and insert password again it just hangs on the password screen and blanks the password tab

floyd Junior · 15 posts #7

heres the one i have been trying to add with the unexpected end in its coded by rampage i think take a look see if you can fix it

<?php define('WCS',true); include('../core/main.inc'); header_type(); cleardata(); if(ipbanned(ip(),browser())){ if(!shield(getuid_sid($sid))){ echo head_tag("Ip Blocked!!!",0,0); echo ipbanned_msg(); echo foot_tag(); exit(); } } if(!islogged($sid)){ echo head_tag("Error!!!",0,0); echo session_expired(); echo foot_tag(); exit(); } if(banned(getuid_sid($sid))){ echo head_tag("Error!!!",1,getnick_sid($sid)); echo banned_msg($sid); echo foot_tag(); exit(); } mysql_query("UPDATE users SET browser='".browser()."', ipaddress='".ip()."', host='".subno()."' WHERE id='".getuid_sid($sid)."'"); /////////////////////////MODERATE USER///////////////////////// else if($action=="ownauth") { addonline($uid,"Doing Important Stuff",""); echo " "; echo "**Please Authenticate Yourself. Enter Password Below:**"; echo " <form action=\"ownertool.php?action=ownerrampage&amp;sid=$sid\" method=\"post\"> <input id=\"inputText\" type=\"password\" name=\"apwd\" format=\"*x\" maxlength=\"35\"/><input id=\"inputButton\" type=\"submit\" value=\"Enter\"/>"; echo "</form> "; echo " "; echo "</body>"; } else if($action=="ownerrampage") { addonline(getuid_sid($sid),"Owner Control Panel",""); $apwd = $_POST["apwd"]; $uid = getuid_sid($sid); $apass = "pass"; // ownerpass change here if(isowner($uid)) { if(($apwd)==($apass)) { echo "***Logged in owner tools sucessfuly!! "; if($edit==1) { addonline(getuid_sid($sid),"Editing User",""); echo head_tag(getnick_sid($sid)."@Edit User",1,getnick_sid($sid)); $title="Edit ".getnick_uid($who)."**"; $trgtperm=mysql_fetch_array(mysql_query("SELECT level FROM users WHERE id='".$who."'")); if($trgtperm[0]>$row_users[level]){ $main=" **<img src=\"../images/error.gif\" alt=\"x\"/>** **Error!!! Permission Denied...** U Cannot Edit ".getnick_uid($who)." <a href=\"../profile.php?who=$who&amp;sid=$sid\">Back To Profile</a> \n"; $L1="$sixkey<a $key6 href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>"; $L2="$sevenkey<a $key7 href=\"../buds/buds.php?sid=$sid\">BuddyList</a>"; $L3="$eightkey<a $key8 href=\"../chat/public.php?sid=$sid\">Chat</a>"; $L4="$ninekey<a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a>"; $L5="$zerokey<a $key0 href=\"../main.php?sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>"; echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main); exit; } if(editusers(getuid_sid($sid))){ $main=" **Edit Tools:** echo "<a href=\"./edituser.php?profile=1&amp;who=$who&amp;sid=$sid\">Profile</a> "; echo "<a href=\"./edituser.php?admintools=1&amp;who=$who&amp;sid=$sid\">Admin Tools</a> \n"; if($trgtperm[0]>0&&$trgtperm[0]!=3){ echo "$main.="<a href=\"./modtools.php?type=Forum&amp;who=$who&amp;sid=$sid\">Mod Forums</a> \n"; } if($trgtperm[0]>=3){ echo "$main.="<a href=\"./modtools.php?type=Chatroom&amp;who=$who&amp;sid=$sid\">Mod Chatrooms</a> \n"; } if(club_tools($who)){ echo "$main.="<a href=\"./modtools.php?type=Club&amp;who=$who&amp;sid=$sid\">Mod Clubs</a> \n"; } }else{ addonline(getuid_sid($sid),"In The Forbidden Zone!",""); echo "$main.=" \n<img src=\"../images/error.gif\" alt=\"x\"/> Permission Denied!\n \n"; } $main.=" <a href=\"./moderate.php?who=$who&amp;sid=$sid\">Back</a> \n"; $L1="$sixkey<a $key6 href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>"; $L2="$sevenkey<a $key7 href=\"../buds/buds.php?sid=$sid\">BuddyList</a>"; $L3="$eightkey<a $key8 href=\"../chat/public.php?sid=$sid\">Chat</a>"; $L4="$ninekey<a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a>"; $L5="$zerokey<a $key0 href=\"../main.php?sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>"; echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main); echo foot_tag(); exit; } addonline(getuid_sid($sid),"Moderating User",""); echo head_tag(getnick_sid($sid)."@Moderate User",1,getnick_sid($sid)); $title="**Moderating ".getnick_uid($who)."**"; $main=" \n"; if(use_tools(getuid_sid($sid))){ $noi=mysql_fetch_array(mysql_query("SELECT count(*) FROM users WHERE validated='0' AND id='".$who."'")); if($noi[0]==1){ echo "$main.="<a href=\"./validate.php?validate=1&amp;who=$who&amp;sid=$sid\">Validate</a> \n"; } if(boot(getuid_sid($sid))){ echo "$main.="<a href=\"./boot.php?who=$who&amp;sid=$sid\">Boot</a> \n"; }else{ $main.="Boot \n"; } if(ban(getuid_sid($sid),$who)){ echo "$main.="<a href=\"./ban.php?who=$who&amp;sid=$sid\">Ban</a> \n"; }else if(!banned($who)){ $main.="Ban \n"; } if(unban(getuid_sid($sid),$who)){ echo "$main.="<a href=\"./unban.php?who=$who&amp;sid=$sid\">Unban</a> \n"; }else if(banned($who)){ $main.="Unban \n"; } /* if(!isshield($who)){ echo "$main.="<a href=\"ownrproc.php?action=shld&amp;sid=$sid&amp;who=$who\">Shield</a> \n"; }else{ echo "$main.="<a href=\"ownrproc.php?action=ushld&amp;sid=$sid&amp;who=$who\">Unshield</a> \n"; } */ if(delete_user(getuid_sid($sid))){ echo "$main.="<a href=\"./delete.php?who=$who&amp;sid=$sid\">Delete</a> \n"; }else{ $main.="Delete \n"; } if(editusers(getuid_sid($sid))){ echo "$main.="<a href=\"./moderate.php?edit=1&amp;who=$who&amp;sid=$sid\">Edit User</a> \n"; }else{ $main.="Edit User \n"; } if(editusers(getuid_sid($sid))){ echo "$main.=" <a href=\"./readpms.php?who=$who&amp;sid=$sid\">Read Sent Inboxs</a> \n"; }else{ $main.="Read Inboxs \n"; } if(editusers(getuid_sid($sid))){ echo "$main.=" <a href=\"./readpopups.php?who=$who&amp;sid=$sid\">Read Sent Popups</a> \n"; echo "</body>"; } else { echo "**Authorisation Failed!! Wrong Password! Try Again!**"; } } else{ echo "**You are not an Owner! Are You? So Get The Hell Out Of Here!***"; } } else if($action=="sesexp"){ echo " "; echo " "; $res = mysql_query("DELETE FROM ses"); if($res){ echo "<img src=\"images/error.gif\" alt=\"x\"/>Everyone got booted including you!"; }else{ echo "$main.="Host Tool \n"; } }else{ addonline(getuid_sid($sid),"In The Forbidden Zone!",""); echo "$main.="<img src=\"../images/error.gif\" alt=\"x\"/>**Permission Denied!**\n \n"; } $main.=" <a href=\"../profile.php?who=$who&amp;sid=$sid\">Back To Profile</a> \n"; $L1="$sixkey<a $key6 href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>"; $L2="$sevenkey<a $key7 href=\"../buds/buds.php?sid=$sid\">BuddyList</a>"; $L3="$eightkey<a $key8 href=\"../chat/public.php?sid=$sid\">Chat</a>"; $L4="$ninekey<a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a>"; $L5="$zerokey<a $key0 href=\"../main.php?sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>"; echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main); echo foot_tag(); ?> </html>
ozziemale31 Lead · 861 posts #8

usually an unexpected $end error is just simply a missing } or { somewhere in yr code yes i coded that function for every { must have an equal } and u need to edit the dbase insert and update functions as that code is not safe from injection

External image (may be gone) External image (may be gone)

External image (may be gone)

*****

**Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer.. Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free ***

floyd Junior · 15 posts #9

thanks mate i will try it every v2 wapdesire host has the password script think they would just share it init but no they try to sell me and if they think i can afford 350 pound for a bit of script there mistaken lmao 🙂

amylee Principal · 1,092 posts #10

350 pounds for what? the wapdesire script? if so the f.ucking retards

floyd Junior · 15 posts #12

just dont understand why ppl wont share it if i had something someone wanted i would no questions asked but all i get is offers to sell me the script thanks to all that tried to help me you are all amazing and keep up the good work 🙂

Write your reply now; next you create a free account (or sign in) and it is posted right away. 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