![]() |
|
|
#1 |
|
Архивный участник
Join Date: Mar 2005
Posts: 114
|
Attached is a file that will allow you to BAN or unban an account.
Via a PHP webpage, has a very simple authentication method, but mess around with it as you want. Its VERY simple, not account name checking or anything in. Just change the passcode1 and passcode2 to whatever you want them, and also the sql stuff to what your server uses. If you want to contrib to it, and make some better error checking and post your additions in this thread. Yellowperil |
|
|
|
|
#2 |
|
Архивный участник
Join Date: May 2005
Posts: 129
|
cool nice work. I still just use sql quary be nice there was an account checking version.. when game I see bob swearing at me I want be able type char name ban accounrt.
|
|
|
|
|
#3 |
|
Архивный участник
Join Date: Apr 2005
Posts: 196
|
ummm o.O
[php:1:403a74996c] $querylistaplayer="update user_account set pay_stat=0 where account='0000'"; if ($accBAN == "on") {$querylistaplayer="update user_account set pay_stat=0 where account='0000'";} else {$querylistaplayer="update user_account set pay_stat=1 where account='0000'";} $conn=mssql_connect($msserver,$usrname,$passwrd); mssql_select_db($database, $conn); $resultlistaplayer = mssql_query($querylistaplayer);[/php:1:403a74996c] this cannot POSSIBLY work account='0000' forgot to add the variables? |
|
|
|
|
#4 |
|
Архивный участник
Join Date: May 2005
Posts: 81
|
we fixed it at our server and it works fine, the bugs are easy to fix
|
|
|
|
|
#5 |
|
Архивный участник
Join Date: Mar 2005
Posts: 114
|
remove this line ---> $querylistaplayer="update user_account set pay_stat=0 where account='0000'";
if ($accBAN == "on") {$querylistaplayer="update user_account set pay_stat=0 where account='0000'";} else {$querylistaplayer="update user_account set pay_stat=1 where account='0000'";} change 0000 to $accBAN Sorry about the typos...... its simple enough to do, personally I can use this thread as a perfect example of how this whole forum is going, THE FIRST DAMN REPLY, is not how to fix this, but asking for the account checking in, DAMN, do it yourself, the original post said it had no checking in, and anyone wantnig to add it post the code. I would have thought the first reply would have been constructive, pointing out my errors, but NOOOOO, that would be to much to ask for. I was looking at the number of posts made by people and I fnid it amazing the number of posts people have made, without actually making any form of contribution, or being constructive. Maybe the DONATIONS should be used more, so people can see who is and who isnt being constructive. Well my ramble over, PLEASE keep this thread revelant to the post, and that doesnt mean asknig for more functionality, but posting the code that does it. Yellowperil |
|
|
|
|
#6 |
|
Архивный участник
Join Date: Feb 2005
Posts: 165
|
the script is sql injection vulnerable :P
|
|
|
|
|
#7 |
|
Архивный участник
Join Date: Mar 2005
Posts: 114
|
I know, but this isnt a script you would give to your players, just admins, plus they could ONLY do an injection if they knew the passwords......
This is a base to work from, eg changing the filenames and passwords would be one of the first things you would do. Yellowperil |
|
|
|
|
#8 |
|
Архивный участник
Join Date: May 2005
Posts: 216
|
here another way of ban. much more reliable coz that way they dont get any reply from server. they r simply rejected:
[php:1:261ac87e3c]if(strstr($szAction,"<ban>")) { $dbconnect = mssql_connect ($CONFIG['dbaddress'], $CONFIG['dbuser'], $CONFIG['dbpass']); mssql_select_db ($CONFIG['dbdbname'], $dbconnect) or die(print("error")); $query = "UPDATE User_Account SET block_flag=1, block_flag2=1 WHERE uid=".$userAccId; $result = mssql_query($query); if($result) { $str = "ACC BANNED: UID = $userAccId; CHAR NAME = $charName;"; echoLn($str); writeLog($str); } else echoLn("ACC (UID = $userAccId) NOT BANNED!!"); }[/php:1:261ac87e3c] Change variables at ur needs ... |
|
|
|
|
#9 |
|
Архивный участник
Join Date: May 2005
Posts: 315
|
change 0000 to $accBAN <---- IT is wrong
is change 0000 to $accdesc. |
|
|
|
|
#10 |
|
Архивный участник
Join Date: Jun 2005
Posts: 6
|
Authentication 1:
Authentication 2: here ??? Id name Char???? 1 y 2?? i dont know thx all |
|
|
|
|
#11 |
|
Архивный участник
Join Date: Mar 2005
Posts: 114
|
authentication1 and authentication2 are used for passcode1 and passcode2 , its alittle stronge than just having 1 password, you set these to what you want to in the script.
|
|
|
|
|
#12 |
|
Архивный участник
Join Date: Feb 2005
Posts: 159
|
to yellowperil
sory but i dont get how to edit your attachment, or i shouldnt? can u plz update attachment ? or maby my english is so bad that i dont get smt.... to bigboy can u make complete php file to use, sory i dont know php to finish it by myself, and i need ability to bann accs ) tnx all.. |
|
|
|
|
#13 |
|
Архивный участник
Join Date: Apr 2005
Posts: 21
|
can you post download link to fixed version ?
|
|
|
|
|