Python: invalid syntax
Question:
I have written a code and I am trying to run it with python version 3.9 and I am getting this error:
File "/home/user/hackthebox/blue/42315.py", line 928
def smb_send_file(smbConn, '/home/user/hackthebox/blue/eternalblue.exe', 'C', '/eternalblue.exe'):
This is the code:
Answers:
You should have variables as arguments to a function. If you want to have variables with default values you just assign them on the function:
def smb_send_file(smbConn, path = '/home/user/hackthebox/blue/eternalblue.exe', lang = 'C', path2 = '/eternalblue.exe'):
I have written a code and I am trying to run it with python version 3.9 and I am getting this error:
File "/home/user/hackthebox/blue/42315.py", line 928
def smb_send_file(smbConn, '/home/user/hackthebox/blue/eternalblue.exe', 'C', '/eternalblue.exe'):
This is the code:
You should have variables as arguments to a function. If you want to have variables with default values you just assign them on the function:
def smb_send_file(smbConn, path = '/home/user/hackthebox/blue/eternalblue.exe', lang = 'C', path2 = '/eternalblue.exe'):