I developed a script in Python which I was planning to send to multiple servers as a utility, so I decided the best way to do it is compile it as a executable file so everything I have to send is a single file, for that I'm using Cython with these commands:
#!/bin/bash
cp scan.py scan.pyx
cython scan.pyx --embed
gcc -Os -I /usr/include/python3.7m/ -o scan scan.c -lpython3.7m -lpthread -lm -lutil -ldl
That script (scan.py) uses certain dependencies (installed with pip3), such as python-nmap
and colorama
. When I tested sending the executable I was greeted with an error that says it does not find such python modules, which I thought cython embedded in the file, but apparently it doesn't. Is it possible to compile it with those modules?