bash 转换为C代码,并编译为可执行文件
[root@localhost ~]# wget http://www.datsi.fi.upm.es/~frosal/sources/shc-3.8.9.tgz
[root@localhost ~]# tar xvfz shc-3.8.9.tgz
[root@localhost ~]# cd shc-3.8.9
[root@localhost shc-3.8.9]# gcc -c shc.c
[root@localhost shc-3.8.9]# gcc -o shc shc.o
[root@localhost shc-3.8.9]# cp -a shc /bin/
[root@localhost ~]# shc -r -T -f wang.sh
[root@localhost ~]# gcc -c wang.sh.x.c
[root@localhost ~]# gcc -o wang wang.sh.x.o
将python代码转换为C代码
[root@localhost ~]# yum install -y epel-release
[root@localhost ~]# yum install -y python-pip
[root@localhost ~]# yum install -y python-dev*
[root@localhost ~]# pip install cython
[root@localhost ~]# vim lyshark.py
[root@localhost ~]# cython lyshark.py --embed
[root@localhost ~]# gcc python-config --cflags
python-config --ldflags
lyshark.c -o lyshark
原文:https://www.cnblogs.com/LyShark/p/10889555.html