Merge pull request #721 from dwisiswant0/refactor/update-readme

Refactor Auto Update README
patch-1
PD-Team 2021-01-02 15:38:25 +05:30 committed by GitHub
commit cfacfe1dd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@ An overview of the nuclei template directory including number of templates and H
| Templates | Counts | Templates | Counts |
| ------------------ | -------------------------------- | ------------------------- | --------------------------------------- |
| cves | {countTpl("cves")} | files | {countTpl("files")} |
| cves | {countTpl("cves/*")} | files | {countTpl("files")} |
| vulnerabilities | {countTpl("vulnerabilities")} | panels | {countTpl("panels")} |
| technologies | {countTpl("technologies")} | security-misconfiguration | {countTpl("security-misconfiguration")} |
| workflows | {countTpl("workflows")} | tokens | {countTpl("tokens")} |

View File

@ -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]