peass-ng / PEASS-ng

PEASS - Privilege Escalation Awesome Scripts SUITE (with colors)
https://book.hacktricks.xyz
Other
15.73k stars 3.05k forks source link

Illegal options and sudo -l check function #57

Closed rafabbq closed 4 years ago

rafabbq commented 4 years ago

linpeas.sh v2.6.9 from master branch.

Hi noticed options -n and -P can't be used as they are flagged as illegal. I believe line: 65 needs amending to "allow" the options

while getopts "h?asd:p:i:qo:w" opt; do to something like while getopts "h?asd:n:P:p:i:qo:w" opt; do

Also when using -P so the PASSWORD variable is set to something so the check for sudo -l can be performed with a supplied password, it errors at line: 1264 the IF statment is not executed.

if [ "$PASSWORD"]; then needs a space if [ "$PASSWORD" ]; then

carlospolop commented 4 years ago

Hi @H6BOrZJf,

Thank you very much for letting me know these issues. Please, next time consider submitting a pull request because you were right about how to fix the issues.

Thank you.