Skip to content

Instantly share code, notes, and snippets.

View madsc13ntist's full-sized avatar
💀
My unyielding melancholy brings all the existentialists to the yard.

Z͇͔̖̣̼͛̃ madsc13ntist

💀
My unyielding melancholy brings all the existentialists to the yard.
View GitHub Profile
@madsc13ntist
madsc13ntist / logging example.py
Last active October 1, 2022 20:43
just an example of how to setup a logging object called "logger" to use in your scripts.
import logging
# '''''''''' Setup More Robust Logging ''''''''''''''''''''
# Create a generic logger object
logger = logging.getLogger(__name__)
########### set logging level.
#logger.setLevel(logging.DEBUG)
logger.setLevel(logging.INFO)
#logger.setLevel(logging.WARNING)
@madsc13ntist
madsc13ntist / emdeefive.py
Last active January 6, 2021 17:56
https://www.hackthebox.eu/home/challenges/Web. (Flag md5: 337e1ded05a871779beec0a9636f23bd)
#!/usr/bin/python3
"""
Solution for HTB EU Challenge: "Emdee five for life" [by L4mpje]
"""
import sys
import hashlib
import requests
from requests_html import HTMLSession # pip3 install requests-html
if len(sys.argv) < 2:
@madsc13ntist
madsc13ntist / feedparser_example.py
Created May 28, 2020 18:07
Just a quick and dirty sample that should help identify how the feedparser module can be used to fetch articles from RSS feeds.
#!/usr/bin/env python3
""""""""" Import Modules """""""""
import feedparser
""""""""" Create a List of RSS feed URLs with articles to fetch """""""""
rss_feed_urls = ["https://www.us-cert.gov/ncas/alerts.xml",
"",
]
""""""""" Walk through your list of rss feed urls """""""""
@madsc13ntist
madsc13ntist / explode.py
Created May 8, 2018 15:06
A simple function that prints a representation of any object. Just feed it a variable and enjoy an exploded view.
from pprint import pprint
def explode(obj):
"""
explode(obj)
List contents of 'obj'
:param obj: an object to explore.
:return:
"""
try:
@madsc13ntist
madsc13ntist / syslog.py
Created May 3, 2018 19:09
A generic script for sending (arbitrary) Syslog messages with Python.
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
### Import Modules
import os
import socket
import hashlib
import logging
import argparse
from argparse import RawTextHelpFormatter
@madsc13ntist
madsc13ntist / arrl_name_search.py
Created September 12, 2016 19:50
Generic disposable script for searching the ARRL for your (new) callsign
#!/usr/bin/env python
# Usage: ./arrl_name_search.py <your lastname, firstname>
# Example: ./arrl_name_search.py "Casler, David"
import sys
import requests # "pip install requests" OR "sudo apt-get install python-requests"
from lxml import html
if __name__ == "__main__":
@madsc13ntist
madsc13ntist / keybase.md
Last active August 29, 2015 14:13
keybase.md

Keybase proof

I hereby claim:

  • I am madsc13ntist on github.
  • I am madsc13ntist (https://keybase.io/madsc13ntist) on keybase.
  • I have a public key whose fingerprint is AD18 4F41 87DE 13DC A4C0 F9E5 57A8 01F9 FFBD 62FA

To claim this, I am signing this object: