Skip to content

Instantly share code, notes, and snippets.

View tutugreen's full-sized avatar
busy, slow respond.

tutugreen tutugreen

busy, slow respond.
View GitHub Profile
@zengxs
zengxs / chinadns.service
Created November 24, 2016 12:06
Systemd unit file for chinadns
# Systemd unit file for chinadns
[Unit]
Description=Protect yourself against DNS poisoning in China
After=syslog.target network.target
[Service]
Type=simple
ExecStart=/opt/chinadns/chinadns -b 0.0.0.0 -p 5353 -c /opt/chinadns/chnroute.txt -s "8.8.8.8:53,8.8.4.4:53"
ExecStop=/bin/kill -15 $MAINPID
@selfboot
selfboot / centos_python.sh
Last active June 8, 2023 14:11
CentOS 6.8: Install Python 2.7.10, pip, virtualenv, and virtualenvwrapper on CentOS
#!/bin/bash
# According to:
# How To Set Up Python 2.7.6 and 3.3.3 on CentOS 6.4
# https://www.digitalocean.com/community/tutorials/how-to-set-up-python-2-7-6-and-3-3-3-on-centos-6-4
yum -y update
yum groupinstall -y 'development tools'
yum install -y zlib-dev openssl-devel sqlite-devel bzip2-devel
yum install xz-libs
wget http://www.python.org/ftp/python/2.7.10/Python-2.7.10.tar.xz
@ethack
ethack / TypeClipboard.md
Last active July 10, 2024 11:57
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.

@katowulf
katowulf / jquery.tabslideout.1.3.js
Created May 10, 2012 20:50
jquery.tabslideout.1.3.js
/*
tabSlideOUt v1.3 (altered by katowulf)
Originally by William Paoli: http://wpaoli.building58.com
To use you must have an image ready to go as your tab
Make sure to pass in at minimum the path to the image and its dimensions:
example: