MCPcopy Create free account
hub / github.com/adobe/Marinus / MySAMLParser

Class MySAMLParser

python3_cron_scripts/libs3/Rapid7.py:119–147  ·  view source on GitHub ↗

This sub-class searches an HTML response for the SAML data

Source from the content-addressed store, hash-verified

117
118
119class MySAMLParser(HTMLParser):
120 """
121 This sub-class searches an HTML response for the SAML data
122 """
123
124 saml_response = ""
125 relay_state = ""
126
127 def handle_starttag(self, tag, attrs):
128 if tag == "input":
129 found_saml = False
130 found_relay = False
131 for attr in attrs:
132 if (
133 self.saml_response == ""
134 and attr[0] == "name"
135 and attr[1] == "SAMLResponse"
136 ):
137 found_saml = True
138 elif (
139 self.relay_state == ""
140 and attr[0] == "name"
141 and attr[1] == "RelayState"
142 ):
143 found_relay = True
144 elif found_saml and attr[0] == "value":
145 self.saml_response = attr[1]
146 elif found_relay and attr[0] == "value":
147 self.relay_state = attr[1]
148
149
150class Rapid7(object):

Callers 1

find_file_locationsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected