Skip to content

Instantly share code, notes, and snippets.

View mirabilos's full-sized avatar

mirabilos mirabilos

View GitHub Profile
// // https://twitter.com/settings/your_twitter_data/twitter_interests
// Lots of discussion and improvement of the original script in the comments
// Here's the best version that works well
// Because Twitter stops the script working after unchecking 50 interests, so you will almost certainly have to run the script multiple times
function sleep(milliseconds) {
return new Promise(function (resolve) {
return setTimeout(resolve, milliseconds);
});
@ethack
ethack / TypeClipboard.md
Last active July 19, 2024 11:46
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.

@DanielGibson
DanielGibson / sdl2test.c
Last active April 22, 2024 18:13
test SDL2 input (mouse and keyboard events)
/*
* SDL2 mousebutton test
*
* build with:
* $ gcc $(sdl2-config --cflags) -o sdl2test sdl2test.c $(sdl2-config --libs)
*/
#include <stdio.h>
#include <SDL.h>
#include <errno.h>