mkdir -p /srv/apt
# copy to update-zoom.py to /srv/apt
echo 'APT::Update::Pre-Invoke {"cd /srv/apt && ./update-zoom.py && apt-ftparchive packages . >Packages && apt-ftparchive release . >Release";};' >/etc/apt/apt.conf.d/100custom
echo 'deb [trusted=yes] file:/srv/apt ./' >/etc/apt/sources.list.d/custom.list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.Iterator; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.NavigableSet; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
import java.util.stream.Collectors; | |
import java.util.TreeSet; |
- Create (or import) a virtual machine
- Any hypervisor would work though KVM does not easily support exporting to an OVA
- The challenge with KVM is not the disk conversion from qcow2 but the generation of an OVF file (TODO Investigate options)
- Note that the virtual machine should not be EFI-based, which EC2 does not support
- Any hypervisor would work though KVM does not easily support exporting to an OVA
- Install and configure cloud-init (minimally for deploying the ssh keypair and resetting the sshd host keys)
- Assuming a Centos / Red Hat based system:
yum -y install cloud-init
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:10 | |
RUN apt-get update && \ | |
apt-get install -y curl gnupg2 nmap postgresql postgresql-client | |
# Ref: https://docs.rapid7.com/metasploit/installing-the-metasploit-framework/#installing-the-metasploit-framework-on-linux | |
RUN cd /root && curl -o msfinstall https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb && chmod +x msfinstall | |
RUN cd /root && ./msfinstall | |
# Ref: https://www.offensive-security.com/metasploit-unleashed/using-databases/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import argparse, contextlib, socket, ssl | |
if __name__ == '__main__': | |
parser = argparse.ArgumentParser() | |
parser.add_argument('--host', '-o', default='localhost') | |
parser.add_argument('--port', '-p', type=int, default=4430) | |
args = parser.parse_args() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package logger | |
import ( | |
"fmt" | |
"io" | |
"path" | |
"runtime" | |
"strings" | |
"sync" | |
"time" |
This is a simple project to receive D-Bus desktop notifications and display them with a systray application.
Purposefully displaying notifications only when the systray application is right-clicked, if OSD notifications is your preference there are a multitude of options available: notification-daemon, notify-osd, dunst, etc.
mount -o loop debian-10.0.0-amd64-netinst.iso /mnt/loop
mkdir debian-10.0.0-amd64-netinst
shopt -s dotglob; cp -rv /mnt/loop/* debian-10.0.0-amd64-netinst/
umount /mnt/loop
dd if=debian-10.0.0-amd64-netinst.iso of=isohdpfx.bin bs=1 count=432
cp debian-10.0.0-amd64-netinst/.disk/mkisofs .
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Restore/build an i3 session | |
import argparse, json, logging, queue, subprocess, threading | |
if __name__ == '__main__': | |
def i3msg(args): | |
cmd = ['i3-msg'] + args | |
logging.info('cmd = %r', cmd) | |
subprocess.check_call(cmd, stderr=subprocess.STDOUT, encoding='utf-8') |
NewerOlder