Elena Schneider Posted July 16, 2013 Posted July 16, 2013 (edited) Hello!I))I am reversing .NET web application which sends sockets to server through HTTP and RTSP protocol.I just want to change IP address where I send requests.My problem is...I can't find this right place in code.Look at that please. public WebWrapper() { this.UseProxy = false; this.UA = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.107 Safari/535.1"; this.Proxy = new WebProxy(); this.LastPage = "http://google.com/"; this.cookies = new CookieContainer(); } public string httpGet(string Address, [Optional, DefaultParameterValue(true)] bool Redirect)string str;try{IEnumerator enumerator;this.WebRequest = (HttpWebRequest) WebRequest.Create(Address);this.WebRequest.Method = "GET";this.WebRequest.Headers.Set("Accept-Language", "en,en-us");this.WebRequest.Headers.Add("Cache-Control", "no-cache");this.WebRequest.CookieContainer = this.cookies;this.WebRequest.UserAgent = this.UA;this.WebRequest.Referer = this.LastPage; I saw an example on MSN WebRequest myRequest = WebRequest.Create("http://www.contoso.com");In my example,WebRequest.Create(Address);This string address is empty,Where is domain name?How can i find it please? Here's picture of sending http://imageshack.us/photo/my-images/690/vs8e.jpg/ I wanna change this ip but can't find place(( Who can help me please guys?( Edited July 16, 2013 by Elena Schneider
LordCoder Posted July 16, 2013 Posted July 16, 2013 It's better to make again the application because with reversing will be difficult to add the IP to connect to the server. Second, why do you want to change the IP to connect to the server? If you change the IP you will change the domain. The string domain has to be a web page that return any value. http://www.contoso.com it's a Microsoft web page so I think it will need something more to complete the return of any value. For example registration of any product.If you can explain why and for what do you want to do will be better to help you. 2
Elena Schneider Posted July 16, 2013 Author Posted July 16, 2013 (edited) LordCoder hello!I have not source for this application.I just need to change ip with domain on my own ip address in that case.I am newbie at .NET reversing because can't undestand all situation((I used DotNet tracer for calls that it was ineffectually for me.I also have reflector and reflexil.It's not registration or something else.It will be for sending sockets to server like a test app.Can i inject my function like Socket.Connect(IpAddress,int32)?Or will be easier to find and to change string?Could you help me please? It always sent sockets to 74.125.209.213 server.I'd like to change it Edited July 16, 2013 by Elena Schneider
grizzmo Posted July 16, 2013 Posted July 16, 2013 (edited) I think you should: Show complete code you have or If, it is too much to paste here upload the source or file somewhere and someone who does take a look at least has all the info needed to give an answer at least. Edit: It always sent sockets to 74.125.209.213 server.I'd like to change it 74.125.209.213 = google this.LastPage = "http://google.com/";this.WebRequest.Referer = this.LastPage; Maybe change http://google.com/", to your IP. grizzmo Edited July 16, 2013 by grizzmo
Elena Schneider Posted July 17, 2013 Author Posted July 17, 2013 grrizzmo.Thanks but it's not right solution.It is refferer for video that it's not "domain which i want to find"
grizzmo Posted July 17, 2013 Posted July 17, 2013 (edited) "This string address is empty,Where is domain name?How can i find it please?" string address = 74.125.209.213 = http://google.com/" I don't get it. Edited July 17, 2013 by grizzmo
tonyweb Posted July 17, 2013 Posted July 17, 2013 (edited) @Elena How do yo know 'Address' is empty? I would use Reflector and analyze 'Assigned-by' references for 'Address' field ... you may find something interesting Regards, Tony Edited July 17, 2013 by tonyweb
li0nsar3c00l Posted July 17, 2013 Posted July 17, 2013 post the exe and i can take a look at iti guess you didnt searched for the string?! kannst mich auch gerne auf skype added, gleicher name wie hier
Elena Schneider Posted July 17, 2013 Author Posted July 17, 2013 Oh))))Yes!I found it in function this.LastPage = "http://google.com/";this.LastPage = Address;his.WebRequest = (HttpWebRequest) WebRequest.Create(Address); Many thanks guys!You've friendly good community at this forum.
grizzmo Posted July 17, 2013 Posted July 17, 2013 "grrizzmo.Thanks but it's not right solution.It is refferer for video that it's not "domain which i want to find"" Actually this was the answer, correct me, if I am wrong. 1
Elena Schneider Posted July 17, 2013 Author Posted July 17, 2013 Yes.You was right!Thanks you grizzmo!)
unknownXXX Posted March 12, 2014 Posted March 12, 2014 Thanks LordCoder for the Tutorial I like your explanation buddy
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now