Al-Azif / ps4-exploit-host

Easy Exploit Hosting
MIT License
1.12k stars 277 forks source link

Import Error when running start.py #213

Closed Leeful closed 1 year ago

Leeful commented 1 year ago

Validation

Leeful commented 1 year ago

After I have recursive cloned the repo I get an import error when running start.py.

A fix for this is to rename the downloaded "fakedns" directory "FakeDns" and change the import line in the start.py from: import fakedns.fakedns as FAKEDNS to: import FakeDns.fakedns as FAKEDNS

After making these changes the script runs without a problem.

Al-Azif commented 1 year ago

Are you changing something? Because the folder is clearly lowercase. What version of python are you using?

Because it works out of the box here

Leeful commented 1 year ago

Thanks for getting back to me.

I'm using python 3.7.3. I'm not changing anything. I just "git clone --recursive https://github.com/Al-Azif/ps4-exploit-host.git" and when I run the start.py it gives me an import error.

The only way I can get it to work correctly is if I change fakedns.fakedns to FakeDns.fakedns (and also rename the actual directory). for some reason it doesnt like it if the first fakedns in the path is all lowercase.

Ive noticed that in the exploit host repo, the linked fakedns dir is all lowercase: fdns1

but when you actually go to the directory it is not all lowercase: fdns2

Could this be the cause of the issue I'm having?

Al-Azif commented 1 year ago

That's different than what's happening here. It works as written and if I make the change you are suggesting it breaks it. The FakeDNS repo name doesn't matter because the destination folder is the lower case as shown on the exploit-host repo.

Is the FakeDNS folder capitalized on your system after the recursive clone? If so something is wrong in your git setup.

Al-Azif commented 1 year ago

Tested on 3.9.1 on Windows and 3.6.9 on Linux with no issue

Leeful commented 1 year ago

After the recursive clone the fakedns folder is all lowercase.

I have pinpointed the error to the fact that the term "fakedns" is repeated in the import command path in the start.py e.g import fakedns.fakedns as FAKEDNS It's not an issue of uppercase or lowercase.

Another tested way I can get it to work is to rename the folder to just "dns" and change the command to: import dns.fakedns as FAKEDNS For some odd reason my setup just does not like repeated term "fakedns.fakedns".

In the end its not a big deal because like I said, I have found workarounds to get it to work for me. I just thought I'd mention it in case anyone else had the same issue.

Thanks again for looking into it. :)

Al-Azif commented 1 year ago

It's just bizarre that this is the first time this has come up in like 5 years haha. I'll probably just rename the submodule directory to avoid it happening.... however it's actually happening lol

Al-Azif commented 1 year ago

Let me know if this fixes it without you needing to make any changes from your side

Leeful commented 1 year ago

yes, it works now without having to rename anything. Thanks. fdns