Skip to content

ianliu-johnston/hodor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Holberton School - Hodor (Hold the Door)

Execises to connect to websites.

Process:

  1. Open up Firefox 45.0 and Firefox Developer toolbar, select the Network Monitor tab
  2. Go to the website and try to post a vote.
  3. Observe post request. Right click and select Copy as cURL
  4. Paste the curl request in a terminal session, and hit enter. Refresh the page to see if it worked.
  5. If it did, put it in a for loop in bash. for ((i=0;i < 1025; i++)); do curl blahblahblah; done

This works for the first three tasks, then captcha and time restraints come into play. For the next three tasks, google it. Results are below.

Repository Conetents:

Directory Root:

random_sleep.c
A simple program written in C to output random floating values for the sleep function, to simulate human interaction, instead of the rhythmic POST-ing of a bot
random_sleep
The program random_sleep.c compiled with ``gcc -Wall -Werror -Wextra -pedantic random_sleep.c -o random_sleep``

Level 0:

level-0.sh
Simple shell script to curl a POST request 1024 times as a windows user and a cookie. After, it sleeps for a random amount of time between 0.0 and 10.0 seconds.
random_sleep
Compiled randomizer function.

Level 1:

level-1.sh
Simple shell script to curl a POST request 1024 times as a windows user and a cookie. After, it sleeps for a random amount of time between 0.0 and 10.0 seconds.
random_sleep
Compiled randomizer function.

Level 2:

level-2.sh
Simple shell script to curl a POST request 1024 times as a windows user and a cookie. After, it sleeps for a random amount of time between 0.0 and 10.0 seconds.
random_sleep
Compiled randomizer function.

Level 3:

bypass_capcha.py
A simple Python2 script to bypass capchas #### Links * [Bypass Capcha using Python and Tesseract](http://www.debasish.in/2012/01/bypass-captcha-using-python-and.html)

Prerequisites:

  • Install tesseract: sudo pip install pytesseract

tesseract uses the deprecated Python package, PIL. To install the updated version, pillow, I had to install a number of dependencies.

1. ``sudo apt-get update`` 2. ``sudo apt-get install zlib1g-dev`` 3. ``sudo apt-get install tesseract-orc`` 4. ``sudo pip install pillow``
random_sleep
Compiled randomizer function.

Level 4:

ip_renew.py
A simple Python2 script to tunnel through the TOR network, using random IP addresses, and POST-ing.

Links

Prerequisites:

  • Install Tor
  • Install Privoxy
  • Install PyTorCtl

Brief Summary of the steps in the tutorial:

  1. Install TOR: sudo apt-get update; sudo apt-get install tor; sudo /etc/init.d/tor restart
  2. Configure TOR: tor --hash-password password; sed -i 's/#ControlPort 9051/ControlPort 9051/;s/#HashedControlPassword/HashedControlPassword/ /etc/tor/torrc
  3. Install PyTorCtl: git clone git://github.com/aaronsw/pytorctl.git; sudo pip install pytorctl/
  4. Install Privoxy: sudo apt-get install privoxy
  5. Configure Privoxy: sudo sed -i '1338s/^#/forward-socks5 \/localhost:9050 ./' /etc/privoxy/config
  6. Restart privoxy and tor: sudo /etc/init.d/privoxy restart; sudo /etc/init.d/tor restart

Usage:

  • Run with sudo ip_renew.py | grep "" | grep -A3 "28 " To see the results only for the id number 28.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published