Skip to content

Commit

Permalink
fixed default nuclei conf, added better presentation of subs in web e…
Browse files Browse the repository at this point in the history
…xport
  • Loading branch information
ugomeguerditchian committed Apr 3, 2023
1 parent 2042a84 commit ab6e642
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 70 deletions.
2 changes: 1 addition & 1 deletion libs/ip_scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def nuclei_scan(hosts: list, domain: str, vulnconf: str) -> dict:
)
else:
os.system(
f"nuclei -l nuclei/{domain}/hosts.txt -rl 500 -c 200 -bs 200 -hbs 200 -headc 200 -json -o nuclei/{domain}/results_{actual_time}.json"
f"nuclei -l nuclei/{domain}/hosts.txt -json -rl 500 -c 200 -bs 200 -hbs 200 -headc 200 -o nuclei/{domain}/results_{actual_time}.json"
)
# read the output
with open(f"nuclei/{domain}/results_{actual_time}.json", "r") as f:
Expand Down
2 changes: 1 addition & 1 deletion libs/result_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def dynamic_save(all_results: dict, domain: str, mode: str):
position = i
with open(f"exports/{domain}/dynamic_sub_save.txt", "a") as file:
for sub in down:
file.write(str(sub)+"\r")
file.write(str(sub) + "\r")
else:
logger.error("No subdomains found, exiting...")
exit(1)
Expand Down
14 changes: 10 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,10 +641,16 @@ def menu():
path = os.sep.join(
[os.getcwd(), f"exports/{domain}/html_report_{domain}_{date}.html"]
)
if os.name == "nt":
os.startfile(path)
if sys.platform.startswith("linux"):
os.system("xdg-open " + path)
try:
if os.name == "nt":
os.startfile(path)
if sys.platform.startswith("linux"):
os.system("xdg-open " + path)
if sys.platform.startswith("darwin"):
os.system("open " + path)
except Exception as e:
logger.error(e)
logger.error("Can't open the result in your browser")
logger.info("Exiting...")


Expand Down
2 changes: 1 addition & 1 deletion manifest
Original file line number Diff line number Diff line change
@@ -1 +1 @@
V2.2.2.03
V2.2.3
95 changes: 32 additions & 63 deletions website/jinja_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,77 +135,46 @@ <h2>
aria-labelledby="nav-sub-tab"
tabindex="0">
<div class="d-flex gap-2 flex-column">
<h2>Subdomains</h2>
<div style="overflow-x:scroll">
<table id="myTableSubs" class="display nowrap" style="width:100%">
<thead>
<tr>
<th>Subdomain</th>
<th>IP</th>
<th>Category</th>
<th>Technologies</th>
<th>Headers</th>
</tr>
</thead>
</div>
</div>
<tbody>
{% for ip in data %}
{% if ip != "dead_subdomains" and ip !="dns_exist"%}
{% for subs_type, value in data[ip]["subdomains"].items() %}
{% if subs_type != "web_techno" and subs_type != "vulns" and
data[ip]["subdomains"][subs_type]|length >
0%}
<div class="accordion"
id="subsaccordion{{ subs_type }}{{ip | replace('.', '-')}}">
<div class="accordion-item">
<h2 class="accordion-header"
id="headingOne{{ subs_type }}{{ip | replace('.', '-')}}">
{{ buttonAccordion(ip ~ " - " ~ subs_type, [value|length], "collapseOne" ~ subs_type ~ ip | replace('.', '-')) }}
</h2>
<div id="collapseOne{{ subs_type }}{{ip | replace('.', '-')}}"
class="accordion-collapse collapse"
aria-labelledby="headingOne{{ subs_type }}{{ip | replace('.', '-')}}"
data-bs-parent="#subsaccordion{{ subs_type }}{{ip | replace('.', '-')}}">
<div class="accordion-body d-flex gap-2 flex-column">
{% for sub in value %}
{% if sub in data[ip]["subdomains"]["web_techno"] and "tech" in
data[ip]["subdomains"]["web_techno"][sub] and
data[ip]["subdomains"]["web_techno"][sub]["tech"]|length > 0 and "headers" in
data[ip]["subdomains"]["web_techno"][sub] and
data[ip]["subdomains"]["web_techno"][sub]["headers"]|length > 0 %}
<div class="accordion"
id="techaccordion{{ sub }}">
<div class="accordion-item">
<h2 class="accordion-header"
id="headingOne{{ sub }}">
<button class="accordion-button"
type="button"
data-bs-toggle="collapse"
data-bs-target="#collapseOne{{ sub }}"
aria-expanded="false"
aria-controls="collapseOne{{ sub }}">
{{sub}}
</button>
</h2>
<div id="collapseOne{{ sub }}"
class="accordion-collapse collapse"
aria-labelledby="headingOne{{ sub }}"
data-bs-parent="#techaccordion{{ sub }}">
<div class="accordion-body">
{{tableCustom("Technologies",["name", "version"], data[ip]["subdomains"]["web_techno"][sub]["tech"])}}
{{tableCustom("Headers", ["name", "value"],data[ip]["subdomains"]["web_techno"][sub]["headers"])}}
</div>
</div>
</div>
</div>
{% else %}
<div class="accordion">
<div class="accordion-item">
<div class="accordion-header">
<button disabled
class="btn accordion-button collapsed"
type="button"
data-bs-toggle="collapse"
aria-expanded="false">
<a>{{sub}}</a>
</button>
</div>
</div>
</div>
{% endif %}
{% endfor %}
</div>
</div>
</div>
</div>
{% for sub in data[ip]["subdomains"][subs_type] %}
<tr>
<td>{{sub}}</td>
<td>{{ip}}</td>
<td>{{subs_type}}</td>
<td>{% if sub in data[ip]["subdomains"]["web_techno"] %}{{data[ip]["subdomains"]["web_techno"][sub]["tech"]}}{% endif %}</td>
<td>{% if sub in data[ip]["subdomains"]["web_techno"] %}{{data[ip]["subdomains"]["web_techno"][sub]["headers"]}}{% endif %}</td>
</tr>
{% endfor %}

{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
</tbody>
</table>
</div>
{% for ip in data %}
{% if ip != "dead_subdomains" and ip !="dns_exist"%}
{% elif ip=="dead_subdomains" %}
<div class="accordion"
id="Deadsaccordion">
Expand Down

0 comments on commit ab6e642

Please sign in to comment.