>>> import os, stat
>>> ping = os.stat('/bin/ping')
>>> ping.st_mode & stat.S_ISUID
2048
>>> echo = os.stat('/bin/echo')
>>> echo.st_mode & stat.S_ISUID
0
python 判断文件是否具有suid权限
最新推荐文章于 2023-02-07 10:04:08 发布
>>> import os, stat
>>> ping = os.stat('/bin/ping')
>>> ping.st_mode & stat.S_ISUID
2048
>>> echo = os.stat('/bin/echo')
>>> echo.st_mode & stat.S_ISUID
0