syntax error missing ()
Here is the error:
└─$ fsociety
File "/home/parallels/.fsociety/fsociety.py", line 1194
print "-------------------------"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
Even if i add parentheses, it didn't work. Here is what i added:
def grabuploadedlink(url): try: for dir in directories: currentcode = urllib.urlopen(url + dir).getcode() if currentcode == 200 or currentcode == 403: print("-------------------------") print(" [ + ] Found Directory: " + str(url + dir) + " [ + ])" print("-------------------------") upload.append(url + dir) except: pass
Same error
same error
i have been going through and manually fixing the parentheses but i got stuck i dont know kow to code and the opening parentheses at at the end of line 1633 as shown here in this print statment print ' [] Server header -> ', httpresponse.headers.getheader( as you can see i dont know how to escape that so i can close the parentheses if anyone can help would be much greatful. -EDIT- i was able to get past the block for anyone willing to do it this is how lines 1633 to 1637 need to look like
print(' [] Server header -> ', httpresponse.headers.getheader('Server'))
except:
print('[*] Server header -> Not Found')
to get past this error fsociety
File "/home/R00TED10101/.fsociety/fsociety.py", line 1633
print( ' [] Server header -> ', httpresponse.headers.getheader()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: invalid syntax. Perhaps you forgot a comma?
i am going to continue fixing the parentheses till then this is the it --UPDATE2-- you will encounter a error like this
except urllib2.HTTPError, e:
^^^^^^^^^^^^^^^^^^^^
SyntaxError: multiple exception types must be parenthesized
you can fix it like this exept (urllib2.HTTPError, e): also you will have this error
for( ss in wpstorethemeremotefileupload:)
^
SyntaxError: invalid syntax
fix it like this for ss in wpstorethemeremotefileupload: the next error you will face is another open ( code to fix print('[] Found, ', len(wpstorethemeremotefileupload), ' wp_storethemeremotefileupload exploit.')
done
I found the solution that worked gret for me.
- Go into fscoiety folder, by default it is installed in $HOME/.fsociety or ~/.fsociety for me it was /opt/.fsociety cuz i modified the installation script.
- Then install 2to3:
pip install 2to3 - Fiinnaly run:
2to3 -w fsociety.py
This will convert the python2 program to python3. This is the source of the tool: https://docs.python.org/3/library/2to3.html
I found the solution that worked gret for me.
- Go into fscoiety folder, by default it is installed in $HOME/.fsociety or ~/.fsociety for me it was /opt/.fsociety cuz i modified the installation script.
- Then install 2to3:
pip install 2to3- Fiinnaly run:
2to3 -w fsociety.pyThis will convert the python2 program to python3. This is the source of the tool: https://docs.python.org/3/library/2to3.html
Thx man🤝🤝🤝