Raised This Month: $12 Target: $400
 3% 

Real CS 1.6 Anti-Cheat Help Please(c# and amxx socket server/client)


Post New Thread Reply   
 
Thread Tools Display Modes
SANTO37
Member
Join Date: Aug 2008
Old 11-05-2019 , 13:44   Re: Real CS 1.6 Anti-Cheat Help Please(c# and amxx socket server/client)
Reply With Quote #11

Quote:
#include <amxmodx>
#include <sockets>

new g_socket;

public client_authorized(id) socket_DBClient(id);

public socket_DBClient(id) {

new ip[32], error;
get_user_ip(id, ip, charsmax(ip), 1);
client_print(id , print_chat, "%s", ip[0]);
g_socket = socket_open(ip, 1991, SOCKET_TCP, error);

if (error == 1 || error == 2 || error ==3) {
server_print("Player %d: ERROR: %d", id, error);
message_begin(MSG_ONE, SVC_DISCONNECT, {0, 0, 0}, id);
write_string("Please open DBClient!");
message_end();
} else {
socket_close(g_socket);
client_print(id, print_chat, "connected");
}

}
Crashed server.

I can give you my VPS server for nacknic development. What do you think about it?

Last edited by SANTO37; 11-05-2019 at 13:50.
SANTO37 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 11-06-2019 , 04:59   Re: Real CS 1.6 Anti-Cheat Help Please(c# and amxx socket server/client)
Reply With Quote #12

It's not recommended to use TCP to connect, it will cause lag to the server
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 11-06-2019 at 05:00.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
SANTO37
Member
Join Date: Aug 2008
Old 11-06-2019 , 06:00   Re: Real CS 1.6 Anti-Cheat Help Please(c# and amxx socket server/client)
Reply With Quote #13

Should I use UDP?
SANTO37 is offline
iNvectus
Member
Join Date: Sep 2014
Location: Bulgaria
Old 11-07-2019 , 04:48   Re: Real CS 1.6 Anti-Cheat Help Please(c# and amxx socket server/client)
Reply With Quote #14

You know it is kind of nonsense to create server-side anticheat to detect client-side injection, right? Because I would not see anything worth of the HTTP server so far. If you just want to sent request to an external database/server/receiver(listener) with some information, ie. A player is using alliedmodders, you can use curl https://forums.alliedmods.net/showth...=285656&page=2

If you are willing to create some client-side anticheat protection, then sure, it has point and we can try and help up. Most likely, what I'd do:

I'd create a plugin that checks if the player is registered into my anticheat system, if it is registered will send some basic information to check if it is using it, if it's not using it, I'd not allow him to join the server, in other words - kicking him with the reason: "you must download our anticheat to join" or something like that.

Then the client-side comes here. The client serves as a launcher, a launcher that checks for any further memory changes while starting the game and while the game is running. Sure, it takes a lot of resources, especially in C#, but it is not so much for the modern days ordinary PCs. Let's say it monitoring. When something like that occurs, you try to patch it to the original value. You need to find your way to save original memory offsets, etc.

But be aware, that no client-side protection can be left unpirated. Somebody might try and pass over it. It has it's ups and downs, but better make sure what you really want to do:

A client-side anticheat connected with the server-side or a server-side anticheat that informs a service when a cheater appears.
iNvectus is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 11-07-2019 , 09:26   Re: Real CS 1.6 Anti-Cheat Help Please(c# and amxx socket server/client)
Reply With Quote #15

Or hackers can simple emulate your server side anti cheat to bypass it.
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
SANTO37
Member
Join Date: Aug 2008
Old 11-07-2019 , 16:59   Re: Real CS 1.6 Anti-Cheat Help Please(c# and amxx socket server/client)
Reply With Quote #16


https://imgyukle.com/i/adsiz.E4TIUS

I listen to port number 10048 with this program, but this code crashes the server.

Quote:
#include <amxmodx>
#include <sockets>

new g_socket;

public client_authorized(id) socket_DBClient(id);

public socket_DBClient(id) {

new ip[32], error;
get_user_ip(id, ip, charsmax(ip), 1);
client_print(id , print_chat, "%s", ip[0]);
g_socket = socket_open(ip, 10048, SOCKET_TCP, error);

if (error == 1 || error == 2 || error ==3) {
server_print("Player %d: ERROR: %d", id, error);
message_begin(MSG_ONE, SVC_DISCONNECT, {0, 0, 0}, id);
write_string("Please open DBClient!");
message_end();
} else {
socket_close(g_socket);
client_print(id, print_chat, "connected");
}

}

Last edited by SANTO37; 11-07-2019 at 16:59.
SANTO37 is offline
nacknic
Senior Member
Join Date: Mar 2019
Old 12-03-2019 , 02:10   Re: Real CS 1.6 Anti-Cheat Help Please(c# and amxx socket server/client)
Reply With Quote #17

Quote:
Originally Posted by SANTO37 View Post
@nacknic
Hello, I think we should get this together.
What codes are needed for the C # side?
What code is required for the Linux server side?
I'm a little confused. I can't come up with ideas about this. I demand that you increase your support so that we can succeed. Thank you.
Sorry I left the code, but now after a little retirement I will return to it
nacknic is offline
nacknic
Senior Member
Join Date: Mar 2019
Old 12-03-2019 , 02:25   Re: Real CS 1.6 Anti-Cheat Help Please(c# and amxx socket server/client)
Reply With Quote #18

Quote:
Originally Posted by Natsheh View Post
Can you explain what is port 1991 for?
Sorry I left the code, but now after a little retirement I will return to it.

about this port (random port in fact i do my client anti cheat listen to the cs 1.6 server for trying connect.

my anti cheat works like that, for now:
- banlist/adminlist
- admin panel
- screenshot and upload to ftp
- all client have mac number of there drive (for ban/admin/unique server login)

**I built the anti-cheat that can be supported without investing money**
need free ftp: i use one slot that all player connect with same user, BUT
i develop system that open for one slot many sub users, sub-user its single user(of the anti cheat),
so not needed to invest FTP, and i open socket from cs 1.6 server to client (that in this case its using the client int *for money free* listen to cs 1.6 server (if cs 1.6 cannot connected to anti cheat client, i got disconnected from the server), im sorry that i quit for month but i will return to the code and i try fixed...

im here now, i will bring the project back to life

DAMN i need to install steamCmd + amx...

my channel on youtube: dbachartechz

Last edited by nacknic; 12-03-2019 at 02:47.
nacknic is offline
nacknic
Senior Member
Join Date: Mar 2019
Old 12-03-2019 , 02:47   Re: Real CS 1.6 Anti-Cheat Help Please(c# and amxx socket server/client)
Reply With Quote #19

Quote:
Originally Posted by nacknic View Post
Sorry I left the code, but now after a little retirement I will return to it, DAMN i need to install steamCmd + amx...
nacknic is offline
karaulov
Senior Member
Join Date: Jul 2018
Old 12-03-2019 , 04:20   Re: Real CS 1.6 Anti-Cheat Help Please(c# and amxx socket server/client)
Reply With Quote #20

If port closed, or user on NAT ? ))))
karaulov is offline
Reply


Thread Tools
Display Modes

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 -4. The time now is 13:51.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode