MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / goahead

Method goahead

lib/utils/sgmllib.py:118–228  ·  view source on GitHub ↗
(self, end)

Source from the content-addressed store, hash-verified

116 # and data to be processed by a subsequent call. If 'end' is
117 # true, force handling all data as if followed by EOF marker.
118 def goahead(self, end):
119 rawdata = self.rawdata
120 i = 0
121 n = len(rawdata)
122 while i < n:
123 if self.nomoretags:
124 self.handle_data(rawdata[i:n])
125 i = n
126 break
127 match = interesting.search(rawdata, i)
128 if match:
129 j = match.start()
130 else:
131 j = n
132 if i < j:
133 self.handle_data(rawdata[i:j])
134 i = j
135 if i == n:
136 break
137 if rawdata[i] == '<':
138 if starttagopen.match(rawdata, i):
139 if self.literal:
140 self.handle_data(rawdata[i])
141 i = i + 1
142 continue
143 k = self.parse_starttag(i)
144 if k < 0:
145 break
146 i = k
147 continue
148 if rawdata.startswith("</", i):
149 k = self.parse_endtag(i)
150 if k < 0:
151 break
152 i = k
153 self.literal = 0
154 continue
155 if self.literal:
156 if n > (i + 1):
157 self.handle_data("<")
158 i = i + 1
159 else:
160 # incomplete
161 break
162 continue
163 if rawdata.startswith("<!--", i):
164 # Strictly speaking, a comment is --.*--
165 # within a declaration tag <!...>.
166 # This should be removed,
167 # and comments handled only in parse_declaration.
168 k = self.parse_comment(i)
169 if k < 0:
170 break
171 i = k
172 continue
173 if rawdata.startswith("<?", i):
174 k = self.parse_pi(i)
175 if k < 0:

Callers 2

feedMethod · 0.95
closeMethod · 0.95

Calls 11

handle_dataMethod · 0.95
parse_starttagMethod · 0.95
parse_endtagMethod · 0.95
parse_piMethod · 0.95
handle_charrefMethod · 0.95
handle_entityrefMethod · 0.95
errorMethod · 0.95
startMethod · 0.80
parse_declarationMethod · 0.80
searchMethod · 0.45
matchMethod · 0.45

Tested by

no test coverage detected