Page 1 of 1

Dealing with http request

Posted: Thu Jan 03, 2013 11:12 pm
by M1z23R
I have an application that is making some http requests, i was woundering if i could bypass them - redirect them to some other url, for example if the specific app wants to send request to www.google.com i somehow redirect it and response in app comes from www.codenstuff.com ?

Re: Dealing with http request

Posted: Fri Jan 04, 2013 12:32 am
by mandai
There are a couple of ways to do this. It may be possible to configure a HTTP proxy for this kind of redirection.

If you are only looking to redirect certain websites you could also modify the hosts file.

Re: Dealing with http request

Posted: Fri Jan 04, 2013 5:46 pm
by M1z23R
How would i do that ? (edit hosts file)

Re: Dealing with http request

Posted: Fri Jan 04, 2013 8:01 pm
by clanc789
"C:\windows\System32\drivers\etc" is the path to the host file if you have windows on your C:\ Drive. Open with notepad. All info is in there on how to reroute or block a domain.

Re: Dealing with http request

Posted: Sat Jan 05, 2013 12:22 am
by M1z23R
But does it work with 2 domains or just ip to domain ?

Re: Dealing with http request

Posted: Sat Jan 05, 2013 6:31 pm
by mandai
The hosts file is used to manually set the IP address for a domain. In this case if you want to replace the IP with an existing domain then you would need to use a DNS or HTTP proxy.

Re: Dealing with http request

Posted: Sun Jan 06, 2013 2:25 am
by M1z23R
Could you give me a simple example, app or something that i could use ?
Also, none of domains - sites is mine, i want to intercept request on my pc and send those requsts to a different location :)

Re: Dealing with http request

Posted: Sun Jan 06, 2013 9:43 pm
by mandai
I couldn't name a specific application for this, though if you search for web filtering I'm sure you will find some.
As with any proxy server there will be some configuration needed in order to set it up. It will be more complicated than just using a hosts file.

Re: Dealing with http request

Posted: Mon Jan 07, 2013 12:04 pm
by M1z23R
I really su?k at this, but here is full app detail.
i have an application, not made by me, so i can't edit it.
it works as some kind of bot on following site x1.ccccc.com, now this server changed to y1.ccccc.com, and app can't work any more, and developers stoped publishing updates for app. i want to change the app requests from subdomain x1 to y1. neither sites nor app is made by me so i can't change anything. the only thing i can do is try to hook these requests and redirect them. what would be the simplest way to do this ? sorry i am asking again, but with web filtering i can only block certain sites...

Re: Dealing with http request

Posted: Mon Jan 07, 2013 10:43 pm
by mandai
It may be possible to hook or patch the request but the code for this would be specific to the application.