Update wordpress-plugins-update.py
parent
a8b70a24ea
commit
3ab3350221
|
@ -9,7 +9,7 @@ compares the detect version with the payload version.
|
||||||
The generated template also includes the tags top-100 and top-200 allowing filtering.
|
The generated template also includes the tags top-100 and top-200 allowing filtering.
|
||||||
|
|
||||||
e.g.
|
e.g.
|
||||||
nuclei -t technologies/wordpress/plugins -tags top-100 -u https://www.example.com
|
nuclei -t http/technologies/wordpress/plugins -tags top-100 -u https://www.example.com
|
||||||
'''
|
'''
|
||||||
|
|
||||||
__author__ = "ricardomaia"
|
__author__ = "ricardomaia"
|
||||||
|
@ -43,8 +43,7 @@ for page_number in range(1, 11):
|
||||||
|
|
||||||
# Parse HTML
|
# Parse HTML
|
||||||
soup = BeautifulSoup(html, 'html.parser')
|
soup = BeautifulSoup(html, 'html.parser')
|
||||||
|
results = soup.find(class_="plugin-cards")
|
||||||
results = soup.find(id="main")
|
|
||||||
articles = results.find_all("div", class_="plugin-card")
|
articles = results.find_all("div", class_="plugin-card")
|
||||||
|
|
||||||
# Setting the top tag
|
# Setting the top tag
|
||||||
|
@ -123,7 +122,7 @@ info:
|
||||||
wpscan: https://wpscan.com/plugin/{name}
|
wpscan: https://wpscan.com/plugin/{name}
|
||||||
tags: tech,wordpress,wp-plugin,{top_tag}
|
tags: tech,wordpress,wp-plugin,{top_tag}
|
||||||
|
|
||||||
requests:
|
http:
|
||||||
- method: GET
|
- method: GET
|
||||||
|
|
||||||
path:
|
path:
|
||||||
|
@ -164,7 +163,7 @@ requests:
|
||||||
work_dir = os.getcwd()
|
work_dir = os.getcwd()
|
||||||
print(f"Current working directory: {work_dir}")
|
print(f"Current working directory: {work_dir}")
|
||||||
helper_dir = f"{work_dir}/helpers/wordpress/plugins"
|
helper_dir = f"{work_dir}/helpers/wordpress/plugins"
|
||||||
template_dir = f"{work_dir}/technologies/wordpress/plugins"
|
template_dir = f"{work_dir}/http/technologies/wordpress/plugins"
|
||||||
|
|
||||||
if not os.path.exists(helper_dir):
|
if not os.path.exists(helper_dir):
|
||||||
os.makedirs(helper_dir)
|
os.makedirs(helper_dir)
|
||||||
|
@ -177,7 +176,7 @@ requests:
|
||||||
version_file.write(version)
|
version_file.write(version)
|
||||||
version_file.close()
|
version_file.close()
|
||||||
|
|
||||||
template_path = f"technologies/wordpress/plugins/{name}.yaml"
|
template_path = f"http/technologies/wordpress/plugins/{name}.yaml"
|
||||||
template_file = open(template_path, "w") # Dev environment
|
template_file = open(template_path, "w") # Dev environment
|
||||||
template_file.write(template)
|
template_file.write(template)
|
||||||
template_file.close()
|
template_file.close()
|
||||||
|
|
Loading…
Reference in New Issue