mirror of
https://github.com/calebstewart/pwncat.git
synced 2024-11-24 01:25:37 +01:00
Minor refactor in sudo
This commit is contained in:
parent
e3583607ba
commit
67e3744d5e
@ -53,10 +53,7 @@ class Method(BaseMethod):
|
|||||||
techniques = []
|
techniques = []
|
||||||
for rule in rules:
|
for rule in rules:
|
||||||
for method in pwncat.victim.gtfo.iter_sudo(rule.command, caps=capability):
|
for method in pwncat.victim.gtfo.iter_sudo(rule.command, caps=capability):
|
||||||
if rule.runas_user == "ALL":
|
user = "root" if rule.runas_user == "ALL" else rule.runas_user
|
||||||
user = "root"
|
|
||||||
else:
|
|
||||||
user = rule.runas_user
|
|
||||||
techniques.append(Technique(user, self, (method, rule), method.cap))
|
techniques.append(Technique(user, self, (method, rule), method.cap))
|
||||||
|
|
||||||
return techniques
|
return techniques
|
||||||
|
Loading…
Reference in New Issue
Block a user