Skip to content

Commit 42fb502

Browse files
committed
Update the total amount of templates in README.md
1 parent 0deab84 commit 42fb502

File tree

2 files changed

+11
-17
lines changed

2 files changed

+11
-17
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# Nuclei + Wordfence = ♥
66

7-
This project provides a massive up-to-date collection of Nuclei templates that can be used to scan for vulnerabilities in WordPress. The templates are based on the vulnerability reports of Wordfence.com.
7+
This project provides a massive up-to-date collection of **<!-- START: __TOTAL_NUM_TEMPLATES -->13,264<!-- END: __TOTAL_NUM_TEMPLATES --> Nuclei templates** that can be used to scan for vulnerabilities in WordPress Core, WordPress Plugins and WordPress Themes. The templates are based on the vulnerability reports of [Wordfence.com](https://www.wordfence.com/threat-intel/vulnerabilities/).
88

99
This project is a valuable resource for anyone who wants to scan for vulnerabilities in WordPress-based websites. The templates are easy to use and up-to-date, and they are open source so you can modify them to fit your specific needs. If you are responsible for the security of a website that uses WordPress, I highly recommend using this project to scan for vulnerabilities.
1010

@@ -25,7 +25,7 @@ This project is a valuable resource for anyone who wants to scan for vulnerabili
2525
<!-- START: __STATISTICS_TABLE -->
2626
| category | total |
2727
|---|---|
28-
| wp-plugins | [12566](https://github.com/search?q=%22wp-plugin%22+repo%3Atopscoder%2Fnuclei-wordfence-cve+language%3AYAML&type=code&ref=advsearch) |
28+
| wp-plugins | [12,566](https://github.com/search?q=%22wp-plugin%22+repo%3Atopscoder%2Fnuclei-wordfence-cve+language%3AYAML&type=code&ref=advsearch) |
2929
| wp-themes | [357](https://github.com/search?q=%22wp-theme%22+repo%3Atopscoder%2Fnuclei-wordfence-cve+language%3AYAML&type=code&ref=advsearch) |
3030
| wp-core | [332](https://github.com/search?q=%22wp-core%22+repo%3Atopscoder%2Fnuclei-wordfence-cve+language%3AYAML&type=code&ref=advsearch) |
3131
| other | [16](https://github.com/search?q=repo%3Atopscoder%2Fnuclei-wordfence-cve+language%3AYAML++NOT+%22wp-plugin%22+NOT+%22wp-core%22+NOT+%22wp-theme%22+path%3A%2F%5Enuclei-templates%5C%2F%2F&type=code&ref=advsearch) |
@@ -35,9 +35,9 @@ This project is a valuable resource for anyone who wants to scan for vulnerabili
3535
|---|---|
3636
| info | [7](https://github.com/search?q=%22severity%3A+info%22+repo%3Atopscoder%2Fnuclei-wordfence-cve+language%3AYAML&type=code&ref=advsearch) |
3737
| low | [71](https://github.com/search?q=severity%3A+low+repo%3Atopscoder%2Fnuclei-wordfence-cve+language%3AYAML&type=code&ref=advsearch) |
38-
| medium | [9553](https://github.com/search?q=severity%3A+medium+repo%3Atopscoder%2Fnuclei-wordfence-cve+language%3AYAML&type=code&ref=advsearch) |
39-
| high | [2623](https://github.com/search?q=severity%3A+high+repo%3Atopscoder%2Fnuclei-wordfence-cve+language%3AYAML&type=code&ref=advsearch) |
40-
| critical | [1009](https://github.com/search?q=severity%3A+critical+repo%3Atopscoder%2Fnuclei-wordfence-cve+language%3AYAML&type=code&ref=advsearch) |
38+
| medium | [9,553](https://github.com/search?q=severity%3A+medium+repo%3Atopscoder%2Fnuclei-wordfence-cve+language%3AYAML&type=code&ref=advsearch) |
39+
| high | [2,623](https://github.com/search?q=severity%3A+high+repo%3Atopscoder%2Fnuclei-wordfence-cve+language%3AYAML&type=code&ref=advsearch) |
40+
| critical | [1,009](https://github.com/search?q=severity%3A+critical+repo%3Atopscoder%2Fnuclei-wordfence-cve+language%3AYAML&type=code&ref=advsearch) |
4141
<!-- END: __STATISTICS_TABLE -->
4242

4343
## Usage

scripts/parse.readme.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
medium = 0
1313
low = 0
1414
info = 0
15+
total = 0
1516

1617

1718
for file in glob.glob("./nuclei-templates/**/*.yaml"):
19+
total += 1
1820
with open(file) as f:
1921
content = f.read()
2022

@@ -62,6 +64,8 @@
6264
high = '{:,}'.format(high)
6365
critical = '{:,}'.format(critical)
6466

67+
total = '{:,}'.format(total)
68+
6569
table = "<!-- START: __STATISTICS_TABLE -->\n"
6670
table += "| category | total |\n"
6771
table += "|---|---|\n"
@@ -82,18 +86,6 @@
8286
table += "<!-- END: __STATISTICS_TABLE -->"
8387

8488

85-
def write_list_to_file(file_list, target_file, marker_start, marker_end):
86-
content = f"{marker_start}\n"
87-
content += "| |\n"
88-
content += "|---|\n"
89-
for f in file_list:
90-
content += f"| [{os.path.basename(f)}]({f}) |\n"
91-
92-
content += f"{marker_end}\n"
93-
94-
return write_string_to_file(content, target_file, marker_start, marker_end)
95-
96-
9789
def write_string_to_file(string, target_file, marker_start, marker_end):
9890
marker = f"{marker_start}.*{marker_end}"
9991
with open(target_file, "r") as f:
@@ -103,5 +95,7 @@ def write_string_to_file(string, target_file, marker_start, marker_end):
10395
with open(target_file, "w") as f2:
10496
f2.write(content)
10597

98+
total_marker = f"<!-- START: __TOTAL_NUM_TEMPLATES -->{total}<!-- END: __TOTAL_NUM_TEMPLATES -->"
10699

100+
write_string_to_file(total_marker, "README.md", "<!-- START: __TOTAL_NUM_TEMPLATES -->", "<!-- END: __TOTAL_NUM_TEMPLATES -->")
107101
write_string_to_file(table, "README.md", "<!-- START: __STATISTICS_TABLE -->", "<!-- END: __STATISTICS_TABLE -->")

0 commit comments

Comments
 (0)