superhedgy / AttackSurfaceMapper

AttackSurfaceMapper is a tool that aims to automate the reconnaissance process.
https://AttackSurfaceMapper.com
GNU General Public License v3.0
1.3k stars 192 forks source link

Exceptions thrown in buckethunter.py #10

Closed ojensen5115 closed 5 years ago

ojensen5115 commented 5 years ago

After leaving it running for several minutes and getting a number of "added target" messages, I get the following traceback:

Traceback (most recent call last):
  File "/home/ojensen/bin/repos/AttackSurfaceMapper/modules/buckethunter.py", line 22, in passive_query
    if gwf_api["buckets_count"] > 0:
KeyError: 'buckets_count'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "ASM.py", line 890, in <module>
    main(keychain,sw1,output_path,c1)
  File "ASM.py", line 666, in main
    buckethunter.passive_query(target_list[key],keychain["grayhatwarfare"])# Passive
  File "/home/ojensen/bin/repos/AttackSurfaceMapper/modules/buckethunter.py", line 31, in passive_query
    cprint ("error","[*] Error: connecting with GrayHatWarfare API",1)
NameError: name 'cprint' is not defined

Working off of commit c5d85fbd9ec9b2d994eb59a402a8523c8ce670cf and with invocation python ASM.py -v -t [domain] using python 3.

ojensen5115 commented 5 years ago

Looking at the code, I suspect that the KeyError is actually an expected control flow, and it's just the lack of cprint that is the issue here.

ojensen5115 commented 5 years ago

Ah, I see you have already resolved this in eceb163874186b8891a7d67c1c1f097d6d094256. Thanks!