azerothcore / mod-anticheat

Port of PassiveAnticheat to Azerothcore
http://azerothcore.org/
MIT License
32 stars 50 forks source link

Mistake mod-anticheat #86

Closed MegaserverRU closed 2 years ago

MegaserverRU commented 2 years ago

Current Behaviour

How can this be fixed? 2022-08-23_10-05-51

[1136] Column count doesn't match value count at row 1 Unhandled MySQL errno 1136. Unexpected behaviour possible. SQL(p): INSERT INTO account_banned VALUES (3, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()+0, Server, Anti cheat module Auto Banned Account for Reach Cheat Threshhold, 1) [ERROR]: [1062] Duplicate entry '3-1661238008' for key 'PRIMARY'

Expected Blizzlike Behaviour

no

Source

no

Steps to reproduce the problem

After the anti-cheat is triggered, such an error appears, how can it be fixed?

Extra Notes

no

AC rev. hash/commit

AzerothCore

Operating system

Windows 7 x64

Custom changes or Modules

mod-anticheat

acidmanifesto commented 2 years ago

Is your core up todate? What revision of azerothcore and the the anticheat you are on? What changes did you make to the anticheat? If you did not make any changes, what changes did you do to the core? I can not repeoduce this issue.

MegaserverRU commented 2 years ago

Is your core up todate? What revision of azerothcore and the the anticheat you are on? What changes did you make to the anticheat? If you did not make any changes, what changes did you do to the core? I can not repeoduce this issue.

I didn't make any changes to the kernel, the last kernel update was yesterday and the anti-cheat update was also yesterday. Today I decided to check the anti-cheat for performance downloaded the cheat program WoWEmuHacker v5.0.5.4 Final I turned on the flight and speed mode, the anti-cheat worked well, issued a ban to the character, but after the ban I'm in worldserver.exe I saw this error, it was marked in red, so I decided to clarify, is it possible to fix it somehow?

acidmanifesto commented 2 years ago

at current i recieve no such issue. I can not reproduce. image what sql version are you using currently? Banning is done thru the same function as the .player ban gm command. https://github.com/azerothcore/mod-anticheat/blob/d85ab79c3e5d5f8fe12249b478fc3447c576d86d/src/AnticheatMgr.cpp#L1499 The anticheat makes no direct modification to the account_banned table itself.

MegaserverRU commented 2 years ago

version 8.0 of sql

acidmanifesto commented 2 years ago

version 8.0 of sql

Does it do this all the time? The error would suggest it is banning a character that is... already banned?

MegaserverRU commented 2 years ago

Yes, this error occurs constantly on different accounts

MegaserverRU commented 2 years ago

Yes, this error occurs constantly on different accounts

I will try to delete everything now and fill in the SQL files again

acidmanifesto commented 2 years ago

Yes, this error occurs constantly on different accounts

I will try to delete everything now and fill in the SQL files again

Let me know how it goes. Im still trying to see if this is going to be a core issue or not.

MegaserverRU commented 2 years ago

The error remains 1 time if the SQL database is clean account_banned then it gives the usual error that I showed you earlier. 2022-08-23_10-05-51

then when banned accounts appear and you change from 1 to 0 thereby removing the account ban, a server crash begins to appear in SQL account_banned 2022-08-23_21-05-35

But actually the crash itself 2022-08-23_21-04-15

MegaserverRU commented 2 years ago

re-deleted all SQL files from the anti-cheat module

MegaserverRU commented 2 years ago

Maybe you will give me your anti-cheat SQL files, I will fill them in and recheck them

MegaserverRU commented 2 years ago

Here's another error that came out 2022-08-23_21-20-19

acidmanifesto commented 2 years ago

The error remains 1 time if the SQL database is clean account_banned then it gives the usual error that I showed you earlier. 2022-08-23_10-05-51

then when banned accounts appear and you change from 1 to 0 thereby removing the account ban, a server crash begins to appear in SQL account_banned 2022-08-23_21-05-35

But actually the crash itself 2022-08-23_21-04-15

the issue is that the id and the bandate are primary key collumns. They can not be duplicated. Al though u can have multiple id being 1, the bandate needss to be different, if at any time the id collumn and bandate have a duplicate, it will error out. It "SHOULD" be impossible to havea duplicate of having the same ban date (which is done in UNIX) with the player ID. However this will be a core issuea and handling as it uses the sBan. The account_banned would not be anything related to the anticheat as it is a table exsistent with the azerothcore it self. https://www.azerothcore.org/wiki/account_banned Read more about Primary Keys in SQL DB: https://www.tutorialspoint.com/sql/sql-primary-key.htm#:~:text=A%20primary%20key%20is%20a,of%20single%20or%20multiple%20fields.

MegaserverRU commented 2 years ago

I don't understand you. What do I need to do to avoid such mistakes?