Skip to content

Commit 9832541

Browse files
carlospolopHackTricks PEASS Wordlist Updaterchack-agent
authored
Auto-merge PR #673 (Chack Agent)
* wordlist-updater: refresh linpeas vulnerability lists * Fix CI failures for PR #673 --------- Co-authored-by: HackTricks PEASS Wordlist Updater <peass-wordlist-updater@hacktricks.xyz> Co-authored-by: chack-agent <chack-agent@users.noreply.github.com>
1 parent 58f2fc8 commit 9832541

3 files changed

Lines changed: 21 additions & 4 deletions

File tree

linPEAS/builder/linpeas_parts/variables/sudovB.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Title: Variables - sudovB
22
# ID: sudovB
33
# Author: Carlos Polop
4-
# Last Update: 26-02-2026
4+
# Last Update: 03-08-2026
55
# Description: Sudo version bad regex
66
# License: GNU GPL
77
# Version: 1.0
@@ -13,4 +13,4 @@
1313
# Small linpeas: 1
1414

1515

16-
sudovB="[01].[012345678].[0-9]+|1.9.[01234][^0-9]|1.9.[01234]$|1.9.5p1|1\.9\.[6-9]|1\.9\.1[0-6]|1\.9\.17([^p]|$)"
16+
sudovB="[01].[012345678].[0-9]+|1.9.[01234][^0-9]|1.9.[01234]$|1.9.5p1|1\.9\.[6-9]|1\.9\.1[0-6]|1\.9\.17($|[^0-9p]|p[12]([^0-9]|$))"

linPEAS/builder/src/yamlGlobals.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55

66
script_folder = Path(os.path.dirname(os.path.abspath(__file__)))
77
target_file = script_folder / '..' / '..' / '..' / 'build_lists' / 'download_regexes.py'
8-
os.system(target_file)
8+
regexes_file = script_folder / '..' / '..' / '..' / 'build_lists' / 'regexes.yaml'
9+
if not regexes_file.exists():
10+
os.system(target_file)
911

1012
CURRENT_DIR = os.path.dirname(os.path.realpath(__file__))
1113

@@ -118,4 +120,3 @@
118120
SUDOVB2_MARKUP = YAML_LOADED["sudoVB2_markup"]
119121
CAP_SETUID_MARKUP = YAML_LOADED["cap_setuid_markup"]
120122
CAP_SETGID_MARKUP = YAML_LOADED["cap_setgid_markup"]
121-

linPEAS/tests/test_modules_metadata.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,22 @@ def test_sudo_l_check_is_bounded_for_non_interactive_runs(self):
109109
self.assertIn("sudo -n -l", content)
110110
self.assertNotRegex(content, r"secure_path_line=\$\(sudo\s+-l\b")
111111

112+
def test_yaml_globals_uses_committed_regexes_without_downloading(self):
113+
script = (
114+
"import sys; "
115+
f"sys.path.insert(0, {str(self.linpeas_dir)!r}); "
116+
"import builder.src.yamlGlobals"
117+
)
118+
result = subprocess.run(
119+
[sys.executable, "-c", script],
120+
cwd=str(self.repo_root),
121+
capture_output=True,
122+
text=True,
123+
)
124+
125+
self.assertEqual(result.returncode, 0, result.stderr)
126+
self.assertNotIn("Downloading regexes", result.stdout + result.stderr)
127+
112128

113129
if __name__ == "__main__":
114130
unittest.main()

0 commit comments

Comments
 (0)