hisxo / gitGraber

gitGraber: monitor GitHub to search and find sensitive data in real time for different online services such as: Google, Amazon, Paypal, Github, Mailgun, Facebook, Twitter, Heroku, Stripe...
GNU General Public License v3.0
2.02k stars 330 forks source link

bug - AttributeError: 'NoneType' object has no attribute 'text' #22

Closed nano6yt3 closed 4 years ago

nano6yt3 commented 4 years ago

The following keeps happening after running it successfully for a while. it does not matter what domain.

python3 gitGraber.py -k wordlists/keywords.txt -q \”domainexample.com\" -s

[i] Status code : 200
Traceback (most recent call last):
  File "gitGraber.py", line 351, in <module>
    responses = searchGithub(keywordsFile, args)
  File "gitGraber.py", line 307, in searchGithub
    pool.map( partial(doSearchGithub,args,tokenMap, tokenCombos), t_keywords )
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 266, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 644, in get
    raise self._value
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar
    return list(map(*args))
  File "gitGraber.py", line 288, in doSearchGithub
    content = parseResults(response.text)
AttributeError: 'NoneType' object has no attribute 'text'
rmarot commented 4 years ago

Seems like we should add a control check on response to avoid such issue.Does it happen even after restarting ?

rmarot commented 4 years ago

We've added a quick fix to have a control check. This part will be reviewed in a future version.