Skip to content

Instantly share code, notes, and snippets.

@thatreguy
thatreguy / sshd_config
Last active February 19, 2020 07:11
Windows OpenSSH server survival tips
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
# default value.
#Port 22
#AddressFamily any
@thatreguy
thatreguy / dockerhub-v2-api-user.sh
Last active November 8, 2019 03:10 — forked from kizbitz/dockerhub-v2-api-user.sh
Get the list of images and tags for a Docker Hub user account.
#!/bin/bash
# Example for the Docker Hub V2 API
# Returns all imagas and tags associated with a Docker Hub user account.
# Requires 'jq': https://stedolan.github.io/jq/
# set username and password
UNAME="FOO"
UPASS="BAR"
@thatreguy
thatreguy / ring_call_gate.asm
Last active December 15, 2018 02:44
Ring Switcher using call and trap gates nasm -f bin -o ring_x_gate.img ring_x_gate.asm https://www.reddit.com/r/osdev/comments/5tgete/what_is_the_canonical_way_to_enter_ring_3_on_x86/ddpt39r
%define SEL_RING_0_CODE 0x0008
%define SEL_RING_0_DATA 0x0010
%define SEL_RING_1_CODE (0x0018 | 0x0001)
%define SEL_RING_1_DATA (0x0020 | 0x0001)
%define SEL_RING_2_CODE (0x0028 | 0x0002)
%define SEL_RING_2_DATA (0x0030 | 0x0002)
%define SEL_RING_3_CODE (0x0038 | 0x0003)
@thatreguy
thatreguy / ring0.asm
Created December 15, 2018 02:43 — forked from majioa/ring0.asm
Getting the Ring0 level for x86 processor series (guess i386, i486, and may be next generations)
;Как получить привелегию Ring 0
;Автор: The GSGR
;Иногда это нужно для доступа к портам выше $FF, таких как IDE контроллер и т.д.
;--------------------------------------------------
.386p
.model flat
.radix 16
Ring_0_CS_32 = 28