m4ll0k / SecretFinder

SecretFinder - A python script for find sensitive data (apikeys, accesstoken,jwt,..) and search anything on javascript files
GNU General Public License v3.0
2.03k stars 375 forks source link

Error while scanning domain for sensative information in JS files #42

Open ghost opened 3 years ago

ghost commented 3 years ago

Hello, hope all is well. Just had a quick question concerning the scanner. When I tried to scan a domain, I ended up getting the following error after it found a few java script files and then froze:

Traceback (most recent call last):
  File "/home/username/secretfinder/SecretFinder.py", line 435, in <module>
    matched = parser_file(file,mode)
  File "/home/username/secretfinder/SecretFinder.py", line 182, in parser_file
    items = getContext(all_matches,content,regex[0])
  File "/home/username/secretfinder/SecretFinder.py", line 158, in getContext
    context = re.findall('%s%s%s'%(rex,m,rex),content,re.IGNORECASE)
  File "/usr/lib/python3.8/re.py", line 241, in findall
    return _compile(pattern, flags).findall(string)
  File "/usr/lib/python3.8/re.py", line 304, in _compile
    p = sre_compile.compile(pattern, flags)
  File "/usr/lib/python3.8/sre_compile.py", line 764, in compile
    p = sre_parse.parse(p, flags)
  File "/usr/lib/python3.8/sre_parse.py", line 948, in parse
    p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
  File "/usr/lib/python3.8/sre_parse.py", line 443, in _parse_sub
    itemsappend(_parse(source, state, verbose, nested + 1,
  File "/usr/lib/python3.8/sre_parse.py", line 549, in _parse
    raise source.error("unterminated character set",
re.error: unterminated character set at position 13

The command I used was "python3 SecretFinder.py -i domain.com -e -o /directory/output.html". I checked to make sure that all of the requirements were installed. Thanks! Love the tool!

m4ll0k commented 3 years ago

Hey @evanRubinsteinIT ,

I'm not sure, but I understand what's causing this issue, if you do me the favor of sending the full command (including the site), here m4ll0k@protonmail.com

rmmal commented 1 year ago

Any updates that solves this issue