Using HOSTS to redirect callbacks

Status
Not open for further replies.

guerilla

All we do is win
Aug 18, 2007
11,426
428
0
No
I have a piece of software that calls for an external list of proxies when it runs. The problem is, the software is out of date and the proxies are no longer maintained online.

I want to be able to use a local list of proxies and was hoping I could use my HOSTS file to redirect the request.

Let's say the program calls

http://www.software.com/proxies.txt

can I change that to

http://www.myurl.com/proxies.txt
or
localhost ??? proxies.txt

Any tips would help and +rep if it proves useful.
 


I don't see why not, so long as your proxy list is formatted identically to the one it's trying to retrieve, and they didn't do something really crazy (like check a MAC or digital signature on the downloaded file.)

If you have the source/script of the app, it'd probably be easier to just change the URL in the code as you outlined than to hack around your hosts file to do it, though either would work.
 
If you have the source/script of the app, it'd probably be easier to just change the URL in the code as you outlined than to hack around your hosts file to do it, though either would work.
I don't have the source. :(

I don't see why not, so long as your proxy list is formatted identically to the one it's trying to retrieve, and they didn't do something really crazy (like check a MAC or digital signature on the downloaded file.)
But how would I do it? Would I just use HOSTS to redirect the domain, or the full URL including the file extension?
 
If you know the exact URL the program is fetching, use HOSTS to redirect the request to your server.

How? Just add the original domain to your web hosting account (so that the server answers the requests for that domain's pages) and run the program after modifying your HOSTS. Then just check the web server log end there should be a 404 / Not found error in the first position, whose URL would be the one the program is fetching.

Add your file at that URL (in the server) and then run the program again.

Should work like a charm :D
 
  • Like
Reactions: guerilla
Code:
new_ip_address           old_domain

Code:
127.0.0.1 proxylist.com

this would cause any requests for proxylist.com to be directed to 127.0.0.1
 
What software is it? Back in the days (10+ years ago) I "worked" with these kinds of things. Are you familiar with disassemblers?
 
Status
Not open for further replies.