Add README.py and update README.md

Add a Python3 script named README.py to automatically update the
README.md on triggers.

Some stuffs is missing like the numbers of HTTP/DNS requests per
template Directory. Feel free to contribute if you think it's reliable.
patch-1
toufik-airane 2020-09-09 19:23:19 +02:00
parent 0d0cb8c225
commit eb1a417534
No known key found for this signature in database
GPG Key ID: AE64332177735A5F
2 changed files with 91 additions and 27 deletions

69
.github/README.py vendored Normal file
View File

@ -0,0 +1,69 @@
#!/usr/bin/env python3
import os
import subprocess
def numberOfTemplates(path):
return len(os.listdir(path))
tree = "\n".join( \
subprocess.check_output("tree", shell=True). \
decode("utf-8").split("\n")[3:-3])
resume = "\n".join( \
subprocess.check_output("tree", shell=True). \
decode("utf-8").split("\n")[-3:]).strip()
version = "7.0.0"
readme = f"""
# Nuclei Templates
[![License](https://img.shields.io/badge/license-MIT-_red.svg)](https://opensource.org/licenses/MIT)
[![GitHub Release](https://img.shields.io/github/release/projectdiscovery/nuclei-templates)](https://github.com/projectdiscovery/nuclei-templates/releases)
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/projectdiscovery/nuclei-templates/issues)
[![Follow on Twitter](https://img.shields.io/twitter/follow/pdnuclei.svg?logo=twitter)](https://twitter.com/pdnuclei)
[![Chat on Discord](https://img.shields.io/discord/695645237418131507.svg?logo=discord)](https://discord.gg/KECAGdH)
Templates are the core of [nuclei scanner](https://github.com/projectdiscovery/nuclei) which power the actual scanning engine. This repository stores and houses various templates for the scanner provided by our team as well as contributed by the community. We hope that you also contribute by sending templates via **pull requests** or [Github issue](https://github.com/projectdiscovery/nuclei-templates/issues/new?assignees=&labels=&template=submit-template.md&title=%5Bnuclei-template%5D+) and grow the list.
An overview of the nuclei template directory including number of templates and HTTP request associated with each directory.
### nuclei templates `v{version}`
| Template Directory | Number of Templates |
|----|----|
| cves | {numberOfTemplates("cves")} |
| default-credentials | {numberOfTemplates("default-credentials")} |
| dns | {numberOfTemplates("dns")} |
| files | {numberOfTemplates("files")} |
| generic-detections | {numberOfTemplates("generic-detections")} |
| panels | {numberOfTemplates("panels")} |
| security-misconfiguration | {numberOfTemplates("security-misconfiguration")} |
| subdomain-takeover | {numberOfTemplates("subdomain-takeover")} |
| technologies | {numberOfTemplates("technologies")} |
| tokens | {numberOfTemplates("tokens")} |
| vulnerabilities | {numberOfTemplates("vulnerabilities")} |
| workflows | {numberOfTemplates("workflows")} |
### nuclei templates `v{version}` tree overview
```
{tree}
```
{resume}.
Please navigate to https://nuclei.projectdiscovery.io for detailed documentation to build new and your own custom templates and many example templates for easy understanding.
------
**Notes:**
1. Use YAMLlint (e.g. [yamllint](http://www.yamllint.com/)) to validate new templates when sending pull requests.
2. Use YAML Formatter (e.g. [jsonformatter](https://jsonformatter.org/yaml-formatter)) to format new templates when sending pull requests.
Thanks again for your contribution and keeping the community vibrant. :heart:
"""
f = open("README.md", "w")
f.write(readme)
f.close()

View File

@ -1,3 +1,4 @@
# Nuclei Templates
[![License](https://img.shields.io/badge/license-MIT-_red.svg)](https://opensource.org/licenses/MIT)
@ -10,27 +11,24 @@ Templates are the core of [nuclei scanner](https://github.com/projectdiscovery/n
An overview of the nuclei template directory including number of templates and HTTP request associated with each directory.
### nuclei templates `v7.0.0`
### nuclei templates `7.0.0`
| Template Directory | Number of Templates | Number of HTTP/DNS requests |
|---------------------------|--------------------------|------------------------------|
| cves |86 |131 |
| default-credentials |03 |04 |
| dns |04 |04 |
| files |34 |111 |
| generic-detections |03 |03 |
| panels |28 |82 |
| security-misconfiguration |16 |93 |
| subdomain-takeover |02 |02 |
| technologies |24 |43 |
| tokens |07 |07 |
| vulnerabilities |26 |55 |
| workflows |12 |12* |
| Template Directory | Number of Templates |
|----|----|
| cves | 98 |
| default-credentials | 3 |
| dns | 4 |
| files | 35 |
| generic-detections | 3 |
| panels | 28 |
| security-misconfiguration | 16 |
| subdomain-takeover | 2 |
| technologies | 25 |
| tokens | 7 |
| vulnerabilities | 27 |
| workflows | 13 |
### nuclei templates `v7.0.0` tree overview
<details>
<summary>Template Directory</summary>
### nuclei templates `7.0.0` tree overview
```
├── cves
@ -51,6 +49,7 @@ An overview of the nuclei template directory including number of templates and H
│   ├── CVE-2018-13379.yaml
│   ├── CVE-2018-14728.yaml
│   ├── CVE-2018-16341.yaml
│   ├── CVE-2018-16763.yaml
│   ├── CVE-2018-18069.yaml
│   ├── CVE-2018-19439.yaml
│   ├── CVE-2018-20824.yaml
@ -88,6 +87,7 @@ An overview of the nuclei template directory including number of templates and H
│   ├── CVE-2019-3799.yaml
│   ├── CVE-2019-5418.yaml
│   ├── CVE-2019-6112.yaml
│   ├── CVE-2019-7256.yaml
│   ├── CVE-2019-7609.yaml
│   ├── CVE-2019-8449.yaml
│   ├── CVE-2019-8451.yaml
@ -193,9 +193,7 @@ An overview of the nuclei template directory including number of templates and H
│   ├── jenkins-asyncpeople.yaml
│   ├── jmx-console.yaml
│   ├── kubernetes-pods.yaml
│   ├── mongo-express-web-gui.yaml
│   ├── parallels-html-client.yaml
│   ├── pfsense-web-gui.yaml
│   ├── phpmyadmin-panel.yaml
│   ├── polycom-admin-detect.yaml
│   ├── pulse-secure-panel.yaml
@ -206,11 +204,10 @@ An overview of the nuclei template directory including number of templates and H
│   ├── supervpn-panel.yaml
│   ├── swagger-panel.yaml
│   ├── tikiwiki-cms.yaml
│   ├── traefik-dashboard
│   ├── traefik-dashboard.yaml
│   ├── weave-scope-dashboard-detect.yaml
│   ├── webeditors.yaml
│   └── workspaceone-uem-airWatch-dashboard-detect.yaml
│   └── workspaceone-uem-airwatch-dashboard-detect.yaml
├── payloads
│   ├── CVE-2020-5776.csv
│   └── CVE-2020-6287.xml
@ -269,6 +266,7 @@ An overview of the nuclei template directory including number of templates and H
│   ├── mailchimp-api-key.yaml
│   └── slack-access-token.yaml
├── vulnerabilities
│   ├── bullwark-momentum-series-directory-traversal.yaml
│   ├── cached-aem-pages.yaml
│   ├── couchdb-adminparty.yaml
│   ├── crlf-injection.yaml
@ -311,9 +309,7 @@ An overview of the nuclei template directory including number of templates and H
└── wordpress-workflow.yaml
```
</details>
13 directories, **263 templates**.
13 directories, 265 files.
Please navigate to https://nuclei.projectdiscovery.io for detailed documentation to build new and your own custom templates and many example templates for easy understanding.
@ -323,4 +319,3 @@ Please navigate to https://nuclei.projectdiscovery.io for detailed documentation
2. Use YAML Formatter (e.g. [jsonformatter](https://jsonformatter.org/yaml-formatter)) to format new templates when sending pull requests.
Thanks again for your contribution and keeping the community vibrant. :heart: