Skip to content

Instantly share code, notes, and snippets.

@havenokarma
havenokarma / TypeClipboard.md
Created April 8, 2022 07:05 — forked from ethack/TypeClipboard.md
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.

@havenokarma
havenokarma / checkpoint.sh
Created December 28, 2021 02:54 — forked from bubenkoff/checkpoint.sh
Endpoint Security VPN FULL start/stop script for Mac OS X
#!/bin/bash
#
# The reason of creating this script is that Endpoint Security VPN installs it's own application firewall kext cpfw.kext
# which prevents for example PPTP connections from this computer, which is not appropriate if you need subj connection just
# from time to time
#
# Usage: ./checkpoint.sh
#
# The script checks if Enpoint Security VPN is running. If it is, then it shuts it down, if it is not, it fires it up.
# Or, make an Automator action and paste the script.
import java.text.SimpleDateFormat
node {
def commitHash = ""
def dateFormat = new SimpleDateFormat("YYYYmmdd")
def timeFormat = new SimpleDateFormat("HHMMSS")
def date = new Date()
def mavenVersion = ""
stage('Checkout scm') {
[plex_movies]
type = drive
scope = drive
token = {"access_token":"ya29.GlzVBk7-mVSCh0aIsMifEdfiYIMzh1lmO_ArvF7EYuBXy2L8jBqLrPhyf_IRls-3BAwDGCl-iXrsmcqrnKwOpINHyudqJH20-Ebn4-ZWqqCv6udgOqDd2l_TEX2rJQ","token_type":"Bearer","refresh_token":"1/LI1Ul3EHfjGXKHypLc_hnkE-LtTTBqPu8ESdKvbG0FE","expiry":"2019-03-23T05:49:51.3519216+04:00"}
team_drive = 0AGGASzRb0gxAUk9PVA
chunk_size = 16M
[plex_crypt]
type = crypt
remote = plex_movies:DATA