Skip to content

Instantly share code, notes, and snippets.

@Ge0rg3
Ge0rg3 / primechecker.py
Created February 6, 2018 10:23
Prime Number Checker
#imports square root function and sets start var:
from math import sqrt
use = True
counter = 0
#Takes in user's numbers, and "sorts them out":
print("======================")
print("Pryme Number Checker")
print("github.com/georgeomnet")
print("======================\n")
@Ge0rg3
Ge0rg3 / ConvInt.py
Created February 6, 2018 10:24
Bin/Dec/Hex Converter
use = True
import os
import time
from sys import platform
def bannerwin():
print(" ")
print(".oPYo. o o ")
print("8 8 8 8 ")
print("8 .oPYo. odYo. o o 8 odYo. o8P ")
INP
STA 1
INP
ADD 1
STA 2
INP
ADD 2
STA 3
INP
ADD 3
INP
STA 1
INP
STA 2
LDA 1
SUB 2
OUT
HLT
@Ge0rg3
Ge0rg3 / NumberGuessingGame.java
Created April 9, 2018 16:47
My first Java program <--
import java.util.Random;
import java.util.Scanner;
public class NumberGuessingGame {
public static void main(String[] args) {
Random rand = new Random();
int value = rand.nextInt(101);
int userguess = 0;
int tries = 0;
System.out.println("I'm thinking of a number...");
while (userguess!=value) {
@Ge0rg3
Ge0rg3 / RockPaperScissors.java
Created April 9, 2018 23:39
A simple Rock-Paper-Scissors function created for https://bit.ly/2GNZcZp
import java.util.Arrays;
public class Kata {
public static String rps(String p1, String p2) {
String OneWin = "Player 1 won!";
String TwoWin = "Player 2 won!";
String Draw = "Draw!";
if (p1.equals("rock")) {
switch(p2) {
case "scissors": return OneWin;
case "paper": return TwoWin;
@Ge0rg3
Ge0rg3 / NumberGuessingGame.js
Last active June 7, 2018 19:46
*Extremely* simple JS number guessing game.
var response = parseInt(prompt("Enter your number here."));
let attempts = 0;
random = (Math.floor(Math.random()*10));
while (response !== random) {
attempts++;
if (response > random) {
console.log(`Too high!`);
response = parseInt(prompt("Too high!"));
} else if (response < random) {
@Ge0rg3
Ge0rg3 / Persistence.js
Created June 7, 2018 22:37
Finds a number's multiplicative persistence.
function persistence(num) {
let stringnum = num.toString()
let count = 0;
while ((stringnum).length > 1) {
count++;
let nums = stringnum.split("");
let m = 1;
for (let i = 0; i < nums.length; i++) {
m = m*nums[i];
}
@Ge0rg3
Ge0rg3 / EmailSpoofer.py
Last active June 17, 2018 10:41
A python tool to spoof emails.
#!/usr/bin/python
import smtplib, string
import os, time
def terms():
agree = raw_input("Please agree to never use this tool for malicious intent (y/n). ")
agree = agree.lower()
if agree == "y":
os.system("apt-get install sendmail")
time.sleep(1)
@Ge0rg3
Ge0rg3 / EscapeMe.py
Created August 19, 2018 23:44
A script for checking a list of programs against those on https://gtfobins.github.io
#!/usr/bin/python
#Usage: "python EscapeMe.py filename", where filename is a file containing a list of binaries.
import requests as rq
from bs4 import BeautifulSoup
import sys
resp = rq.get("https://gtfobins.github.io/").text
soup = BeautifulSoup(resp, 'html.parser')