mirror of
https://github.com/projectdiscovery/nuclei-templates.git
synced 2026-01-31 15:53:33 +08:00
🔨 Refactoring countTpl function: use glob instead
This commit is contained in:
4
.github/scripts/update-readme.py
vendored
4
.github/scripts/update-readme.py
vendored
@@ -1,9 +1,9 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import glob
|
||||
import subprocess
|
||||
|
||||
def countTpl(path):
|
||||
return len(os.listdir(path))
|
||||
return len(glob.glob(path + "/*.*"))
|
||||
|
||||
def command(args, start=None, end=None):
|
||||
return "\n".join(subprocess.run(args, text=True, capture_output=True).stdout.split("\n")[start:end])[:-1]
|
||||
|
||||
Reference in New Issue
Block a user