Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 29.05.2005, 17:32   #1
yellowperil
Архивный участник
 
Join Date: Mar 2005
Posts: 114
Default Easy Way to Ban Accounts

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
yellowperil is offline  
Old 29.05.2005, 18:30   #2
Rikku
Архивный участник
 
Join Date: May 2005
Posts: 129
Default

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.
Rikku is offline  
Old 29.05.2005, 19:15   #3
Riane
Архивный участник
 
Join Date: Apr 2005
Posts: 196
Default

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?
Riane is offline  
Old 29.05.2005, 19:52   #4
Virexor
Архивный участник
 
Join Date: May 2005
Posts: 81
Default

we fixed it at our server and it works fine, the bugs are easy to fix
Virexor is offline  
Old 30.05.2005, 06:29   #5
yellowperil
Архивный участник
 
Join Date: Mar 2005
Posts: 114
Default

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
yellowperil is offline  
Old 13.06.2005, 01:29   #6
knife_sj
Архивный участник
 
Join Date: Feb 2005
Posts: 165
Default

the script is sql injection vulnerable :P
knife_sj is offline  
Old 14.06.2005, 11:03   #7
yellowperil
Архивный участник
 
Join Date: Mar 2005
Posts: 114
Default

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
yellowperil is offline  
Old 14.06.2005, 11:07   #8
BiGBoY
Архивный участник
 
Join Date: May 2005
Posts: 216
Default

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 ...
BiGBoY is offline  
Old 16.06.2005, 14:28   #9
iamrend
Архивный участник
 
Join Date: May 2005
Posts: 315
Default

change 0000 to $accBAN <---- IT is wrong
is

change 0000 to $accdesc.
iamrend is offline  
Old 19.06.2005, 10:53   #10
cuesco2
Архивный участник
 
Join Date: Jun 2005
Posts: 6
Default hi guys

Authentication 1:
Authentication 2:
here ??? Id name Char???? 1 y 2?? i dont know

thx all
cuesco2 is offline  
Old 20.06.2005, 07:51   #11
yellowperil
Архивный участник
 
Join Date: Mar 2005
Posts: 114
Default

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.
yellowperil is offline  
Old 22.06.2005, 12:23   #12
mastery
Архивный участник
 
Join Date: Feb 2005
Posts: 159
Default

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..
mastery is offline  
Old 27.06.2005, 09:52   #13
ozz
Архивный участник
 
Join Date: Apr 2005
Posts: 21
Default

can you post download link to fixed version ?
ozz is offline  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 20:33.