How to capture network traffic from Android device using Java SocketServer? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How to capture network traffic from Android device using Java SocketServer?

How to capture network traffic from Android device using Java SocketServer?

16th May 2020, 8:05 AM
TheEngineerIN
TheEngineerIN - avatar
1 Answer
+ 1
I don't know much about Java so I can't help you with Java SocketServer but if you are able to use python instead I can help you Create a simple network listener like this import socket HOST = socket.gethostbyname(socket.gethostname()) s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP) s.bind((HOST, 0)) s.setsockopt(socket.IPPROTO_IP, socket.IP_HDRINCL, 1) s.connect(socket.SIO_RCVALL, socket.RCVALL_ON) while True: data, addr = s.recvfrom(65565) once that is done you can create a debian package from that .py file and upload it to your android phone
8th Jun 2020, 12:15 AM
Seaver Olson