From 67e3744d5e7fa06716e36aa263880891ec382885 Mon Sep 17 00:00:00 2001 From: Caleb Stewart Date: Tue, 2 Jun 2020 21:25:39 -0400 Subject: [PATCH] Minor refactor in sudo --- pwncat/privesc/sudo.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pwncat/privesc/sudo.py b/pwncat/privesc/sudo.py index a37de88..88f14f4 100644 --- a/pwncat/privesc/sudo.py +++ b/pwncat/privesc/sudo.py @@ -53,10 +53,7 @@ class Method(BaseMethod): techniques = [] for rule in rules: for method in pwncat.victim.gtfo.iter_sudo(rule.command, caps=capability): - if rule.runas_user == "ALL": - user = "root" - else: - user = rule.runas_user + user = "root" if rule.runas_user == "ALL" else rule.runas_user techniques.append(Technique(user, self, (method, rule), method.cap)) return techniques