Skip to content

Instantly share code, notes, and snippets.

View noraj's full-sized avatar
💎
FLOSSing

Alexandre ZANNI noraj

💎
FLOSSing
View GitHub Profile
@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:
@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]
@noraj
noraj / pretty-csv.rb
Last active June 9, 2021 19:28
List installed BA pentest tools + description
#!/usr/bin/env ruby
require 'csv'
installed_tools = %x(pacman -Sl blackarch).split("\n").grep(/\[installed\]/)
tools_list = []
installed_tools.each do |line|
_repo, tool, _version, _status = line.split(' ', 4)
description = %x(pacman -Qs #{tool}).split("\n")[1].strip
@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 #
@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)

How to use Bundler and RubyGems on WebAssembly

# Download prebuilt ruby
curl -LO https://github.com/ruby/ruby.wasm/releases/download/2022-08-09-a/ruby-head-wasm32-unknown-wasi-full.tar.gz
tar xfz ruby-head-wasm32-unknown-wasi-full.tar.gz

# Install the same version of native ruby to avoid bundler version mismatch in "BUNDLED WITH" of Gemfile.lock
rbenv install 3.2.0-dev
rbenv local 3.2.0-dev
@teeparham
teeparham / rdoc2md.rb
Last active November 7, 2023 00:47
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
@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
@XVilka
XVilka / BiDiSupport.md
Last active February 1, 2024 14:53
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
@brasey
brasey / Configure systemd-resolved to use a specific DNS nameserver for a given domain.md
Created October 25, 2019 14:38
Configure systemd-resolved to use a specific DNS nameserver for a given domain

Configure systemd-resolved to use a specific DNS nameserver for a given domain

Use case

Given

  • I use a VPN to connect to my work network
  • I'm on a Linux computer that uses systemd-resolved
  • I have a work domain called example.com
  • example.com is hosted by both public and private DNS nameservers