initial commit
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# Coded by [email protected]
|
||||
|
||||
# Import modules
|
||||
from flask import request
|
||||
|
||||
# Show reports only with selected domains
|
||||
def SearchReports(reports: list) -> list:
|
||||
domains = request.args.get("search_domains")
|
||||
# If empty
|
||||
if domains is None:
|
||||
return reports
|
||||
# Create empty list and parse domains
|
||||
result = []
|
||||
domains = domains.lower().split(", ")
|
||||
# Find reports
|
||||
for report in reports:
|
||||
pwds = report.passwords_list.lower()
|
||||
for domain in domains:
|
||||
if domain in pwds:
|
||||
result.append(report)
|
||||
|
||||
return result
|
||||
Reference in New Issue
Block a user