Raised This Month: $32 Target: $400
 8% 

VAC Ban Status


Post New Thread Reply   
 
Thread Tools Display Modes
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-30-2021 , 13:57   Re: VAC Ban Status
Reply With Quote #221

Added error trapping on the request, so we can see if it is failing there.
Attached Files
File Type: sma Get Plugin or Get Source (vacbans_04_beta.sma - 74 views - 32.5 KB)
__________________

Last edited by Bugsy; 01-30-2021 at 14:09.
Bugsy is offline
Mordekay
Squirrel of Fortune
Join Date: Apr 2006
Location: Germany
Old 01-30-2021 , 23:35   Re: VAC Ban Status
Reply With Quote #222

Now the log-file is completely empty
__________________

Mordekay is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-30-2021 , 23:43   Re: VAC Ban Status
Reply With Quote #223

I removed the sending/received logs when I added to error trapping on the send. This means the request is sending without error. Not sure what else to do here.
__________________
Bugsy is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 01-31-2021 , 03:47   Re: VAC Ban Status
Reply With Quote #224

@Mordekay what curl version you have?
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
Mordekay
Squirrel of Fortune
Join Date: Apr 2006
Location: Germany
Old 01-31-2021 , 04:52   Re: VAC Ban Status
Reply With Quote #225

Quote:
Originally Posted by JocAnis View Post
@Mordekay what curl version you have?
As shown above: 1.1.1, the same as ARUKARI.
__________________


Last edited by Mordekay; 01-31-2021 at 05:00.
Mordekay is offline
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 02-01-2021 , 18:06   Re: VAC Ban Status
Reply With Quote #226

@Bugsy to communicate via SSL, you need a CA file to validate the certificate
Code:
curl_easy_setopt(curl, CURLOPT_CAINFO, "cstrike/addons/amxmodx/cert/cacert.pem");
Here is the certificate link: https://curl.se/docs/caextract.html

And according to curl_const.inc:
Code:
 /* The CApath or CAfile used to validate the peer certificate
     this option is used only if SSL_VERIFYPEER is true */
  CINIT(CAINFO, OBJECTPOINT, 65),
SSL_VERIFYPEER needs to be '1'
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1);

So, your code should look like this:
Code:
public SendRequest( id , idCheck , iRequestType ) {     new szURL[ 128 ];     new CURL:cURLHandle = curl_easy_init();     new CURLcode:ccRetVal;         GetFriendID( g_szAuthID[idCheck] , g_szFriendID[ idCheck ] , 64 );     formatex( szURL , charsmax( szURL ) , "https://steamcommunity.com/profiles/%s?xml=1" , g_szFriendID[ idCheck ] );         curl_easy_setopt( cURLHandle , CURLOPT_URL , szURL );         g_CurlRequests[ cURLHandle ][ RequestorID ] = id;     g_CurlRequests[ cURLHandle ][ PlayerID ] = idCheck;     g_CurlRequests[ cURLHandle ][ RequestType ] = iRequestType;     copy( g_CurlRequests[ cURLHandle ][ SteamID64 ] , charsmax( g_CurlRequests[][ SteamID64 ] ) , g_szFriendID[ idCheck ] );         curl_easy_setopt( cURLHandle , CURLOPT_WRITEFUNCTION , "ResponseReceived" );     curl_easy_setopt( cURLHandle , CURLOPT_ERRORBUFFER , g_szCurlErrorBuffer );     curl_easy_setopt( cURLHandle , CURLOPT_BUFFERSIZE , CURL_BUFFERSIZE );     curl_easy_setopt( cURLHandle , CURLOPT_SSL_VERIFYPEER, 1);     curl_easy_setopt( cURLHandle , CURLOPT_CAINFO, "cstrike/addons/amxmodx/cert/cacert.pem");         if ( ( ccRetVal = CURLcode:curl_easy_perform( cURLHandle , "CurlCallback" , g_CurlRequests[ cURLHandle ] , sizeof( g_CurlRequests[] ) ) ) != CURLE_OK )     {         if ( g_szCurlErrorBuffer[ 0 ] == EOS )         {             curl_easy_strerror( ccRetVal , g_szCurlErrorBuffer , charsmax( g_szCurlErrorBuffer ) );         }                 set_fail_state( "curl request failed with error %d [%s]" , ccRetVal , g_szCurlErrorBuffer );     }         return PLUGIN_HANDLED; }

This way I achieved to communicate via a SSL web socket. Hope I helped you
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]

Last edited by Shadows Adi; 02-01-2021 at 18:18. Reason: Edited code
Shadows Adi is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-01-2021 , 18:13   Re: VAC Ban Status
Reply With Quote #227

@Shadows Adi, it currently works for some people but not all, so I'm not sure about your suggestion.

Mordekay, are you able to try his suggested code?
__________________

Last edited by Bugsy; 02-01-2021 at 18:14.
Bugsy is offline
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 02-01-2021 , 18:28   Re: VAC Ban Status
Reply With Quote #228

@Bugsy, I tried your code with my code and without it. Results:
With: http://prntscr.com/xzu9s2 ~ Returning VAC Status in console
Without: http://prntscr.com/xzu8qz ~ Just stucking at Checking User [ SteamID ]
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]

Last edited by Shadows Adi; 02-01-2021 at 18:29.
Shadows Adi is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-01-2021 , 18:34   Re: VAC Ban Status
Reply With Quote #229

Cool, so this may resolve the issue for those like Mordekay, and yourself. Once he runs a test and confirms I will update the plugin. Though, I wonder why the server would only want a certificate for some connections and not others, maybe some isps are white flagged/trusted?

And thanks for your contribution..I jumped into curl with 0 knowledge and there's not that much digestible documentation out there, that I could find at least.
__________________
Bugsy is offline
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 02-01-2021 , 18:36   Re: VAC Ban Status
Reply With Quote #230

Quote:
Originally Posted by Bugsy View Post
maybe some isps are white flagged/trusted?
I think so, I don't know to be honest.

Quote:
Originally Posted by Bugsy View Post
And thanks for your contribution..I jumped into curl with 0 knowledge and there's not that much digestible documentation out there, that I could find at least.
No problem, I searched through curl docs and find this out, I am starter in curl too
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]
Shadows Adi is offline
Reply



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 23:40.


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