Skip to content

Instantly share code, notes, and snippets.

View phreakocious's full-sized avatar
🎯
Focusing

phreakocious phreakocious

🎯
Focusing
View GitHub Profile
@phreakocious
phreakocious / easy_cli.py
Created July 28, 2023 16:28
quick and dirty python CLI / REPL with history, helper functions, tab completion, etc.
import os
import code
import readline
import rlcompleter
from functools import partial
from rich import print, pretty, inspect # noqa: F401
pp = inspect
help = partial(inspect, help=True)
@phreakocious
phreakocious / demo.py
Last active June 2, 2023 21:29
python example using annotated dataclass to track created instances in a dict keyed by an ID field
from dataclasses import dataclass
class Tracking:
class ID(str):
pass
_id_class = ID
@classmethod
def __init_subclass__(cls, **kwargs):
safe-mode: off (not secure) drwxrwxrwx c99shell
inurl:c99.php
inurl:c99.php uid=0(root)
root c99.php
"Captain Crunch Security Team" inurl:c99
inurl:c99.php
allinurl: c99.php
inurl:c99.php
inurl:"c99.php" c99shell
inurl:c99.php uid=0(root)
@phreakocious
phreakocious / gist:12d9a4d07ef1744cecfc2171734aea27
Last active July 9, 2022 01:47
how to get Clockwork Pi DevTerm working with CM3+ EMMC storage
a CM3+ with onboard storage will not attempt to boot from the TF card
in this situation, the power light will come on, but the screen will be blank and have no backlight
to resolve this, the boot image must be written to the EMMC on the compute module
unfortunately, the DevTerm does not have a 'slave' connection, so this requires an I/O board
we used the cheapest one on Amazon - https://www.amazon.com/gp/product/B09P1ND8P
use `rpiboot` to get the onboard storage to present as a disk to the host machine:
- https://www.raspberrypi.com/documentation/computers/compute-module.html
if your CM3+ module is the 16GB or 32GB module, you can now flash the DevTerm image and be done

Keybase proof

I hereby claim:

  • I am phreakocious on github.
  • I am phreakocious (https://keybase.io/phreakocious) on keybase.
  • I have a public key ASBKfQE2JVhuKI9LTvRGzaoNjhVDVrZJIOhzVC_zyw__Bwo

To claim this, I am signing this object:

[root@vm:~] $ ping 10.100.40.1
PING 10.100.40.1 (10.100.40.1) 56(84) bytes of data.
64 bytes from 10.100.40.1: icmp_seq=1 ttl=255 time=1.43 ms
^C
--- 10.100.40.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.435/1.435/1.435/0.000 ms
[root@vm:~] $ tc qdisc add dev eth0 root netem delay 120ms
[root@vm:~] $ ping 10.100.40.1
lulz:##networking lulz$ egrep '[0-9] Komanda:.*[A-Z]{4}' * | tail -n90
2015-02-07_recalcitrant.txt:15:00:23 Komanda: [14:11:44] https://wiki.debian.org/QEMU#Networking
2015-02-07_recalcitrant.txt:15:00:30 Komanda: [14:55:11] evilman_home: RTNETLINK andswers : file exists
2015-02-07_recalcitrant.txt:15:34:23 Komanda: 20:32:52.808202 IP ip-10-0-0-199.ec2.internal > google-public-dns-a.google.com: ICMP echo request, id 690, seq 10, length 64
2015-02-07_recalcitrant.txt:15:35:06 Komanda: 20:34:51.270482 IP ip-10-0-0-199.ec2.internal > ip-10-0-0-1.ec2.internal: ICMP echo request, id 693, seq 3, length 64
2015-02-07_recalcitrant.txt:15:47:37 Komanda: 20:47:21.918343 IP ip-10-0-0-199.ec2.internal > ip-10-0-0-1.ec2.internal: ICMP echo request, id 701, seq 22, length 64
2015-02-09_recalcitrant.txt:17:17:18 Komanda: https://www.youtube.com/watch?v=NiHTOQzErjI
2015-02-11_recalcitrant.txt:12:34:02 Komanda: "Free is the last independent operator in France. Google, in the first years of its existence, was sometimes sugges
+-----+-----+
| |
| router |
| |
+-----+-----+
|.1
| 192.168.1.0/24
16 "12B"
18 "2B"
22 "3B"
26 "4B"
27 "1B"
28 "5B"
29 "10B"
33 "8B"
35 "9B"
40 "7B"
EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts:
sd 0:0:1:0: [sdb] Unhandled error code
sd 0:0:1:0: [sdb] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
sd 0:0:1:0: [sdb] CDB: Read(10): 28 00 6f c7 6c f0 00 00 08 00
end_request: I/O error, dev sdb, sector 1875340528
Buffer I/O error on device sdb, logical block 234417566
sd 0:0:1:0: [sdb] Unhandled error code
sd 0:0:1:0: [sdb] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
sd 0:0:1:0: [sdb] CDB: Read(10): 28 00 6f c7 6c f0 00 00 08 00