You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sfcli.py (lines 39–42) falls back to import pyreadline as readline on
platforms without the readline stdlib module (e.g. Windows). pyreadline
is unmaintained (last release 2019) and crashes on Python 3.13:
AttributeError: module 'collections' has no attribute 'Callable'
(pyreadline/py3k_compat.py, line 8)
collections.Callable was removed in Python 3.10; pyreadline's py3k shim
still references it, so the SpiderFoot CLI is broken on Windows + Python 3.13
either way (missing module without pyreadline installed, or this crash with
it installed).
This change prefers pyreadline3 — the maintained fork with Python 3.10+
support — before falling back to legacy pyreadline, keeping old installs
working.
Verification (Windows 11, Python 3.13.9)
Before:
$ python -c "from sfcli import SpiderFootCli"
ModuleNotFoundError: No module named 'pyreadline' # pyreadline not installed
AttributeError: module 'collections' has no attribute 'Callable' # with legacy pyreadline
Server options:
-p, --port=PORT Listen port (Default: 8081)
--interface=IP Listen interface (Default: 127.0.0.1)
SSRF request options:
-u, --url=URL Target URL vulnerable to SSRF.
-f, --file=FILE Load HTTP request from a file.
--placeholder=STR Placeholder indicating SSRF insertion point.
(Default: xxURLxx)
--method=METHOD HTTP method (GET/HEAD/DELETE/POST/PUT/OPTIONS)
(Default: GET)
--post-data=DATA HTTP post data
--cookie=COOKIE HTTP cookies (separated by ';')
--user=USER[:PASS] HTTP basic authentication credentials.
--user-agent=AGENT HTTP user-agent (Default: none)
--rules=RULES Rules for parsing client request
(separated by ',') (Default: none)
--no-urlencode Do not URL encode client request
SSRF connection options:
--ssl Connect using SSL/TLS.
--proxy=PROXY Use a proxy to connect to the server.
(Supported proxies: http, https, socks)
--insecure Skip server SSL certificate validation.
--timeout=SECONDS Connection timeout in seconds (Default: 10)
HTTP response modification:
--match=REGEX Regex to match response body content.
(Default: \A(.*)\z)
--strip=HEADERS Headers to remove from the response.
(separated by ',') (Default: none)
--decode-html Decode HTML entities in response body.
--unescape Unescape special characters in response body.
--guess-status Replaces response status code and message
headers (determined by common strings in the
response body, such as 404 Not Found.)
--guess-mime Replaces response content-type header with the
appropriate mime type (determined by the file
extension of the requested resource.)
--sniff-mime Replaces response content-type header with the
appropriate mime type (determined by magic bytes
in the response body.)
--timeout-ok Replaces timeout HTTP status code 504 with 200.
--detect-headers Replaces response headers if response headers
are identified in the response body.
--fail-no-content Return HTTP status 502 if the response body
is empty.
--cors Adds a 'Access-Control-Allow-Origin: *' header.
Client request modification:
--forward-method Forward client request method.
--forward-headers Forward all client request headers.
--forward-body Forward client request body.
--forward-cookies Forward client request cookies.
--cookies-to-uri Add client request cookies to URI query string.
--body-to-uri Add client request body to URI query string.
--auth-to-uri Use client request basic authentication
credentials in request URI.
--ip-encoding=MODE Encode client request host IP address.
(Modes: int, ipv6, oct, hex, dotted_hex)
--cache-buster Append a random value to the client request
query string.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sfcli.py(lines 39–42) falls back toimport pyreadline as readlineonplatforms without the
readlinestdlib module (e.g. Windows).pyreadlineis unmaintained (last release 2019) and crashes on Python 3.13:
collections.Callablewas removed in Python 3.10; pyreadline's py3k shimstill references it, so the SpiderFoot CLI is broken on Windows + Python 3.13
either way (missing module without pyreadline installed, or this crash with
it installed).
This change prefers
pyreadline3— the maintained fork with Python 3.10+support — before falling back to legacy
pyreadline, keeping old installsworking.
Verification (Windows 11, Python 3.13.9)
Before:
After (with pyreadline3 installed):
Linux/macOS are unaffected:
readlineis part of the stdlib there, so thefallback branch is never reached.