Skip to content

Instantly share code, notes, and snippets.

View darkarnium's full-sized avatar
💭
🔥

Peter darkarnium

💭
🔥
View GitHub Profile
@darkarnium
darkarnium / serve.sh
Last active March 14, 2024 14:25
JupyterLab - Local setup
#!/bin/bash
# If the lab container version changes, plugins and their associated Python dependencies
# may need updating.
LAB_CONTAINER="jupyter/base-notebook:lab-4.0.7"
function wait_for_jupyterlab {
while true ; do
if curl -s -m5 -o /dev/null -f http://127.0.0.1:8888; then
@darkarnium
darkarnium / hasher.go
Last active January 27, 2022 13:56
Go vs Python - SHA1 and MD5
package hasher
import (
"crypto/md5"
"crypto/sha1"
"encoding/hex"
"io"
"os"
)
@darkarnium
darkarnium / libvirt-linux-patches.xsl
Created November 9, 2021 18:36
Terraform Libvirt Patches
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" indent="yes"/>
<xsl:output method="xml" indent="yes" />
<xsl:param name="targetBusSata" select="'sata'"/>
<xsl:param name="targetBusVirtio" select="'virtio'"/>
<xsl:param name="vcpuPlacementAuto" select="'auto'"/>
<xsl:param name="diskCache" select="'none'"/>
<xsl:param name="diskIoQueues" select="'4'"/>
@darkarnium
darkarnium / jupyterlab.sh
Last active July 17, 2022 21:42
JupyterLab Helper - Installs, configures, and runs JupyterLab in a container.
#!/bin/bash
#
# NOTE: This script enables the JupterLab Extension Manager and installs extensions.
# There are code-execution risks with this, so make sure you only use trusted
# extensions and you're comfortable with these extensions before running!
#
# This script wrappers the JupterLab Docker container. It defines a few Docker volume
# mounts to ensure that JupyterLab configuration and notebooks are persisted between
# restarts.
#
@darkarnium
darkarnium / DESCRIPTION.MD
Created November 15, 2020 20:16
[PATCH] OpenNetworkLinux on Ubuntu 20.04.1 LTS

Overview

This patch allows the current ONL master branch (ref. 1537d833) to build on Ubuntu 20.04.1. Without this patch, the following error is observed while building using the docker/tools/onlbuilder environment when targetting armel:

INFO:onlrfs:dpkg-configure filesystem...
DEBUG:onlrfs:Executing:sudo chroot jessie/rootfs-armel.d /tmp/configure.sh
@darkarnium
darkarnium / commands
Last active June 1, 2020 07:03
That's not on my calendar
# Disable Slot 1
cmd("KIT_SCH CFG_SCH_ENTRY with CCSDS_STREAMID 6293, CCSDS_SEQUENCE 49152, CCSDS_LENGTH 6, CCSDS_FUNCCODE 4, CCSDS_CHECKSUM 0, SLOT 1, ACTIVITY 0, CONFIG 0")
# Reprogram Slot 0, Activity 0 to call KIT_TO_TLM_FLAG_MID.
cmd("KIT_SCH LOAD_SCH_ENTRY with CCSDS_STREAMID 6293, CCSDS_SEQUENCE 49152, CCSDS_LENGTH 13, CCSDS_FUNCCODE 5, CCSDS_CHECKSUM 0, SLOT 0, ACTIVITY 0, CONFIG 1, FREQ 1, OFFSET 0, MSG_TBL_IDX 42")
# Reprogram Slot 1, Activity 0 to call KIT_TO_TLM_FLAG_MID.
cmd("KIT_SCH LOAD_SCH_ENTRY with CCSDS_STREAMID 6293, CCSDS_SEQUENCE 49152, CCSDS_LENGTH 13, CCSDS_FUNCCODE 5, CCSDS_CHECKSUM 0, SLOT 0, ACTIVITY 0, CONFIG 1, FREQ 1, OFFSET 0, MSG_TBL_IDX 42")
# Enable Telemetry
(ctf) [darkarnium::Callisto MagicBus][0]$ ipython3 --no-banner -i magic_bus.py
[x] Opening connection to bus.satellitesabove.me on port 5041
[x] Opening connection to bus.satellitesabove.me on port 5041: Trying 18.222.201.16
[+] Opening connection to bus.satellitesabove.me on port 5041: Done
[*] Sent b'^93+00+00+35+.' to bus
[*] Sent b'^93+00+00+45+.' to bus
[*] Sent b'^93+00+00+55+.' to bus
[*] Sent b'^93+00+00+75+.' to bus
[*] Sent b'^93+00+00+85+.' to bus
[*] Sent b'^93+00+00+a5+.' to bus
@darkarnium
darkarnium / exploit.sh
Last active June 1, 2020 07:03
spacedb
(ctf) [darkarnium::Callisto SpaceDB][0]$ python3 -i flagger.py
[x] Opening connection to spacedb.satellitesabove.me on port 5062
[x] Opening connection to spacedb.satellitesabove.me on port 5062: Trying 18.191.160.21
[+] Opening connection to spacedb.satellitesabove.me on port 5062: Done
[*] Sending ticket
[*] Waiting for Telemetry service endpoint
[*] 18.191.160.21:19587/tel/graphiql
[*] Starting voltage fix-up thread
[*] Waiting for Scheduler service to start
[!] VIDIODE fixed to 7.0 (from 6.47) for 1590260897.99999
@darkarnium
darkarnium / diff.patch
Last active April 10, 2020 22:31
Janky ass patch for plugin.video.plutotv/resources/lib/plutotv.py
diff -w /tmp/a /tmp/b
203,205c203,207
< tz = str(timezone())
< start = datetime.datetime.now().strftime('%Y-%m-%dT%H:00:00').replace('T','%20').replace(':00:00','%3A00%3A00.000'+tz)
< stop = (datetime.datetime.now() + datetime.timedelta(hours=4)).strftime('%Y-%m-%dT%H:00:00').replace('T','%20').replace(':00:00','%3A00%3A00.000'+tz)
---
> tz = timezone()
> tz = '{0:04d}'.format(timezone())
> tz = '%2B{}{}:{}{}'.format(*list(tz))
> start = datetime.datetime.now().strftime('%Y-%m-%dT%H:00:00') + tz
@darkarnium
darkarnium / ida-procedures-from-kallsyms.py
Last active November 14, 2022 15:33
IDA - Uses kallsyms to mark procedures and names.
'''
Attempts to mark all addresses indicated by kallsyms as procedures, and renames
to match.
This script assumes that the contents of /proc/kallsyms from the target device
has been copied into the same directory as this script. It also assumes that
the relocation base / offset is properly set below.
Author: Peter Adkins (@Darkarnium)
'''