【发布时间】:2018-11-18 05:53:58
【问题描述】:
我正在尝试使用 python 导出环境变量,但我似乎无法弄清楚。 这就是我要复制的内容:
export SHELLCODE = $(python -c "print <shellcode here>")
这是我的代码:
subprocess.Popen('export Shellcode=$(python -c \"print "{}" \')'.format(shellcode), shell=True)
但是当我运行它时,它会说
File "<string>", line 1
print 1�Ph//shh/bin
^
【问题讨论】:
-
你能更正打印附近的双引号吗?您的代码示例中有三个,而上面的 shell 示例中只有两个。
标签: python buffer-overflow shellcode