Skip to content

Instantly share code, notes, and snippets.

@ethack
ethack / TypeClipboard.md
Last active May 11, 2024 23:06
Scripts that simulate typing the clipboard contents. Useful when pasting is not allowed.

It "types" the contents of the clipboard.

Why can't you just paste the contents you ask? Sometimes pasting just doesn't work.

  • One example is in system password fields on OSX.
  • Sometimes you're working in a VM and the clipboard isn't shared.
  • Other times you're working via Remote Desktop and again, the clipboard doesn't work in password boxes such as the system login prompts.
  • Connected via RDP and clipboard sharing is disabled and so is mounting of local drives. If the system doesn't have internet access there's no easy way to get things like payloads or Powershell scripts onto it... until now.

Windows

The Windows version is written in AutoHotKey and easily compiles to an executable. It's a single line script that maps Ctrl-Shift-V to type the clipboard.

@johnmeehan
johnmeehan / index.html
Created October 18, 2020 18:34
Stimulus js Checkbox toggle
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="main.css">
<script src="bundle.js" async></script>
</head>
<body>
<div data-controller="toggler">
<label>Toggle Me</label>
@assiless
assiless / MagiskSupport.md
Last active May 11, 2024 23:04
MagiskOnRedroid
setup variables for commands
echo -e "\n
export image=redroid/redroid:11.0.0-amd64
export image_tar=${HOME}/redroid:11.0.0-amd64" >> ${HOME}/.bashrc
source ${HOME}/.bashrc
#!/bin/bash
if [ "$#" -ne 3 ]; then
echo "usage: sh thread-analyze.sh <pid> <number-of-dumps> <interval>"
exit
fi
count=$2
for i in `seq 1 $count`;
do
jstack -l $1 > thread_dump_`date "+%F-%T"`.txt &
@JayFoxRox
JayFoxRox / convert.sh
Created January 7, 2018 05:41
N64 ROM (z64) to ELF
#!/usr/bin/bash
# Get entry point from N64 ROM
dd if=test.z64 bs=1 skip=8 count=4 of=entrypoint >& /dev/null
# Convert entrypoint to little endian
#mips-elf-objcopy -I binary -O binary --reverse-bytes=4 entrypoint entrypoint
# Construct an ELF
mips-elf-objcopy -I binary test.z64 -O elf32-bigmips -B mips --adjust-section-vma .data+0x80000000 foo.elf
# Patch to MIPS III
printf '\x20\x00\x00\x00' | dd bs=1 seek=36 count=4 conv=notrunc of=foo.elf >& /dev/null
@dshoreman
dshoreman / slurp.md
Last active May 11, 2024 23:00
Swaymsg commands for listing windows and outputs

i3

Get Active Window ID

xdotool getactivewindow

Get Current Desktop ID

xdotool get_desktop_for_window "$(xdotool getactivewindow)"
@tjtanjin
tjtanjin / python_telegram_bot_guide.md
Last active May 11, 2024 22:52
A short guide for hosting telegram bot on Ubuntu!

How to host a telegram bot on Ubuntu (18.04/20.04)

Introduction

This short guide will walk you through hosting your very own telegram bot on Ubuntu (tested on Ubuntu 18.04 and 20.04)!

Prerequisites

This guide assumes knowledge of the following:

1) Provisioning a VPS
2) Familiarity with SSH
3) Familiarity with linux command line
@codecat
codecat / Webservices.md
Last active May 11, 2024 22:51
Trackmania Webservices

New documentation

Note: There is a newly maintained community documentation site for all of Trackmania's APIs!

Visit it at: https://webservices.openplanet.dev/

Authentication setup

This guide will explain how to authenticate with Nadeo's API. There are 2 methods of doing so, one is via a Ubisoft account, and one is via a dedicated server account. Note that the dedicated server account way is easier but imposes some limitations on what you can access with the API, but it could be enough.

Refer to my Nadeo Go package for a complete example.

@noelbundick
noelbundick / LICENSE
Last active May 11, 2024 22:47
Exclude WSL installations from Windows Defender realtime protection
MIT License
Copyright (c) 2018 Noel Bundick
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: