anks Posted September 19, 2011 Share Posted September 19, 2011 Editing .dll / .exe files I have an application which scrapes KWs from suggestions. The programme is coded for amazon.com but i want to scrape for amazon.co.uk. I know for sure, if i am able to edit the dll or exe file where it says amazon.com to amazon.co.uk, it will solve my purpose. I tried to open the dll and exe files in PE Editor/ Tuner application but all bloddy binaries, i understand nothng where do we need to change the path of Amazon. Can someone guide me in right direction? Regards A Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted September 19, 2011 Share Posted September 19, 2011 It's difficult to reverse engineer compiled programs. A quick google search looks like there is a program called 'reshack' that can edit .dll's but unless you have the resource files for the program you'll have to create your own. Quote Link to comment Share on other sites More sharing options...
thehippy Posted September 19, 2011 Share Posted September 19, 2011 I was always one for HexEdit or you could simply change your hosts file so your requests goto the correct address to accomplish what you want. Quote Link to comment Share on other sites More sharing options...
anks Posted September 19, 2011 Author Share Posted September 19, 2011 I was always one for HexEdit or you could simply change your hosts file so your requests goto the correct address to accomplish what you want. Woooooooooooooo Now thats my Man..... Very Nice clean clever Trick. So for Change in Host file, i have a question. URL hardcoded in Application: http://amazon.com Then paramenters that we selecte in Application Front end are concatenated with this URL, like Category, no of results and so on. So the Application will make up a URL based on our settings like: www.amazon.com/cat=sports&noresults=20 Something liek that.... So As per your Trick, if i Just change my host file and redirect amazon.com to amazon.co.uk, will it keep the same URL Structure (www.amazon.com/cat=sports&noresults=20)? I mean, will this URL be dynamically changes to (www.amazon.co.uk/cat=sports&noresults=20 )? Is it the way to do it or did i miss something? Quote Link to comment Share on other sites More sharing options...
thehippy Posted September 19, 2011 Share Posted September 19, 2011 There are some reasons why it wouldn't work but if it does, it will be dynamic as you say. Just going to have to try it and see. Quote Link to comment Share on other sites More sharing options...
anks Posted September 19, 2011 Author Share Posted September 19, 2011 There are some reasons why it wouldn't work but if it does, it will be dynamic as you say. Just going to have to try it and see. Certainly I will give it a go when i reach home, currently at work. I will report back of the Results. Cheers Quote Link to comment Share on other sites More sharing options...
requinix Posted September 19, 2011 Share Posted September 19, 2011 Or you could contact the developer(s) and request that amazon.co.uk be added to a list of sources to choose from. Quote Link to comment Share on other sites More sharing options...
anks Posted September 19, 2011 Author Share Posted September 19, 2011 Or you could contact the developer(s) and request that amazon.co.uk be added to a list of sources to choose from. Thanks for reply, but i wasted 10 days expacting a reply from the developer, he has abandoned this application and even his domain is expired and he did not re-new it. lol Quote Link to comment Share on other sites More sharing options...
anks Posted September 19, 2011 Author Share Posted September 19, 2011 I was always one for HexEdit or you could simply change your hosts file so your requests goto the correct address to accomplish what you want. To implement this solution i have added this two lines in my Host file: amazon.co.uk amazon.com www.amazon.co.uk www.amazon.com Is that how we implement it? I tried to go to www.amazon.com but its not redireting to amazon.co.uk. What am i missing? Quote Link to comment Share on other sites More sharing options...
requinix Posted September 19, 2011 Share Posted September 19, 2011 I tried to go to www.amazon.com but its not redireting to amazon.co.uk. What am i missing? You probably need to flush the DNS cache. Open up a Command Prompt as an Administrator (right-click, Run as administrator) and type ipconfig /flushdns Either that, or restart your computer. Quote Link to comment Share on other sites More sharing options...
Doug G Posted September 19, 2011 Share Posted September 19, 2011 Hosts file entries need to be an IP address followed by one or more hostnames. You can't do a hostname followed by a hostname line. Quote Link to comment Share on other sites More sharing options...
anks Posted September 20, 2011 Author Share Posted September 20, 2011 Hosts file entries need to be an IP address followed by one or more hostnames. You can't do a hostname followed by a hostname line. Thanks In that case, i went ot my commandpromt and did ping amazon.co.uk and got IP 178.236.5.39 then i have put these lines in my Host file: 178.236.5.39 http://www.amazon.com/ 178.236.5.39 http://amazon.com/ 178.236.5.39 amazon.com/ 178.236.5.39 www.amazon.com/ But still its not redirecting.... :-( Quote Link to comment Share on other sites More sharing options...
RobertP Posted September 20, 2011 Share Posted September 20, 2011 178.236.5.39 www.amazon.com 178.236.5.39 amazon.com tested and works for me, make sure you flush your dns ipconfig /flushdns Quote Link to comment Share on other sites More sharing options...
Doug G Posted September 20, 2011 Share Posted September 20, 2011 After making the hosts changes did you flush your dns cache as requinix mentioned? Quote Link to comment Share on other sites More sharing options...
RobertP Posted September 21, 2011 Share Posted September 21, 2011 ofcourse Quote Link to comment Share on other sites More sharing options...
anks Posted September 21, 2011 Author Share Posted September 21, 2011 178.236.5.39 www.amazon.com 178.236.5.39 amazon.com tested and works for me, make sure you flush your dns ipconfig /flushdns Yes it seems to redirect but now comes the bigger challange. :-( So the Application will make up a URL based on our settings like: www.amazon.com/cat=sports&noresults=20 Something liek that.... So As per your Trick, if i Just change my host file and redirect amazon.com to amazon.co.uk, will it keep the same URL Structure (www.amazon.com/cat=sports&noresults=20)? I mean, will this URL be dynamically changes to (www.amazon.co.uk/cat=sports&noresults=20 )? Right now its not happening. Is it the way to do it or did i miss something? Quote Link to comment Share on other sites More sharing options...
thehippy Posted September 21, 2011 Share Posted September 21, 2011 There was a chance it might work, it depended upon how the application made its HTTP request. Oh well. I've found Screen-Scraper to be an excellent scraping tool, though its not for everyone. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.