Updated sites, improved submit dialog, bump to 0.2.2

This commit is contained in:
Soxoj
2021-05-07 12:27:24 +03:00
parent d59867b0d9
commit b6a207d0e3
10 changed files with 3044 additions and 2907 deletions
+6 -3
View File
@@ -37,7 +37,7 @@ from .submit import submit_dialog
from .types import QueryResultWrapper
from .utils import get_dict_ascii_tree
__version__ = '0.2.1'
__version__ = '0.2.2'
def notify_about_errors(search_results: QueryResultWrapper, query_notify):
@@ -511,12 +511,15 @@ async def main():
db, site_data, logger, max_connections=args.connections
)
if is_need_update:
if input('Do you want to save changes permanently? [Yn]\n').lower() == 'y':
if input('Do you want to save changes permanently? [Yn]\n').lower() in (
'y',
'',
):
db.save_to_file(args.db_file)
print('Database was successfully updated.')
else:
print('Updates will be applied only for current search session.')
print(db.get_scan_stats(site_data))
print('Scan sessions flags stats: ' + str(db.get_scan_stats(site_data)))
# Database statistics
if args.stats:
+1870 -1799
View File
File diff suppressed because it is too large Load Diff
+8 -2
View File
@@ -291,7 +291,13 @@ async def submit_dialog(db, url_exists, cookie_file, logger):
url_mainpage = extract_mainpage_url(url_exists)
sites = await detect_known_engine(db, url_exists, url_mainpage, logger)
print('Detecting site engine, please wait...')
sites = []
try:
sites = await detect_known_engine(db, url_exists, url_mainpage, logger)
except KeyboardInterrupt:
print('Engine detect process is interrupted.')
if not sites:
print("Unable to detect site engine, lets generate checking features")
sites = [
@@ -304,7 +310,7 @@ async def submit_dialog(db, url_exists, cookie_file, logger):
sem = asyncio.Semaphore(1)
print("Checking...")
print("Checking, please wait...")
found = False
chosen_site = None
for s in sites: