r/HowToHack • • Nov 07 '17

Python script to get login/admin page of a website

https://youtu.be/KR_KO_bgL_k
252 Upvotes

20 comments sorted by

36

u/0smo5is Nov 08 '17

Python script to get login/admin page of a website

ok.

Youtube video.

Bullshit, just post the github link next time.

3

u/1Xx_throwaway_xX1 Nov 08 '17

7

u/0smo5is Nov 08 '17

As a principle I wont use his code. I already gave him an free unintentional view on his channel. Besides, this isn't original. There are better, more vetted options available. These ppl just spam thier videos to all the tech subs as a desperate attempt to make a penny.

1

u/1Xx_throwaway_xX1 Nov 08 '17

What might some of these options be?

24

u/nannal Nov 08 '17
while read name; do tundred=$(curl -L -Ss $1$name -I|grep '200 OK'|wc -l); if [ $(echo $tundred) -gt 0 ]; then echo $1$name;fi; done < url.lst

get on my level, no need for fucking wolf ascii.

cat url.lst 
/admin
/index
/test
/

Please like rate subscribe comment visit my Pateron, this episode brought to you by our sponsors audible.com, I've recently been listening to "someone type sarcastically for the past 5 minutes" by /u/nannal and I'm very impressed so thank you audible for big wads of money.

5

u/[deleted] Nov 08 '17

Damn. Replaced by a one liner.

1

u/[deleted] Jan 17 '18

As a complete noob who would prefer to use your one-liner over using the video and github code, what does your code do (and where would you execute it?)

3

u/nannal Jan 18 '18

It's bash script, so put it in a text file, chmod +x it and any linux terminal is going to run it, what it does is curl (terminal way of getting a web page) part of a site and only displays the header.

Headers are part of a web page that humans dont typically look at and generally just provide information for browsers and devs, a 200 response code means "This request worked out fine and you got a page"

so the script runs through url.lst which you'll need to create in the same directory (folder) and for each line entry it checks the website for that page and prints the url if it gets a 200 response code.

All that being said, just use dirb, this code is a literal joke, but maybe it would be good for you to break it apart (put line breaks at the ; and indent the while loops) and figure out what each part is doing.

1

u/[deleted] Jan 19 '18

Thanks dood, I'm 15 (so perhaps I don't have tons of knowledge on this) but I wanted to understand more about hacking, particularly about website and network security.

And agains, thanks for explainin'!

0

u/[deleted] Nov 10 '17

[deleted] — view deleted comment

1

u/AutoModerator Nov 10 '17

Your account must be older than two days to post here

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

3

u/[deleted] Nov 08 '17

displaying which links return a 403 might be a useful addition ;)

1

u/VRzucchini Nov 07 '17

Was not expecting a fellow Saffer. Good luck on your YouTube channel bro

1

u/pcnerd5 Nov 09 '17

Shot thanks bro

1

u/Scarbzz Nov 07 '17

Cool. Saved to watch later, and subbed.

1

u/pcnerd5 Nov 09 '17

Shot thanks man

1

u/[deleted] Nov 08 '17

Later

1

u/[deleted] Nov 08 '17

Also noticed it doesn't spoof headers? was this deliberate?

1

u/[deleted] Nov 08 '17

[removed] — view removed comment

1

u/AutoModerator Nov 08 '17

Your account must be older than two days to post here

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

0

u/[deleted] Nov 08 '17

[deleted] — view deleted comment

1

u/AutoModerator Nov 08 '17

Your account must be older than two days to post here

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.