TypeError: 'NoneType' object is not subscriptable

TypeError: 'NoneType' object is not subscriptable
mail@pastecode.io avatar
unknown
plain_text
2 years ago
6.1 kB
21
Indexable

    2023-05-04 07:31:23.260 | DEBUG    | __main__:craft_socket:41 - Crafting socket
    2023-05-04 07:31:23.261 | DEBUG    | __main__:craft_ssl_context:25 - Setting SSL context with verify mode False
    2023-05-04 07:31:23.262 | DEBUG    | __main__:craft_socket:44 - Wraping socket with SSL
    2023-05-04 07:31:24.029 | DEBUG    | __main__:validate_resource_and_cache:98 - Connection established aesg2-qe8-erp.aesg.accenture.com:443
    2023-05-04 07:31:24.029 | DEBUG    | __main__:validate_resource_and_cache:99 - Validating resource /sap/admin/public/default.html?aaa
    2023-05-04 07:31:24.030 | ERROR    | __main__:validate_resource_and_cache:103 - An error has been caught in function 'validate_resource_and_cache', process 'MainProcess' (1083395), thread 'MainThread' (139682043844416):
    Traceback (most recent call last):
    
      File "CVE-2022-22536.py", line 172, in <module>
        poc.dia(host, port, secure=True, cert_verify=False)
        │   │   │     └ 443
        │   │   └ 'aesg2-qe8-erp.aesg.accenture.com'
        │   └ <function POC.dia at 0x7f0a4193d430>
        └ <__main__.POC object at 0x7f0a4193ab80>
    
      File "CVE-2022-22536.py", line 152, in dia
        resource = self.validate_resource_and_cache(host, port, secure=secure, cert_verify=cert_verify)
                   │    │                           │     │            │                   └ False
                   │    │                           │     │            └ True
                   │    │                           │     └ 443
                   │    │                           └ 'aesg2-qe8-erp.aesg.accenture.com'
                   │    └ <function POC.validate_resource_and_cache at 0x7f0a41939670>
                   └ <__main__.POC object at 0x7f0a4193ab80>
    
    > File "CVE-2022-22536.py", line 103, in validate_resource_and_cache
        data = self.send_payload(s, host, port, payload)
               │    │            │  │     │     └ b'GET /sap/admin/public/default.html?aaa HTTP/1.1\r\nHost: aesg2-qe8-erp.aesg.accenture.com:443\r\n\r\n'
               │    │            │  │     └ 443
               │    │            │  └ 'aesg2-qe8-erp.aesg.accenture.com'
               │    │            └ <ssl.SSLSocket fd=3, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('185.217.125.235', 51158), ra...
               │    └ <function POC.send_payload at 0x7f0a419399d0>
               └ <__main__.POC object at 0x7f0a4193ab80>
    
    TypeError: send_payload() takes from 2 to 3 positional arguments but 5 were given
    2023-05-04 07:31:24.035 | ERROR    | __main__:validate_resource_and_cache:104 - An error has been caught in function 'validate_resource_and_cache', process 'MainProcess' (1083395), thread 'MainThread' (139682043844416):
    Traceback (most recent call last):
    
      File "CVE-2022-22536.py", line 172, in <module>
        poc.dia(host, port, secure=True, cert_verify=False)
        │   │   │     └ 443
        │   │   └ 'aesg2-qe8-erp.aesg.accenture.com'
        │   └ <function POC.dia at 0x7f0a4193d430>
        └ <__main__.POC object at 0x7f0a4193ab80>
    
      File "CVE-2022-22536.py", line 152, in dia
        resource = self.validate_resource_and_cache(host, port, secure=secure, cert_verify=cert_verify)
                   │    │                           │     │            │                   └ False
                   │    │                           │     │            └ True
                   │    │                           │     └ 443
                   │    │                           └ 'aesg2-qe8-erp.aesg.accenture.com'
                   │    └ <function POC.validate_resource_and_cache at 0x7f0a41939670>
                   └ <__main__.POC object at 0x7f0a4193ab80>
    
    > File "CVE-2022-22536.py", line 104, in validate_resource_and_cache
        resp = self.parse_response(data)
               │    │              └ None
               │    └ <function POC.parse_response at 0x7f0a41939310>
               └ <__main__.POC object at 0x7f0a4193ab80>
    
      File "CVE-2022-22536.py", line 77, in parse_response
        enc_data = data.decode('utf-8', errors='replace')
                   └ None
    
    AttributeError: 'NoneType' object has no attribute 'decode'
    2023-05-04 07:31:24.036 | ERROR    | __main__:dia:152 - An error has been caught in function 'dia', process 'MainProcess' (1083395), thread 'MainThread' (139682043844416):
    Traceback (most recent call last):
    
      File "CVE-2022-22536.py", line 172, in <module>
        poc.dia(host, port, secure=True, cert_verify=False)
        │   │   │     └ 443
        │   │   └ 'aesg2-qe8-erp.aesg.accenture.com'
        │   └ <function POC.dia at 0x7f0a4193d430>
        └ <__main__.POC object at 0x7f0a4193ab80>
    
    > File "CVE-2022-22536.py", line 152, in dia
        resource = self.validate_resource_and_cache(host, port, secure=secure, cert_verify=cert_verify)
                   │    │                           │     │            │                   └ False
                   │    │                           │     │            └ True
                   │    │                           │     └ 443
                   │    │                           └ 'aesg2-qe8-erp.aesg.accenture.com'
                   │    └ <function POC.validate_resource_and_cache at 0x7f0a41939670>
                   └ <__main__.POC object at 0x7f0a4193ab80>
    
      File "CVE-2022-22536.py", line 105, in validate_resource_and_cache
        if resp['count'] > 0 and resp['responses'][0]['status_code'] == '200':
           │                     └ None
           └ None
    
    TypeError: 'NoneType' object is not subscriptable
    2023-05-04 07:31:24.037 | ERROR    | __main__:dia:160 - No valid resource test found, is not possible to test