Skip to content

Instantly share code, notes, and snippets.

View dunielpls's full-sized avatar

Daniel Isaksen dunielpls

View GitHub Profile
@dunielpls
dunielpls / wireshark-dark.py
Created October 11, 2023 19:39 — forked from hexdefined/wireshark-dark.py
Invert the luminosity of Wireshark packets (for dark themes)
#!/usr/bin/env python3
import fileinput
import re
from colorsys import *
def rgb_to_hsl(r, g, b):
return hsv_to_hsl(*rgb_to_hsv(r, g, b))
def hsl_to_rgb(h, s, l):
return hsv_to_rgb(*hsl_to_hsv(h, s, l))
@dunielpls
dunielpls / ping_host.py
Last active October 19, 2022 09:14
run fping and parse its output, "unreachable" or json stats. requires python 3.5. made for use with zabbix.
#!/usr/bin/env python3
import sys
import json
import subprocess
# '1.1.1.1 : xmt/rcv/%loss = 1/1/0%, min/avg/max = 1.35/1.35/1.35'
def parse(s):
data = {}
root:xc3511
guest:guest
guest:12345
root:root
root:admin
root:realtek
root:1234
root:12345
root:123456
root:1111