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 python3 | |
import logging | |
from time import sleep | |
import json | |
# dependencies are: | |
# stomp.py, termcolor | |
from termcolor import colored |
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/python3.5 | |
import socket, notify2, time, requests, json, datetime, hashlib, struct | |
notify2.init("Doorbell") | |
def notify(summary, text): | |
n = notify2.Notification(summary, text) | |
n.set_timeout(60) | |
n.set_urgency(2) |
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 python3 | |
import socket, hashlib, struct | |
client = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) # UDP | |
client.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1) | |
client.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) | |
client.bind(("", 37700)) |
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 python3 | |
# ./crack.py p059_cipher.txt diameter | |
# https://projecteuler.net/problem=59 | |
import sys | |
def testkey(thekey): | |
# crude printable ascii | |
return all(c in range(96,123) and c==thekey[n%3] for n,c in enumerate(thekey)) |
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 python3 | |
import glob, os, os.path, argparse | |
parser = argparse.ArgumentParser() | |
parser.add_argument('fileglob') | |
args = parser.parse_args() | |
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
# Edgy urbit reference goes here | |
from typing import List | |
PREFIX = 'dozmarbinwansamlitsighidfidlissogdirwacsabwissibrigsoldopmodfoglidhopdardorlorhodfolrintogsilmirholpaslacrovlivdalsatlibtabhanticpidtorbolfosdotlosdilforpilramtirwintadbicdifrocwidbisdasmidloprilnardapmolsanlocnovsitnidtipsicropwitnatpanminritpodmottamtolsavposnapnopsomfinfonbanmorworsipronnorbotwicsocwatdolmagpicdavbidbaltimtasmalligsivtagpadsaldivdactansidfabtarmonranniswolmispallasdismaprabtobrollatlonnodnavfignomnibpagsopralbilhaddocridmocpacravripfaltodtiltinhapmicfanpattaclabmogsimsonpinlomrictapfirhasbosbatpochactidhavsaplindibhosdabbitbarracparloddosbortochilmactomdigfilfasmithobharmighinradmashalraglagfadtopmophabnilnosmilfopfamdatnoldinhatnacrisfotribhocnimlarfitwalrapsarnalmoslandondanladdovrivbacpollaptalpitnambonrostonfodponsovnocsorlavmatmipfip' | |
SUFFIX = 'zodnecbudwessevpersutletfulpensytdurwepserwylsunrypsyxdyrnuphebpeglupdepdysputlughecryttyvsydnexlunmeplutseppesdelsulpedtemledtulmetwenbynhexfebpyldulhetmevruttylwydtepbesdexse |
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 validate(ts: str) -> bool: | |
dotcount = [1000]*10 | |
for digit in ts: | |
if digit.isnumeric(): | |
intdigit = int(digit) | |
if (dotcount[10-intdigit]<3): return False | |
dotcount[intdigit] = 0 | |
elif digit==".": | |
dotcount = [a+1 for a in dotcount] | |
else: |
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 python3 | |
import argparse, time, datetime, os | |
parser = argparse.ArgumentParser() | |
parser.add_argument("command", ) | |
args = parser.parse_args() | |
while True: | |
t1 = datetime.datetime.now() |
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 python3 | |
import base64, string, sys | |
B64 = string.ascii_uppercase + string.ascii_lowercase + string.digits + '+/=' | |
B64 = [ord(c) for c in B64] | |
def decode(inp): | |
inp += b"\x00" |
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 python3 | |
import json, time, subprocess | |
from datetime import datetime | |
# Dependencies | |
import psutil | |
import netifaces | |
print('{"version": 1}') |
NewerOlder