Charles proxy with Appium - appium

Can anyone give steps to invoke Charles proxy with Appium. I have a scenario where I need to capture and modify the request and response from Mobile App. For that I need to invoke Charles proxy with my selenium code. Can anyone help here?

Related

Burp Suite: Page keeps on loading after proxy is configured on Firefox to record activities

When I set proxy to record activities in Burp Suite, URL keeps on loading, though manually without proxy it works. Its only while recording with Proxy, URL keeps on loading.
Any idea why URL does not work while recording with Proxy?
You need to add a certificate for Burp proxy to your browser. The easiest way to get the certificate is to point your browser at the proxy and go to http://burp the hit the 'CA Certificate' button in the top right side of the window. Once downloaded follow these instructions https://support.portswigger.net/customer/portal/articles/1783075-installing-burp-s-ca-certificate-in-your-browser.

Facebook authentication callback never called when not on localhost

I am using facebook for authentication. It works fine as long as my site is on localhost. But once i test on actual web server with proper domain name the callback from facebook is never called.
Using fiddler i can see i send this request to facebook:
https://www.facebook.com/dialog/oauth?client_id=1&client_secret=&redirect_uri=http:%2F%2Fwww.mydomain.com%2FUser%2FFacebookCallback/%2F&response_type=code&scope=email
But my callback on mvc controller called FacebookCallback is never called. HTTPS is enabled and traffic goes through. Also everything works when using test environment with localhost.
Please help! I am going crazy...
Answer:
thank you, the problem turned out to be i was testing using proxy browser cause my router would not allow same external ip inside of my LAN. So a callback url was blocked. Simple silly issue with router... Thank you it is helpful to talk to somebody

iOS: itms-services with proxy authentication

I am using itms-services to install my app over the air. Everything is working fine if I don´t use a proxy. The app installs properly in iOS6 and iOS7.
But if I use a proxy I simply get the message that the app could not be installed. I get no more information. There is also nothing in the device logs. I am sure that the proxy information in the settings are correct.
The proxy uses basic authentication. I used wireshark to have a look at network traffic.
The iPad sends the proxy credentials correctly when requesting the ipa file for installation.
But the proxy still sends an access denied back to the iPad. Once again I am sure that the credentials are correct.
Is it even possible to use itms-services with a proxy that uses proxy authentication? Has someone ever used itms-services with proxy authentication?
I hope someone can help me. Thanks for your help in advance!
It turned out to be a simple problem. Our provider blocked the CA of the server certificate. When the iPad wanted to check if the server certificate is valid it tried to get the root certificate. But the proxy blocked that request. Strange that apple does not give any hint on that in device logs or anywhere else.
So the "proxy authorization required" by the server had nothing to do with the real problem.
The answer to the actual question is: It is possible to use itms-services to install apps OTA with proxy authentication. (We used basic auth in this case?

JMeter - How can I use the proxy with secure mobile pages?

I'm using JMeter's proxy to record the HTTP traffic from a mobile app.
It works fine with non secure HTTP requests, but when I try to make a HTTPS request I get an error: "The certificate for this server is invalid" (see screenshot below).
This is of course expected. If I'm on a PC I can simply click on "accept bad certificate" (or something like that) but this isn't an option for my mobile app (I'm testing amazon's app for example).
Is there a way to get my iPhone (or other mobile device) to accept JMeter's certificate?
Is there another way to do this with a REAL mobile device?
edit:
Some of the answers talk about how to modify my app.
I can't modify the app myself - so I need a solution that doesn't require any app modification.
After some research I found this link:
http://nat.guyton.net/2012/01/20/adding-trusted-root-certificate-authorities-to-ios-ipad-iphone/
Which almost works :)
The comments say that in iOS 6 and up using a MD5 doesn't work, and the default key JMeter is using is MD5.
Any thoughts?
Update Feb 13, 2014:
I had given up on this originally, but recently came across an article about using Charles proxy with a real device to capture SSL traffic by adding a certificate to your iPhone. After following the instructions here it works!
http://www.charlesproxy.com/documentation/faqs/ssl-connections-from-within-iphone-applications/
So now I know a solution IS possible, but I'm still stuck on how to get it to work - now using JMeter 2.11 and iOS 7
Thanks
Ophir
These related questions may be helpful:
iphone: secure restfull server "The certificate for this server is invalid
HTTPS Service is not working
HTTPS post request in IOS
I just happened to write an article on that given the new restrictions on iOS 13. In a nutshell:
Generate a certificate.
Import it into your proxy tool (I used OWASP ZAP).
Import the certificate into iOS and add it as a trusted authority.
Access iOS’ proxy settings and point it to your computer.
Full details in the article link below. Hope you find it helpful.
Best regards,
Andre
https://link.medium.com/gcU2SYZtn4

How to trace HTTP request/response in iPad?

I am using an iPad and I wanted to trace HTTP request/response just like viewing Net Tab in Firebug/Firefox in windows machine. I am using Safari browser in iPad, is there any HTTP trace I can use?
You can set up mitmproxy or Charles HTTP Proxy.
If you've got a PC on the same network you could install Fiddler on it, and allow Fiddler to accept external connections and set it as a proxy on in iOS.

Resources