$ sudo apt install kitty
This file contains hidden or 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/python3 | |
'''Get data from IPGeolocation’s Astronomy API.''' | |
from json import loads | |
from requests import get | |
from pendulum import parse | |
# API key | |
API_KEY = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' | |
# geolocation | |
LATITUDE = '40.713' |
This file contains hidden or 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/python3 | |
'''Scrape Dark Sky website for weather data.''' | |
import requests | |
from bs4 import BeautifulSoup | |
import pendulum | |
# source website | |
URL = 'https://darksky.net/forecast/40.7127,-74.0059/us12/en' | |
# browser header | |
headers = { |
This file contains hidden or 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/python3 | |
'''Decimal/Binary/Octal/Hex/ASCII Conversion Chart''' | |
def generate_chart(): | |
'''Generate ASCII conversion chart.''' | |
# decimal keys with standard ASCII symbols | |
ascii_symbols = { | |
0: 'NUL', 1: 'SOH', 2: 'STX', 3: 'ETX', 4: 'EOT', 5: 'ENQ', 6: 'ACK', | |
7: 'BEL', 8: 'BS', 9: 'HT', 10: 'LF', 11: 'VT', 12: 'FF', 13: 'CR', | |
14: 'SO', 15: 'SI', 16: 'DLE', 17: 'DC1', 18: 'DC2', 19: 'DC3', |
This file contains hidden or 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 | |
declare -A STATION | |
STATION[$(printf "\e[38;2;255;160;0mDEF CON [SomaFM]\e[38;2;0;95;255m mid-tempo >> downtempo >> chill-out >> chillstep >> electro-soul >> ambient\e[0m")]='http://ice3.somafm.com/defcon-128-aac' | |
STATION[$(printf "\e[38;2;255;160;0mBlack Rock FM [SomaFM]\e[38;2;0;95;255m dark ambient >> desert electronic\e[0m")]='http://ice3.somafm.com/brfm-128-aac' | |
STATION[$(printf "\e[38;2;255;160;0mSynphaera [SomaFM]\e[38;2;0;95;255m modern electronic >> ambient >> space\e[0m")]='http://ice2.somafm.com/synphaera-128-aac' | |
STATION[$(printf "\e[38;2;255;160;0mDrone Zone [SomaFM]\e[38;2;0;95;255m ambient >> space\e[0m")]='http://ice2.somafm.com/dronezone-128-aac' | |
STATION[$(printf "\e[38;2;255;160;0mDeep Space One [SomaFM]\e[38;2;0;95;255m ambient >> space\e[0m")]='http://ice2.somafm.com/deepspaceone-128-aac' | |
STATION[$(printf "\e[38;2;255;160;0mSpace Station Soma [SomaFM]\e[38;2;0;95;255m downtempo >> space\e[0m")]='http://ice5.somafm.com/spacestation-128-aac' | |
STATION[$(printf "\e[38;2;255;160;0mSF |
This file contains hidden or 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/python3 | |
'''Use netcat to get list of ports numbers.''' | |
def get_ports(): | |
from os import system | |
system("nc mercury.picoctf.net 22902 > ports.txt &") | |
if __name__ == '__main__': |
This file contains hidden or 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/python3 | |
'''Translate encoded pictograms to picoCTF key.''' | |
import urllib.request | |
with urllib.request.urlopen('https://mercury.picoctf.net/static/\ | |
0d3145dafdc4fbcf01891912eb6c0968/enc') as f: | |
decoded = f.read().decode('utf-8') | |
key = '' | |
for i in range(0, len(decoded)): |
This file contains hidden or 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/python3 | |
'''Decode picoGym flag based on ROT13 cypher.''' | |
import re | |
def decode_rot13(s: str) -> str: | |
'''Decode string.''' | |
decode = '' | |
for char in s: | |
if ord(char) > 64 and ord(char) < 78: |
This file contains hidden or 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 | |
'''Spoof MAC address. (as a cybersecurity enhancement)''' | |
from random import randint | |
from random import choice | |
from subprocess import run | |
# pseudo-randomly generated MAC address | |
mac_addr = f"{hex(choice(range(16, 255, 2)))[2:]}:\ | |
{hex(randint(16, 256))[2:]}:\ | |
{hex(randint(16, 256))[2:]}:\ |