Skip to content

Instantly share code, notes, and snippets.

View vesche's full-sized avatar
🛸
I WANT TO BELIEVE

Austin Jackson vesche

🛸
I WANT TO BELIEVE
View GitHub Profile
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <unistd.h>
#include <dirent.h>
#include <string.h>
#include <openssl/evp.h>
#include <curl/curl.h>
#define KEY_SERVER_IP "1.2.3.4"
print('OoT Dampe Heart Piece Cumulative Probability\n')
print('\t'.join(['try', 'probability', 'equation']))
for i in range(1, 99):
print('\t'.join([
f'{i:<4}',
f'{str(round((1-(9/10)**i)*100, 3))+"%":<12}',
f'1 - (9/10)**{i}',
]))
#!/usr/bin/env python
import requests
MORSE_MAP = {
'A': '.-', 'B': '-...', 'C': '-.-.',
'D': '-..', 'E': '.', 'F': '..-.',
'G': '--.', 'H': '....', 'I': '..',
'J': '.---', 'K': '-.-', 'L': '.-..',
'M': '--', 'N': '-.', 'O': '---',
import marshal, types
# >>> def x():
# ... return eval
# ...
# >>> x()('2+2')
# 4
# >>> import marshal
# >>> marshal.dumps(x.__code__)
# ...
@vesche
vesche / xor_files.py
Created May 8, 2021 03:27
simple xor two files script
#!/usr/bin/env python
import sys
def get_bytes(file_name):
with open(file_name, 'rb') as f:
return [byte for byte in f.read()]
out_bytes = list()
for a, b in zip(get_bytes(sys.argv[1]), get_bytes(sys.argv[2])):
@vesche
vesche / rename3.py
Created July 8, 2020 23:59
Rename3
#!/usr/bin/env python
import os
for f in os.listdir('.'):
is_file = False
if os.path.isfile(f):
is_file = True
#!/usr/bin/env python
import json
import crayons
import requests
PYPI_URL = 'https://pypi.org/pypi/{package_name}/json'
homoglyphs = {
'a': ['ɑ'],
@vesche
vesche / gctf1.py
Created June 23, 2019 19:15
gctf1.py
import requests
def get_new_message(message):
message = message.lower()
blindvalues = [
'10', '120', '140', '1450', '150', '1240', '12450',
'1250', '240', '2450', '130', '1230', '1340', '13450',
'1350', '12340', '123450', '12350', '2340', '23450', '1360',
'12360', '24560', '13460', '134560', '13560',
]
# 1
for c in range(int(input())):
n = int(input())
a = n
for i, d in enumerate(reversed(str(n))):
if d == '4':
a -= 10 ** i
b = n - a
print('Case #{0}: {1} {2}'.format(c+1, a, b))
#!/usr/bin/env python
"""
quick incoming rename script 2
"""
import os
for f in os.listdir('.'):
is_file = False