【发布时间】:2024-08-02 06:30:02
【问题描述】:
我需要运行这个命令来打开一个mac加密的图像,我忘记了密码,想暴力破解。
为了检查我的代码是否正常工作,我创建了一个新图像来检查它。它不起作用。
$command = "echo -n Secure@3@1| hdiutil attach -stdinpass Hidden.dmg"
// I have tried exec, shell_exec, popen like
exec($command);
// Every time it returns `hdiutil: attach failed - Authentication error`
有人可以建议代码有什么问题,因为我已经从 shell 本身验证了密码正确并且命令有效。
【问题讨论】:
标签: php command-line-interface exec shell-exec