Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Program crashes immediately if gethostbyname(CLIENT_POST_HOST) fails #25

Open
Speyedr opened this issue Mar 27, 2022 · 2 comments · May be fixed by #23
Open

[Bug] Program crashes immediately if gethostbyname(CLIENT_POST_HOST) fails #25

Speyedr opened this issue Mar 27, 2022 · 2 comments · May be fixed by #23
Assignees
Labels
bug Something isn't working

Comments

@Speyedr
Copy link
Owner

Speyedr commented Mar 27, 2022

Description
When starting the program, FilterSettings.SERVER_IP attempts to resolve the IP address for the class attribute CLIENT_POST_HOST, which more specifically is the URL prs-gta5-prod.ros.rockstargames.com. This IP address is then used in two PyDivert filters, which can be found here. These initial filters help reduce the load on SCBlocker by allowing any packet which does not match the filter to be immediately let through, as these initial filters have been designed such that any packet which does not match these initial filters would always be allowed through anyways.

If this IP address cannot be resolved, the initial filters could not be constructed as they currently are. However, as there is currently no error handling for the method mentioned above, the program crashes immediately and without any error message, and the error isn't even added to a log file as the crash happens before SCBlocker even reaches main().

Although under normal circumstances this method should never fail, very strict firewalls or attempting to run SCBlocker without an internet connection can trigger this behaviour.

How to reproduce
Steps to reproduce the behavior:

  1. Disable your internet connection / block access to prs-gta5-prod.ros.rockstargames.com
  2. Run SCBlocker.exe as Administrator
  3. Window opens, then closes immediately
  4. In order to see the full error message, you need to run SCBlocker.exe from an elevated command prompt.

Screenshots / Debug.log messages
image

System Information

  • Operating System: Windows 8.1
  • Program Version: v0.1.1

Additional context
DROP_INC_80 will still work even if SERVER_IP cannot be resolved.
The program could keep attempting to resolve SERVER_IP until it is successful.
The IP that is resolved seems to be static and within R* / T2 IP-space, so an alternative would be to set the filters to use a regex (I think Guardian 3.0 did this?) instead of the 1 IP address.

@Speyedr Speyedr added the bug Something isn't working label Mar 27, 2022
@Speyedr Speyedr self-assigned this Mar 27, 2022
@Speyedr Speyedr linked a pull request Mar 27, 2022 that will close this issue
20 tasks
@gir489returns
Copy link

This is what I was talking about by just filtering the malicious traffic. You're either going to be playting circle jerk trying to find all the edge cases that causes the game to crash by doing this and allow it, or you can stop it now and just filter malicious traffic. I been down this road before when I tried to spoof SCIDs in lobbies to stop Join by SCID, but it fucked up my garage and all my businesses. The SCID API is gay.

@Speyedr
Copy link
Owner Author

Speyedr commented Apr 6, 2022

This is what I was talking about by just filtering the malicious traffic. You're either going to be playting circle jerk trying to find all the edge cases that causes the game to crash by doing this and allow it, or you can stop it now and just filter malicious traffic. I been down this road before when I tried to spoof SCIDs in lobbies to stop Join by SCID, but it fucked up my garage and all my businesses. The SCID API is gay.

Perhaps the Issue description was a bit confusing, however this is not affecting the game / causing the game to crash. It's an unhandled exception in SCBlocker itself, which causes SCBlocker to instantly close.

Properly spoofing TCP is still planned, will probably be part of v0.3.

I've been thinking more and more about how I could "attack" encryption without modifying the game directly and I have some ideas, but it's still not going to be used in this project specifically unless it becomes absolutely necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants