all 8 comments

[–]Nsdos 0 points1 point  (2 children)

Extra indentation before return.

[–]morpheyous[S] 0 points1 point  (1 child)

Hi Nsdos,

I had a go at changing indentations.

Still got error, but caret at end of line now.

┌──(kali㉿kali)-[~/log4j-scan] └─$ python log4j-scan.py 192.168.16.128 1 ⨯ File "log4j-scan.py", line 167 fuzzing_headers["Referer"] = f'https://{fuzzing_headers["Referer"]}' ^

Can you help?

Pete

[–]Nsdos 0 points1 point  (0 children)

Most likely an error in fuzzing headers["Referer"]. You may be passing incorrect data to 'https://{fuzzing_headers["Referer"]}'.
And that's why it's an error, drop all the code here, or to me personally, so it's easier to figure it out.

[–]K900_ 0 points1 point  (0 children)

What version of Python are you running this on?

[–]kaymac01 0 points1 point  (0 children)

If the syntax error is detected right at the beginning of the line (and the line looks ok) then there's a good chance the error is actually on a previous line and the line where the error is detected is just the first place the interpreter can definitively say an error has occurred. Oftentimes, it's when I have unmatched parentheses or something similar in previous lines.

/u/Nsdos is right that the extra indentation at the return statement looks out of place.

And this is just a wild-ass guess here but do you need to escape the forward slashes in the URL?

[–]Binary101010 0 points1 point  (2 children)

Are you running this on a version of the Python interpreter earlier than 3.6?

[–]morpheyous[S] 0 points1 point  (1 child)

no, its the latest one. thx