Is it possible to create custom packages using python?

Well, I know that this is possible using external libraries and modules like scapy. But what about without external modules? Without running the script as root? No external dependencies?

I do a lot of searches, but did not find much help. I would like to be able to create my own packages, but without running from root or installing additional dependencies.

Any suggestions?

+3
source share
2 answers

Many operating systems (Linux) do not allow raw sockets unless your effective user ID is 0 (aka root). This is not a library issue. Some operating systems (non-server Windows after Windows XP SP2) do not allow the processing of the socket period.

You can learn more about the raw man 7 raw sockets on your system. Note that socket parameters can be passed using the Python socket module.

+1
source

Here's how to encode raw ICMP ping packets in Python:

http://www.g-loaded.eu/2009/10/30/python-ping/

+2
source

Source: https://habr.com/ru/post/1745611/


All Articles