Error: when looking for s3
random-robbie opened this issue · 3 comments
random-robbie commented
When using python 3.5.2
Command
python3 SlackPirate.py --token xoxb-xxx
Output.
START: Attempting to find references to S3 buckets
Traceback (most recent call last):
File "SlackPirate.py", line 831, in <module>
scan(token=provided_token, scan_context=collected_scan_context)
File "SlackPirate.py", line 327, in find_s3
page_count_by_query[query] = (r['messages']['pagination']['page_count'])
KeyError: 'messages'
random-robbie commented
emtunc commented
Hello @random-robbie ! Thanks for the issue report. This is interesting but I think I know what the problem is (ignoring the fact I'm not catching this as an exception in the code :o) - a lot of the functions use the Slack search.messages
API which cannot be queried by a Slack bot token which I can see is what you are using.
Not sure there is a workaround for this but will have a look when time permits.
See the Works with
section here https://api.slack.com/methods/search.messages
emtunc commented
Closing as it doesn't seem to be possible to search messages with a bot user token.