🔨 Auto update readme improves

patch-1
Dwi Siswanto 2020-11-18 01:18:20 +07:00
parent 7f48d4c8c5
commit 2a3259b338
2 changed files with 69 additions and 0 deletions

50
.github/scripts/README.tmpl vendored Normal file
View File

@ -0,0 +1,50 @@
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 `{version}`
| Template Directory | Number of Templates |
|----|----|
| cves | {countTpl("cves")} |
| default-credentials | {countTpl("default-credentials")} |
| dns | {countTpl("dns")} |
| files | {countTpl("files")} |
| generic-detections | {countTpl("generic-detections")} |
| panels | {countTpl("panels")} |
| security-misconfiguration | {countTpl("security-misconfiguration")} |
| subdomain-takeover | {countTpl("subdomain-takeover")} |
| technologies | {countTpl("technologies")} |
| tokens | {countTpl("tokens")} |
| vulnerabilities | {countTpl("vulnerabilities")} |
| workflows | {countTpl("workflows")} |
### Nuclei templates `{version}` tree overview
<details>
<summary> Nuclei templates </summary>
```
{command("tree", 1, -2)}
```
<details>
**{command("tree", -2, None)}**.
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:
"""

19
.github/scripts/update-readme.py vendored Normal file
View File

@ -0,0 +1,19 @@
#!/usr/bin/env python3
import argparse
import os
import subprocess
def countTpl(path):
return len(os.listdir(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]
if __name__ == "__main__":
version = command(["git", "describe", "--tags", "--abbrev=0"])
template = eval(open('.github/scripts/README.tmpl', 'r').read())
print(template)
f = open("README.md", "w")
f.write(readme)
f.close()