Python调用cmd隐藏执行命令

2022-04-20 10:20

调用subprocess库隐藏执行cmd命令,常用于权限维持
# 隐藏执行命令
import subprocess
def code(cmd):a
    subprocess.call(cmd, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

code('ping www.baidu.com')
posted @ 2022-06-02 14:50  Haibara-Z3r0  阅读(83)  评论(0编辑  收藏  举报