Skip to content

Instantly share code, notes, and snippets.

View d33tah's full-sized avatar

Jacek Wielemborek d33tah

View GitHub Profile
@d33tah
d33tah / lib.py
Last active February 21, 2022 23:02
My experiments with acousting coupling.
#!/usr/bin/python
.
"""
lib.py - a utility library for both acousting coupler modules.
Do not run this code directly.
"""
import time
@d33tah
d33tah / isort.py
Last active February 21, 2022 19:48
A simple tool for sorting a collection of items interactively - for example, to make a list of most favorite books.
#!/usr/bin/env python
import sys # stderr
import random # shuffle
import copy
import pickle
try:
input = raw_input
except NameError:
@d33tah
d33tah / loaditems.py
Created November 29, 2013 00:37
Loads an items.xml OpenTibia database file.
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""Loads an items.xml OpenTibia database file."""
import xml.etree.ElementTree as ET
def itemnode_to_dict(node):
"""Translates an xml.etree.ElementTree.Element element with a Tibia item
#!/usr/bin/env python3
import time
import subprocess
import copy
from enum import Enum, auto
import typing as T
import random
T_POS = T.List[int]
@d33tah
d33tah / whoscansme.py
Last active September 3, 2021 15:22
A tool that displays which /24 networks portscanned me, hour by hour.
#!/usr/bin/env python2
import subprocess
import datetime
import csv
import collections
import sys
import socket
#!/usr/bin/env python3
import dateutil.parser
import textwrap
import argparse
import telegram_scraper
def main():
parser = argparse.ArgumentParser()
@d33tah
d33tah / Dockerfile
Created February 4, 2021 14:31
Shellcode test environment
FROM python:3.8
ADD a.c .
ADD a.py .
ADD buf.asm .
RUN apt-get update && apt-get install nasm && nasm buf.asm && make a
CMD /bin/bash -c 'python3 a.py & sleep 1; ./a ; echo "exit code=$?"'
@d33tah
d33tah / Dockerfile
Last active December 20, 2020 17:14
isitopen
FROM python:3.8
ADD ./requirements.txt .
RUN python3 -m pip install -r requirements.txt
ADD ./main.py .
ENTRYPOINT ["./main.py"]
@d33tah
d33tah / Dockerfile
Created March 3, 2020 09:53
lelegram-builder
FROM ubuntu:18.04
RUN apt-get update && apt-get install -y curl git gnupg2 python docker.io && \
curl https://bazel.build/bazel-release.pub.gpg | apt-key add - && \
echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list && \
apt-get update && apt-get install -y bazel
RUN /bin/echo -e '#!/bin/bash\n\
set -euo pipefail\n\
git clone http://code.hackerspace.pl/hscloud\n\
[package]
name = "publicsuffixtest"
version = "0.1.0"
authors = ["Jacek Wielemborek <d33tah@gmail.com>"]
[[bin]]
name = "publicsuffixtest"
path = "main.rs"
[dependencies]