Giter Site home page Giter Site logo

sandypriyatna / android-packet-capture Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yadavdev/android-packet-capture

0.0 1.0 0.0 2.7 MB

A basic root app using precompiled tcpdump binary to capture network packets in rooted android phones

License: MIT License

Java 100.00%

android-packet-capture's Introduction

Root Packet Capture

Requires root

Root Packet Capture is very basic packet capture app for rooted android devices. The captured packets can later be analysed using tools like wireshark.

How it works:

For capturing packets it uses a precompiled tcpdump binary. The tcpdump binary is bundled in the apk by including it in the assets folder.

The app uses libsuperuser for starting an interactive root shell from where the tcpdump binary runs.

Once packet capture is started the app need not be running. The tcpdump binary continues to run even after activity is closed. While reopening the app checks for any already running instance of tcpdump and doesnot create another process. The tcpdump process can be closed by using the "Stop Capture" or "Stop and Exit" buttons.

In the current implementation the output is stored in "/mnt/sdcard/xxxx.pcap" using the command:

/data/data/devilrx.smartpacker/files/tcpdump.bin -w /mnt/sdcard/0001.pcap

However if "-w" flag is not desired change the command and, capture the live output by modifying the:

public void onLine(String line) {

in TcpdumpPacketCapture.java as required.

Note: The current implementation stores the .pcap file in sd card. The .pcap file might grow very large if the network use is very high. Implement without -w flag or stop/restart capture.

Feel free to fork and improve :)

android-packet-capture's People

Contributors

yadavdev avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.