ken3ss Posted July 26, 2013 Posted July 26, 2013 Hi, I'm trying to bypassing the server check by using fiddlercore in order to produce a 'fake' autoresponse back into the software in order to trick the program here's come the problem, the code I made didn't wait for the operation, but it just executed and exit like nothing happended this is my sauce: using System; using System.Collections.Generic; using System.Linq; using System.Text; using Fiddler; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { List<Fiddler.Session> oAllSessions = new List<Fiddler.Session>(); Fiddler.FiddlerApplication.BeforeRequest += delegate(Fiddler.Session oS) { oS.bBufferResponse = false; oAllSessions.Add(oS); if (oS.uriContains("http://example.com/license.asp")) //DEMO { DateTime dateTime = DateTime.UtcNow.Date; oS.utilCreateResponseAndBypassServer(); oS.oResponse.headers.HTTPResponseStatus = "HTTP/1.1 200 OK"; oS.oResponse["Cache-Control"] = "private, max-age=0"; oS.oResponse["Content-Length"] = "365"; oS.oResponse["Content-Type"] = "text/xml; charset=utf-8"; oS.oResponse["Server"] = "Microsoft-IIS/7.0"; oS.oResponse["X-AspNet-Version"] = "2.0.50727"; oS.oResponse["X-Powered-By"] = "ASP.NET"; oS.oResponse["Date"] = dateTime.ToString("ddd") + ", " + dateTime.ToString("d MMM yyyy HH:MM:SS") + " GMT"; oS.utilSetResponseBody("OK"); } }; } } }this program dosen't have foreground interfaces. Thank you
LordCoder Posted July 26, 2013 Posted July 26, 2013 This is because you need to do a loop. The loop will stay there until it does that. When you run it now it just execute it but it's not running the server connection to produce the fake info so it bypass it. To avoid that put a loop with a Boolean to see when the application connects with that server. Example: // Boolean Expressionwhile (ServerIsConnected) {// Some tasks} The ServerIsConnected it's a boolean to check if the application it's getting the information from there.
NOP Posted July 27, 2013 Posted July 27, 2013 (edited) This is because you need to do a loop. The loop will stay there until it does that. When you run it now it just execute it but it's not running the server connection to produce the fake info so it bypass it. To avoid that put a loop with a Boolean to see when the application connects with that server.You dont need a loop for fiddlercore, it is raised as a proxy event delegate on Fiddler.FiddlerApplication.BeforeRequest & Fiddler.FiddlerApplication.BeforeResponse Hi, I'm trying to bypassing the server check by using fiddlercore in order to produce a 'fake' autoresponse back into the software in order to trick the program here's come the problem, the code I made didn't wait for the operation, but it just executed and exit like nothing happended Try changing...if (oS.uriContains("http://example.com/license.asp")) //DEMOTo...if (oS.url.Contains("http://example.com/license.asp")) //DEMOYou need to change the example URL to the correct one, set the port, start the proxy & make sure your browser is set to use the proxy you have setup or the app suitable redirected to your proxy (127.0.0.1 with the port you have set) iSecureEndpointPort = 8888;FiddlerCoreStartupFlags oFCSF = FiddlerCoreStartupFlags.Default;Fiddler.FiddlerApplication.Startup(0, oFCSF);oSecureEndpoint = FiddlerApplication.CreateProxyEndpoint(iSecureEndpointPort, true, sSecureEndpointHostname);if (null != oSecureEndpoint){FiddlerApplication.Log.LogFormat("Created secure end point listening on port {0}, using a HTTPS certificate for '{1}'", iSecureEndpointPort, sSecureEndpointHostname);} Edited July 27, 2013 by NOP 1
ewwink Posted July 28, 2013 Posted July 28, 2013 (edited) sometimes fiddler is passed and you need;1. proxifier to proxify the app or2. try to edit Control Panel => Internet Option to use fiddler proxy or3. edit server address in the app to point to localhost. Edited July 28, 2013 by ewwink
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