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

[!] Something went wrong, printing the error: name 'file' is not defined #673

Closed
socrateselton opened this issue Jan 5, 2020 · 14 comments
Closed

Comments

@socrateselton
Copy link

Expected Behaviour

Put here what the expected behaviour should be when reporting an issue

Actual Behaviour

Put here what the actual behaviour should be when reporting an issue

Set Version

Set version

Before opening an issue please make sure you are running the most up to date version of set

We see the same bug reports being opened for issues that have already been fixed in a new release

Set in Kali

Please make sure you are running kali-rolling and your system is up to date.
To update your system do the following apt update && apt full-upgrade

Run the following to check your version of Kali lsb_release -rdc and you should see the following
output

Description:	Kali GNU/Linux Rolling
Release:	kali-rolling
Codename:	kali-rolling

If you do not see the following output download the ISO from http://cdimage.kali.org/kali-images/kali-weekly/

If you do all of the above and still have an issue then please open a issue.

@nitish-kumar0072
Copy link

im using setoolkit... to clone a websit

setoolkit->press 1 enter-> press 2 enter -> press 3 enter-> press 2 enter,
then im giving my ip address and the website i want to clone(e.g www.facebook.com)
this is not getting cloned and showing a error
Capture
[!]Something went wrong, printing the error: name 'file' is not defined

@nitish-kumar0072
Copy link

Capture2
Capture3
Capture4

@larsonclark
Copy link

Je rencontre egalement ce même problème!
Je pense que le problème est venu après la mise à jour du système et après avoir exécuté apt-get autorenouvelable.
Je pense que nous devons le désinstaller et le réinstaller pour voir

@wdmarauder
Copy link

i too have this issue in kali 2020.1 i really wish i could find the solution for the issue. i've tested it across at least 2 different installs with the same result. i'm going to do a fresh VM install on monday with the latest ISO to see if i can recreate it a 3rd time.

@wdmarauder
Copy link

wdmarauder commented Jan 26, 2020

just playing around with another VM i had that was an older version i did a couple of updates for testing. if i do just a standard apt-get upgrade the site cloner doesn't give me the above error but when i browse to the cloned site there are many errors output in kali and the page doesn't load (on the victim machine).

if i do apt-get full-upgrade then i get the same above error as i do on 3 different installs.

@wdmarauder
Copy link

the version i have on all of them when experiencing the error is:

Description: Kali GNU/Linux Rolling
Release: 2020.1
Codename: kali-rolling

@wdmarauder
Copy link

i solved it.

if you go to the main page on here for SET and download the files, extract and then copy them into the /usr/share/set directory it should resolve the issue.

@csharshtiwari
Copy link

will u show by sharing the screenshot

@csharshtiwari
Copy link

i solved it.

if you go to the main page on here for SET and download the files, extract and then copy them into the /usr/share/set directory it should resolve the issue.

plz share the screenshot or a videolink

@wdmarauder
Copy link

i solved it.
if you go to the main page on here for SET and download the files, extract and then copy them into the /usr/share/set directory it should resolve the issue.

plz share the screenshot or a videolink

found this with quick google search.

https://www.youtube.com/watch?v=DwpDihZzpQc

@zprian
Copy link

zprian commented Jan 30, 2020

In order to find the error, the best way is to go to the same directory where you have it installed, and open the "setoolkit" file with your favorite text editor, go to the final of the file, and comment the "except Exception as error" in order to let you get the root cause. You must have the "setoolkit" file like this:

# handle exceptions
#except Exception as error:
#    core.log(error)
#    print("\n\n[!] Something went wrong, printing the error: " + str(error))

So, then, if you launch again the toolkit, you will see the following error:

Traceback (most recent call last):
  File "./setoolkit", line 245, in <module>
    import src.core.set
  File "/opt/tools/other/set/src/core/set.py", line 606, in <module>
    import harvester
  File "/opt/tools/other/set/src/webattack/harvester/harvester.py", line 57, in <module>
    filewrite = file("%s/src/logs/harvester.log" % (os.getcwd()), "w")
NameError: name 'file' is not defined

And here, you could see that the problem is when setoolkit tries to open for writing the file "%s/src/logs/harvester.log" and it does not exist, so... you just need to execute the following:

$ cd /path/of/your/set/installation
$ touch src/logs/harvester.log

@trustedsec
Copy link
Collaborator

Fixed in 8.0.2

@bibush0695
Copy link

bibush0695 commented Apr 28, 2020

i solved it.

if you go to the main page on here for SET and download the files, extract and then copy them into the /usr/share/set directory it should resolve the issue.

hey i did exactly what u said but didnot work
the problem m facing now is the paste option is not working on /usr/share/set directory
pls share screenshot

@Monabona89
Copy link

Monabona89 commented Jul 31, 2020

@bibush0695

Hi mate, that's also my problem but I solved it through having the root privileges.
You should log in into your root account (the administrator one), then there you can edit freely the directories of /usr with copy and paste in ease.
hope it helped.

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

8 participants