Skip to content

Instantly share code, notes, and snippets.

View ret2src's full-sized avatar
🧉
Probably drinking Mate or Guayusa

ret2src ret2src

🧉
Probably drinking Mate or Guayusa
View GitHub Profile
@ret2src
ret2src / vifmrc
Created August 24, 2023 09:31
vifm previewer script for images, PDF, ePub, audio, video
fileviewer <image/*>
\ visualpreview image %pw %ph %px %py %c %N
\ %pc
\ visualpreview clear
fileviewer <video/*>
\ visualpreview video %pw %ph %px %py %c %N
\ %pc
\ visualpreview clear
@ret2src
ret2src / arch_cockpit_enable_secure_boot.md
Last active June 18, 2023 12:39
How to Enable Secure Boot in Red Hat Cockpit on Arch Linux

How to Enable Secure Boot in Red Hat Cockpit on Arch Linux

I recently tried Red Hat Cockpit for the first time, because I wanted a more modern alternative to Virtual Machine Manager.

Since I'm on Arch Linux, I had to do some extra tweaking to get everything to work, but in the end I got a working Windows 10 VM with Secure Boot enabled - great!

After following the setup instructions for KVM, QEMU and libvirt on the Arch Wiki I installed cockpit as well as cockpit-machines and made sure that my user was a member of the libvirt group.

Next, I started the core services:

@ret2src
ret2src / fakesnip
Last active February 11, 2024 14:47
Fakesnip: A pseudo-ksnip for Sway
#!/usr/bin/env bash
# Fakesnip: A pseudo-ksnip for Sway, based on `grim` and `slurp` — because we love the screenshot editing power of ksnip, but it does not have real Wayland + Sway support yet.
# Usage:
#
# Place this script in a location of your choosing, such as `~/.config/sway/scripts/`.
# Then, add the following to your Sway config:
#
@ret2src
ret2src / dehex.sh
Created February 9, 2023 12:46
script to decode hashcat HEX[...] results
#!/usr/bin/env bash
# quick and dirty script to decode hashcat's "HEX[...]" results
# tested with German passwords, YMMV
# knowledge stolen from <https://sensepost.com/blog/2020/nthashes-and-encodings/>
if [ $# -eq 0 ]
then
echo "usage: ./dehex.sh FILE"
exit
@ret2src
ret2src / bluetooth-toggle.sh
Created August 29, 2022 08:17
One-liner to toggle bluetooth in bash, using `rfkill` (e.g. for window managers)
if [ "$(rfkill list bluetooth | grep -ic yes)" -ge 1 ]; then rfkill unblock bluetooth; else rfkill block bluetooth; fi
@ret2src
ret2src / Installing_Python_2 _Dependencies_on_Kali_Linux_in_2021.md
Last active September 10, 2021 16:00
Installing Python 2 Dependencies on Kali Linux in 2021

Rationale

Python 2 is deprecated and you should no longer use it. However, many older tools (especially hacking and pentesting tools) are written in Python 2 and have not yet been or will never be updated to Python 3. So, until new tools have replaced the old ones in the year 9001, we need a way to run the old tools on an otherwise current Linux distribution.

Official Guidance

There's an official guide by Offensive Security. Follow it to install pyenv: https://www.kali.org/docs/general-use/using-eol-python-versions/

Additional Fix to Install impacket