Skip to content

Instantly share code, notes, and snippets.

View skarllot's full-sized avatar
💭
I may be slow to respond.

Fabrício Godoy skarllot

💭
I may be slow to respond.
View GitHub Profile
@skarllot
skarllot / TypeClipboard.md
Last active April 22, 2024 10:06 — 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.

@skarllot
skarllot / .gitlab-ci.yml
Created June 20, 2018 20:28 — forked from ashalkhakov/.gitlab-ci.yml
Running .NET 3.5 CF builds under Docker for Windows
# this is the GitLab-CI file for building the image
variables:
CURRENT_IMAGE_TAG: rfid-applied/netcf35_build_environment:dev
stages:
- dockerize
dockerize:
stage: dockerize
script:
@skarllot
skarllot / heroku_entropy.sh
Created March 3, 2016 21:39 — forked from jwilkins/heroku_entropy.sh
monitor entropy on heroku dynos
#!/bin/bash
DATE="date +%Y%m%d%H%M%S"
RDATE="date +%Y%m%d%H%M%S"
IP='curl icanhazip.com'
ENTROPY='cat /proc/sys/kernel/random/entropy_avail'
LOG='heroku-entropy.log'
touch $LOG
while true; do
heroku run "echo \"$($DATE),\$($RDATE),\$($IP),\$DYNO,\$($ENTROPY)\"" 2>&1 | egrep "^20" >> $LOG;
done
@skarllot
skarllot / rescan.sh
Last active August 29, 2015 14:25 — forked from rafaelfoster/rescan.sh
Linux device rescan/resize after virtual machine changes
# Reference: http://blog.gurudelleccelsopicco.org/2009/09/online-lun-expansion-and-partition-resizing-without-reboot-under-linux/
echo 1 > /sys/block/[DEVICE]/device/rescan
# DETECT IF NEW DISKS ARE ATTACHED TO THE HOST
# Reference: http://www.cyberciti.biz/tips/vmware-add-a-new-hard-disk-without-rebooting-guest.html
ls /sys/class/scsi_host
@skarllot
skarllot / timestamp.go
Last active May 23, 2017 13:23 — forked from bsphere/timestamp.go
A Time type that (un)marshal from/to unix timing
package timestamp
import (
"fmt"
"gopkg.in/mgo.v2/bson"
"strconv"
"time"
)
type Timestamp time.Time
@skarllot
skarllot / Example.go
Last active August 29, 2015 14:23 — forked from congjf/.Title
Using MongoDB in golang with mgo
package main
import (
"fmt"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
"time"
)
type Person struct {
package main
import (
"fmt"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
"time"
)
type Person struct {
@skarllot
skarllot / 0_reuse_code.js
Last active August 29, 2015 14:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
# This command scan new hard disk drives on Linux Systems.
# this is useful when the host is on a Virtual Environment and you add new hard disks to it
ls /sys/class/scsi_host/ | while read host ; do echo "- - -" > /sys/class/scsi_host/$host/scan ; done
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# Based on:
# https://gist.github.com/martin-ueding/4007035#file-colorcodes-py
# https://gist.github.com/jyros/5169803#file-colorcodes-py
# https://gist.github.com/housemaister/5255959#file-colorcodes-py
#
# Copyright (c) 2012 Martin Ueding <dev@martin-ueding.de>
# Copyright (c) 2013 Jairo Sanchez <jairoscz@gmail.com>