Skip to content

Instantly share code, notes, and snippets.

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

Abell udpsec

💭
I may be slow to respond.
View GitHub Profile
@dmethvin
dmethvin / gist:1676346
Created January 25, 2012 13:51
Breakpoint on access to a property
function debugAccess(obj, prop, debugGet){
var origValue = obj[prop];
Object.defineProperty(obj, prop, {
get: function () {
if ( debugGet )
debugger;
return origValue;
},
#!/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
@hubgit
hubgit / README.md
Last active March 11, 2025 17:21
Remove metadata from a PDF file, using exiftool and qpdf. Note that embedded objects may still contain metadata.

Anonymising PDFs

PDF metadata

Metadata in PDF files can be stored in at least two places:

  • the Info Dictionary, a limited set of key/value pairs
  • XMP packets, which contain RDF statements expressed as XML

PDF files

@zhugexiaobo
zhugexiaobo / updateRepo.sh
Created August 29, 2013 10:30
批量 git pull 仓库最新代码
#!/bin/sh
for dir in $(ls -d */)
do
if [ -d "$dir"/.git ]; then
echo "$dir" && cd "$dir" && git pull && cd ..
fi
done
@mattvh
mattvh / favicon.rb
Last active September 4, 2020 12:13
Discovering and saving favicons with Ruby
# by Matt Harzewski
# Read more: http://www.webmaster-source.com/2013/09/25/finding-a-websites-favicon-with-ruby/
require "httparty"
require "nokogiri"
require "base64"
class Favicon
@diyism
diyism / software alternative for linux.md
Last active August 8, 2024 23:45
software alternative for linux,migrating from windows to linux
  1. DOS usb boot -> ubuntu live iso usb boot(too big), minimal_linux_live_20-Jan-2017_64-bit.iso(only 6.8MB)
  2. diskgenius for dos -> testdisk("No Log\Proceed\Intel\Analyse\Quick Search", better than fdisk), gnome-disks
  3. norton ghost for dos -> "fsarchiver savefs" "fsarchiver restfs", remastersys
  4. windows xp -> debian+de(lxde, xfce), kali, ubuntu
  5. ntldr boot.ini -> grub menu.lst, boot-repair
  6. RemapKey/KeyTweak -> xmodmap -pke > ~/.Xmodmap then modify it, it will be loaded automatically
  7. myboard.exe -> myboard.py + modified xorg-server + modified libgtk2.0-0 + fcitx-googlepinyin
  8. MagicMover(D:\Program Files) -> remastersys restored sda1 + UnionFS-FUSE(pivot_root) sda2
  9. WinHex -> wxHexEditor, bless, (sublime hexviewer only can edit one line)
  10. emEditor(PHP/C braces outline, csv editor) -> sublime(ctrl+r to list functions, addon packages: AlignTab,SublimeCodeIntel,Codecs,ConvertToUTF8), SciTE(to view log files)
@wen-long
wen-long / ss-redir 透明代理.md
Last active March 18, 2024 12:13
ss-redir 透明代理.md

##ss-redir 的 iptables 配置(透明代理)

透明代理指对客户端透明,客户端不需要进行任何设置就使用了网管设置的代理规则

创建 /etc/ss-redir.json 本地监听 7777 运行ss-redir -v -c /etc/ss-redir.json

iptables -t nat -N SHADOWSOCKS
# 在 nat 表中创建新链
iptables -t nat -A SHADOWSOCKS -p tcp --dport 23596 -j RETURN
# 23596 是 ss 代理服务器的端口,即远程 shadowsocks 服务器提供服务的端口,如果你有多个 ip 可用,但端口一致,就设置这个
@DSIW
DSIW / star_bookmarked_github_repositories.rb
Last active March 13, 2017 05:20
Starres all bookmarked repositories
#!/usr/bin/env ruby
# encoding: utf-8
# Usage:
# Export your bookmarks to HTML and then run
# GITHUB_USERNAME=username GITHUB_PASSWORD=password ./star_github_repositories.rb bookmarks.html
require "octokit"
class HTMLBookmarkFile < Struct.new(:path)
@guweigang
guweigang / git_toturial
Last active April 14, 2025 01:43
git命令大全
git init # 初始化本地git仓库(创建新仓库)
git config --global user.name "xxx" # 配置用户名
git config --global user.email "[email protected]" # 配置邮件
git config --global color.ui true # git status等命令自动着色
git config --global color.status auto
git config --global color.diff auto
git config --global color.branch auto
git config --global color.interactive auto
git config --global --unset http.proxy # remove proxy configuration on git
git clone git+ssh://[email protected]/VT.git # clone远程仓库
@amotmot
amotmot / WAHH_Task_Checklist.md
Created April 16, 2014 21:30
The Web Application Hacker's Handbook - Task Checklist - Github-Flavored Markdown