0
  • I have an exe program that connects randomly to one of the 4 addresses 188.39.21.82...83...84...85 out of which only 82 works
  • Currently I blocked the remaining addresses using Windows 10 Firewall outbound rules by simply blocking them
  • My problem is that the program will keep attempting to connect say 10-20 times (times out after 20 seconds each time) before it finally connects to the IP address ending with 82
  • Is there a way that I can write a rule such that the program will get redirected to the IP address ending with 82 regardless of which IP it attempts to connect with?
  • Example: the program tries to connect to 188.39.21.85 but gets redirect to 188.39.21.82 I want to add that all the IP addresses actually work but the exe file doesnt work properly on any of them except the one ending with 82
1
  • 1
    If the IP addresses are stored in the program, edit them all to end in .82? you could write a small program to attach as a debugger, then breakpoint on the call to connect, and replace the argument. Or you could try to hijack the import of connect from the socket library. This used to be pretty easy on Windows, but I haven't paid attention since XP. Dec 12, 2021 at 4:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.