Skip to content

Instantly share code, notes, and snippets.

View o-y's full-sized avatar
🦄

zv o-y

🦄
View GitHub Profile
@o-y
o-y / wol-observer.txt
Last active November 11, 2023 03:20
python script which observes networked Wake on Lan calls and forwards them.
-------------| Install deps
sudo apt install etherwake
pip3 install scapy
-------------| Allow unprivileged etherwake invocations
sudo ln -s /usr/sbin/etherwake /usr/bin/etherwake
sudo setcap cap_net_raw+ep /usr/sbin/etherwake
-------------| Get mac address
sudo iwconfig
import ctypes as c
class PyObject_HEAD(c.Structure):
_fields_ = [
('HEAD', c.c_ubyte * (object.__basicsize__ - c.sizeof(c.c_void_p))),
('ob_type', c.c_void_p)
]
_get_dict = c.pythonapi._PyObject_GetDictPtr
_get_dict.restype = c.POINTER(c.py_object)
@o-y
o-y / keybase.md
Last active September 20, 2020 13:28

Keybase proof

I hereby claim:

  • I am o-y on github.
  • I am o_y (https://keybase.io/o_y) on keybase.
  • I have a public key whose fingerprint is 2BFB 769F 77C2 8BC1 0B57 AAE9 C45A A00C 89C5 72FF

To claim this, I am signing this object: