PDA

View Full Version : Easy Way to Ban Accounts


yellowperil
29.05.2005, 17:32
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

Rikku
29.05.2005, 18:30
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.

Riane
29.05.2005, 19:15
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?

Virexor
29.05.2005, 19:52
we fixed it at our server and it works fine, the bugs are easy to fix

yellowperil
30.05.2005, 06:29
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

knife_sj
13.06.2005, 01:29
the script is sql injection vulnerable :P

yellowperil
14.06.2005, 11:03
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

BiGBoY
14.06.2005, 11:07
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 ...

iamrend
16.06.2005, 14:28
change 0000 to $accBAN <---- IT is wrong
is

change 0000 to $accdesc.

cuesco2
19.06.2005, 10:53
Authentication 1:
Authentication 2:
here ??? Id name Char???? 1 y 2?? i dont know

thx all

yellowperil
20.06.2005, 07:51
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.

mastery
22.06.2005, 12:23
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..

ozz
27.06.2005, 09:52
can you post download link to fixed version ?