#!/bin/bash
#
echo "正在产生hello.c"
echo
cat <<'EOF' > hello.c
#include <stdio.h>
int main(){
printf("Hello ,this is here document!\n");
return 0;
}
EOF
echo "正在编译hello.c"
echo
#编译hello.c,产生执行文件 gcc -o hello hello.c
#若编译成功
if [ $? -eq 0 ]
then
echo "执行hello...."
echo ./hello
else echo 'Compile ERROR:hello.c'
fi
这就是shell script携带攻击程序的原型!
浙公网安备 33010602011771号