ncorbuk / SubZone

SubZone - Subdomains, Dns records, & more! || Python tutorial || Certificate authority abuse || Adavnced || Hacking/Info-Sec ||
MIT License
43 stars 12 forks source link

Unnecessary function? #2

Closed 42B closed 5 years ago

42B commented 5 years ago

https://github.com/ncorbuk/SubZone/blob/abcaf21b6a9473cf80cfafe5824180c71b2efa7d/subzone_v2.0.py#L93-L107

Why not just use pip install -r requirements.txt and/or setup.py beforehand?

ncorbuk commented 5 years ago

Because if someone do not have pip, then it would not do anything? so i thought its best/easiest to just check and if they do not have requirements they can install them there self?

42B commented 5 years ago

Why wouldn't they have pip... it comes with Python?

42B commented 5 years ago

The goal should be to make a python package so people could simply type pip install subzone and have everything installed in one shot.

ncorbuk commented 5 years ago

ah i see i read somewhere they not everyone had the easy install setup maybe i read something posted from years ago, ill change that. thanks for letting me know

42B commented 5 years ago

No problem. Ya, if you are using fstrings that means people must be using Python 3.6+ so pip should come with it.

ncorbuk commented 5 years ago

Whats your name on reddit bro maybe ill see you around, am new to the place looks interesting tho :)

ncorbuk commented 5 years ago

fixed now, included a pip install if false on any of requirements... so is more useful then it was.

42B commented 5 years ago

Again, you aren't understanding the issue. This function shouldn't be in your file at all.

ncorbuk commented 5 years ago

oh i see a python package, pip install subzone i get you. Any idea on how i would go about this? as i really have no idea I'e only ever seen people use requirements.txt etc. I'm going do some googling see what come up

42B commented 5 years ago

@ncorbuk

Any idea on how i would go about this?

Hmm... maybe the link I provided in the description of this issue?

ncorbuk commented 5 years ago

Ok will have a look, am near i done pip install . and it said it created distro but only has subzone-2.0.dist-info folder not another folder with py file in, and says no subzone when i try to import..obv something wrong, ill check your link out now

ncorbuk commented 5 years ago

Yep i have done it! only took a few hours haha. thank! learnt something i never knew pretty good, altho my crapy windows was putting files in c drive when im in d and stuff adding to path wouldnt work and had to use full path...basically just complicated things lol.

ncorbuk commented 5 years ago

now twine works. without full path, new a reset of cmd would do it.. lol. 👍

42B commented 5 years ago

@ncorbuk

I have no idea what you are referring to, I don't see a setup.py file in your repo and the last commit was 3 hours ago.

ncorbuk commented 5 years ago

i was going on about making it into a python package you got to have a setup.py file etc etc. Ive managed to create the package and you can get it via - pip install subzone , now... so thanks.

42B commented 5 years ago

@ncorbuk

You are missing out one of the most important steps which are clearly shown in the tutorials I linked to. Even if someone can use pip install subzone, you are forcing them to have to then type pip install -r requirements.txt. If you added a proper setup.py file, pip install subzone would take care of that in one shot. You're almost there...

ncorbuk commented 5 years ago

oh dam i did do a proper setup.py file i just forgot to delete the requirements function. damit

ncorbuk commented 5 years ago

wouldn't keeping the requirements in there be ok for people that didn't use pip to install it and forked it or whatever?

42B commented 5 years ago

@ncorbuk

I didn't say delete requirements.txt at all.

Good luck with your project but I don't have time to keep answering things which are easily google-able.

ncorbuk commented 5 years ago

ok, thanks for your feedback it has helped me immensely.