'Check if a shell is available.
param: url, a shell url
param: password, shell password
param: flag_code,  let shell execute the code
param: flag_match, flag'

def has_shell(self, url, password, flag_code, flag_match):

    try:
        resp = requests.post(url, data={password: flag_code}, timeout=15)
        if (resp and (flag_match in resp.content)):
            return True
    except (requests.ConnectionError, requests.Timeout):
        pass
    return False
