fsociety icon indicating copy to clipboard operation
fsociety copied to clipboard

syntax error missing ()

Open WaD45 opened this issue 3 years ago • 5 comments

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

WaD45 avatar Oct 20 '22 13:10 WaD45

Same error

Dkroyt avatar Nov 28 '22 01:11 Dkroyt

same error

themystic1108 avatar Dec 07 '22 16:12 themystic1108

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

desprate1231 avatar Dec 22 '22 06:12 desprate1231

I found the solution that worked gret for me.

  1. 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.
  2. Then install 2to3: pip install 2to3
  3. 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

AndrijaRD avatar Jun 23 '23 10:06 AndrijaRD

I found the solution that worked gret for me.

  1. 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.
  2. Then install 2to3: pip install 2to3
  3. 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

Thx man🤝🤝🤝

Spartan76 avatar Aug 15 '23 21:08 Spartan76