Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syntax error missing () #176

Open
WaD45 opened this issue Oct 20, 2022 · 5 comments
Open

syntax error missing () #176

WaD45 opened this issue Oct 20, 2022 · 5 comments

Comments

@WaD45
Copy link

WaD45 commented Oct 20, 2022

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

@Dkroyt
Copy link

Dkroyt commented Nov 28, 2022

Same error

@themystic1108
Copy link

same error

@desprate1231
Copy link

desprate1231 commented Dec 22, 2022

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

@AndrijaRD
Copy link

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

@Spartan76
Copy link

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🤝🤝🤝

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants