Skip to content

Capturing pcap file using Android device

sagilo edited this page Oct 25, 2018 · 17 revisions

The script requires 4 parameters in order to function.
3 of them can be found in Switcher packets sent when controlling the device.

Requirements:

  • Android device, connected to Switcher within the same network
  • tPacketCapture Packet Capture app
  • pypcapfile package for python (pip install pypcapfile)

Once you got all of the above, follow the instructions below:

  1. Open Switcher app and login, click 'settings' on the left menu and turn on the 'local' option

  2. Go to the devices list and make sure it says 'local' next to your Switcher device: local device

  3. Open the Packet Capture app, click the Play button with the '1' next to it.

  4. Write 'Switcher' and select the Switcher app. The recording has now started (you can see the stop button on the app top bar)

  5. Open Switcher app, select the required device and turn it On, wait something like 10 seconds and turn it Off.

  6. Go back to Packet Capture app and click the stop button.

  7. Click the last created item (most recent date and time)

  8. You should see a few sessions now, look for a few KB session, targeted to port 9957 with a local ip (usually 192.168.x.x or 10.0.x.x) Note: This is the Switcher local ip, write it down as you will need to update the credentials.json file with this value after parsing. local ip session

  9. Click the menu button and save as pcap file

pcap preview

  1. Copy the pcap file to the same directory as the script
  2. Run the script with -m parse_pcap_file -f file_name.pcap
  3. If you followed all the steps you should now see your device id, phone id and device pass, credentials.json was also updated with the values
  4. You should now update credentials.json with the Switcher local IP from step 7, and you are good to go.