Giter Site home page Giter Site logo

cslev / android_termux_ip_tracker Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 20 KB

This script runs on (non-rooted) Android, in termux terminal, and logs mobile data IPv4/6 addresses along with date and location data.

License: GNU General Public License v3.0

Shell 100.00%

android_termux_ip_tracker's Introduction

android_termux_ip_tracker

This script runs on (non-rooted) Android, in termux terminal, and logs mobile data IPv4/6 addresses along with date and location data.

Requirements

Install Termux and Termux-API Android packages from F-droid (Not from play store as they are outdated)

Termux apk

Termux-API apk

Note, if Termux is installed through google play store then delete first. Otherwise Termux-API from F-droid will collide with it.

Install termux-api pkg inside termux.

Launch Termux from your phone, upgrade pacakge list and install termux-api package to have the required binaries

pkg upgrade
pkg install termux-api

check whether Termux API works properly

Try to get location data (it takes some time, so be patient and have good GPS reception)

termux-location

It will ask for LOCATION permission first, so maybe you have to run it for the second time.

Run android_termux_ip_tracker

First, install git in termux

pkg install git

Then, download sources

git clone https://github.com/cslev/android_termux_ip_tracker

Run script by checking the help first

This script stores the IP addesses of the data communication interfaces with location+date information to keep track of them preciesly!
Example: ./ip_addr_logger.sh [-a INTF1 -b INTF2 -s SLEEP_TIME]
		-a <INTF1>: set the primary interface name that is used to connect to the internet via mobile data communication (Default: intf1).
		-b <INTF2>: set the secondary interface name that is used to connect to the internet via mobile data communication (Default: intf2).
		-s <SLEEP_TIME>: sleep time IN SECONDS between two consecutive measurements. Cannot be less than 5 seconds (Default: 300).
How to simply get these interfaces on a non-rooted phone? just use 'ip addr show' and look for the interfaces that have meaningful IP addresses

Example

./ip_addr_logger.sh -a rmnet_data0 -b rmnet_data2 -s 100

Log files will be created in the same directory! And, by running the script, termux acquire wake lock, i.e., it won't be killed by Android and will be running even with screen off. This also means increased battery consumption for the convenience.

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.