-
Notifications
You must be signed in to change notification settings - Fork 50
Description
Hello Developers,
I am facing a similar issue. When I first ran the script on my WSL, it worked fine for the first scan. It displayed the test results and even showed that the URL was vulnerable. However, when I try scanning the same URL again, it shows "0 URLs scanned" and I encounter the following error:
FO:sqlmc.lib.scanner:[2025-04-21 06:02:36.025800] Scanned: http://testphp.vulnweb.com/cart.php, Vulnerable: False, Database: None
INFO:sqlmc.lib.scanner:[2025-04-21 06:02:36.026069] Scanned: http://testphp.vulnweb.com/guestbook.php, Vulnerable: False, Database: None
INFO:sqlmc.lib.scanner:[2025-04-21 06:02:36.029254] Scanned: http://testphp.vulnweb.com/categories.php, Vulnerable: False, Database: None
INFO:sqlmc.lib.scanner:[2025-04-21 06:02:36.029521] Scanned: http://testphp.vulnweb.com/AJAX/index.php, Vulnerable: False, Database: None
Traceback (most recent call last):
File "/home/unknone/.local/bin/sqlmc", line 8, in
sys.exit(main())
^^^^^^
File "/home/unknone/.local/lib/python3.12/site-packages/sqlmc/sqlmc.py", line 41, in main
sqlscanner = scanner.Scanner(url, depth)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/unknone/.local/lib/python3.12/site-packages/sqlmc/lib/scanner.py", line 24, in init
asyncio.run(self.scan(url, depth))
File "/usr/lib/python3.12/asyncio/runners.py", line 194, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home/unknone/.local/lib/python3.12/site-packages/sqlmc/lib/scanner.py", line 60, in scan
await asyncio.gather(*tasks)
File "/home/unknone/.local/lib/python3.12/site-packages/sqlmc/lib/scanner.py", line 74, in scan_single_link
await self.scan(href, depth - 1)
File "/home/unknone/.local/lib/python3.12/site-packages/sqlmc/lib/scanner.py", line 60, in scan
await asyncio.gather(*tasks)
File "/home/unknone/.local/lib/python3.12/site-packages/sqlmc/lib/scanner.py", line 74, in scan_single_link
await self.scan(href, depth - 1)
File "/home/unknone/.local/lib/python3.12/site-packages/sqlmc/lib/scanner.py", line 60, in scan
await asyncio.gather(*tasks)
File "/home/unknone/.local/lib/python3.12/site-packages/sqlmc/lib/scanner.py", line 74, in scan_single_link
await self.scan(href, depth - 1)
File "/home/unknone/.local/lib/python3.12/site-packages/sqlmc/lib/scanner.py", line 45, in scan
html = await self.fetch_html(url)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/unknone/.local/lib/python3.12/site-packages/sqlmc/lib/scanner.py", line 39, in fetch_html
return await response.text()
^^^^^^^^^^^^^^^^^^^^^
File "/home/unknone/.local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1265, in text
return self._body.decode(encoding, errors=errors) # type: ignore[union-attr]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
It seems like the issue arises when trying to decode the response text from the URL. Any advice on how to resolve this issue?
