mgerst / flag-slurper

A red team utility for Cyber Defense Competitions.
https://flag-slurper.rtfd.io
MIT License
3 stars 2 forks source link

find_flags type error #89

Closed mgerst closed 3 years ago

mgerst commented 4 years ago
Traceback (most recent call last):
  File "/home/mattg/projects/flag-slurper/flag_slurper/autolib/protocols.py", line 87, in pwn_ssh
    local_flags = find_flags(ssh, base_dir=base_dir)
  File "/home/mattg/projects/flag-slurper/flag_slurper/autolib/exploit.py", line 27, in find_flags
    if 10 < len(contents) < 60:
TypeError: object of type 'bool' has no len()

get_file_contents returns False if the get_file call fails (because of an upstream return type from paramiko. We need to properly handle this type so we don't error.