How to sniff iphone network data - iphone

I have recently been having problems with my app and I need to view the data being sent to and from my iPhone. I have read about Paros and downloaded it, but I don't know what information I need to put into paros and my iPhone to make it work. I am running a normal windows 7 installation with no current proxy server and my ISP is telus with the fiber optics package. So what do I need to install and where do I find all of the information needed to read the data being sent over the network by my iPhone using paros?

I do this a lot. I do it with a MacBook, but I'm sure you can use a similar technique to do it from windows:
Connect your PC to a hard-wired ethernet to the outside world.
Set your PC up for internet sharing. (This is the big thing that will work differently between the Mac and PC). Set up to share your Hard-wired Connection with people from your WiFi Connection. Your computer will then become a wireless access point.
Connect your iPhone to use your PC as it's WiFi network
Download and run Wireshark (Open Source - Publicly available) on your PC. Wireshark will sniff and log the network traffic.
You can then obviously set up whatever rules your would like to limit your network trace to only your iPhone.
Like I said - I do this all the time with a MacBook and it's easy and powerful!

Related

My Internet interferes with external device

I am interfacing with some external hardware (can't disclose much details on hardware) and I am using Ethernet cable to talk to external hardware boards. I have windows 7 on my machine. In between the external hardware and my PC, I have a small ethernet hub that communicates with multiple circuit boards of my external hardware.
Also, in order to get internet connection on my PC, I am using a USB2Ethernet adapter which provides me the internet connectivity.
The problem I am having is that whenever PC is connected to internet, certain test that I run on the external hardware do not work. If I dicsonnect the internet cable, then my external hardware works fine and I can do my testing.
I have disabled the USB2Ethernet through device manager and (I get no internet) and tried to run the test and my hardware doesnt work.
Has anyone encounter a problem like this and if so, what would be an ideal solution? Any help would be greately appreciated.
Please feel free to contact for any other information related to the problem if I haven't explained it well.

Unable to detect wifi p2p group owner by legacy devices

I am trying to create a wifi direct p2p Group owner using wpa_supplicant and wpa_cli. Once the group is create with p2p_group_add, how can we connect legacy wifi devices to the GO? I see the GO in Android mobile search, however I am not able to detect/find GO in legacy laptop with just wifi support. May I know if any configurations need to be done for supporting legacy devices like security type etc. Please suggest.
An autonomous GO should be detected by any legacy wifi device - no special configuration is necessary. The GO should be beaconing and responding to any probe requests, both of which allow a legacy wifi system to detect it (it will just ignore the special P2P IE).
I just tried the same scenario and both my Android phone and my Windows 7 laptop could see the GO running on my Linux laptop.
As your Android phone can see the GO then it is obviously responding to probe requests, so the fact your Windows machine cannot see it is likely to be an issue with the specific netcard used (either in your wpa_supplicant machine, or your Windows machine).
Some further debugging may be necessary to find the root cause, for example using wireshark, and if possible either upgrading the wifi netcard driver on your Windows machine, or swapping it out with a different vendor.

setting up server for an iphone app

super basic question - I am building an iphone app but will need to set up my computer as a server so my app can send data to my computer. what are the first steps that i need to take?
Thanks!
If you are writing an iPhone app you are probably on a Macbook so you can easily enable Apache in system preferences, click sharing, enable web sharing it will then show you your computers IP address that you can hit over a web browser.
That will set you up with a web server on your machine. Since your emulator and web server will be on the same wifi network and even if you deploy to the device you can have it on your wifi network you should be able to post data to your Mac's web server.
If you are passing data to it you'll need to read about 'web services', probably REST web services. I would then suggest reading about PHP and/or Ruby or Python as your programming language to interpret what you are posting to the web service.
Hope that helps you on your way.
If you are not on a Mac you can't develop an iPhone app anyways ;) so the above strategy should work for you.
3G will only work for you if your server is available outside of the network. Tons of info online on how to set that up but essentially what you would do is configure your router to forward incoming traffic from (for example) port 8080 to the ip address of your server. Assuming you are on a router.
As a side note, if down the line you use Ruby you could check out http://www.heroku.com/how if you want to host your server there

Problem with Enterprise Distribution Over 3G

I am trying to distribute an enterprise application, but I am having trouble when users try to download the app over a 3G connection. I've created the proper manifest file and it points correctly to the .ipa location. I am able to download and install the application fine over a Wi-Fi network, but when I switch off Wi-Fi, I am no longer able to download the app. Rather than a successful installation, I get the "Unable to download" pop up.
My application size is only 440K, so it is not subject to file size limits.
Does anyone know what would be causing this? Help would be greatly appreciated. Please let me know if you need more details.
Thanks.
As it turns out, our web server was experiencing network latency. I believe we were losing the connection to Apple's server, which was verifying our application's enterprise status. Eventually the latency cleared up and we were able to download the file with no problems.
Is the your ipa file and manifest on a public server, or is it on an internal server? When you're using the 3G connection you're only able to see machines that are public. When you're using wi-fi you can see machines that are on a local network or intranet.

iPhone HTTP Server

Can someone give me simple code to help with creating an HTTP server for the iPhone. Something simple with much documentation would be appreciated. Anything you have please share.
There are sample codes from Apple and open source community such as cocoahttpserver TouchHTTPD.
Here's a summary blog
Another open-source HTTP server for iPhone is the lightweight GCDWebServer which is built on top of Grand Central Dispatch. It's only a few source code files and offers a simple and extensible API.
If you're unfamiliar with network programming your best bet is to first read Beej's Guide to Network Programming and then read the HTTP 1.1 spec before you look at source code (as you should have an understanding of the protocol before you start looking at implementations).
A simple Google search turned up cocoahttpserver and iSpit. Otherwise, you could download Apache and look at its source code, but that's not exactly a simple implementation.
It is possible to run a simple file server on iPhone/iOS.
I was able to use this method successfully. Here are the steps to create a simple file server which works on http protocol.
1. Install TestFlight app for iOS
2. Install iSH app from the Apple store or side load it from their website, as this app might not be available in the store depending on your country. I tried it from india in May 2020, and the app was not available in the store. So i did side load it from their website.
3. With iSH app, one has access to linux kernel of the iPhone. I did use a simple http server module from python and executed it on the linux shell.
4. Command to run the python based server on iPhone :
Python -m http.server 8080
5. Access the file server using the local ip that’s assigned to the iPhone in the network you are connected to. That means, if iPhone is connected to a WiFi SSID, depending on whether the router is configured to use static IP address assignment based on MAC address or using DHCP protocol, your iPhone will have an internal IP assigned by the router.
6. Command to access the file server :
http://192.168.1.3:8080 - modify the address depending on IP address of the iPhone and the port that server running on iPhone is configured to use. Paste this in a browser - one should be able to see the files listed in the directory where the server is running in.
Hope this was clear enough, for running a simple http based file server on iPhone using http.server module in python, over linux shell of the underlying kernel, using iSH.