Skip to content

Instantly share code, notes, and snippets.

View KINGSABRI's full-sized avatar
♠️

KING SABRI KINGSABRI

♠️
View GitHub Profile
@KINGSABRI
KINGSABRI / RubyNmap.rb
Created December 17, 2017 21:14
RubyNmap
#!/usr/bin/env ruby
# list databases on MySQL servers. Must have login credential
Nmap::Program.scan do |task|
task.ports = 443
task.script = 'smb-security-mode'
# check the script params
# https://nmap.org/nsedoc/scripts/smb-security-mode.html
# https://nmap.org/nsedoc/lib/smb.html#script-args
# https://nmap.org/nsedoc/lib/smbauth.html#script-args
@KINGSABRI
KINGSABRI / sqlmap-tamper.py
Created December 3, 2017 22:00
How to create SQLmap tamper
#!/usr/bin/env python
"""
KING SABRI | @KINGSABRI
An example of sqlmap tamper script to inject the payload in query
"""
from lib.core.data import kb
from lib.core.enums import PRIORITY
import string
import re
@KINGSABRI
KINGSABRI / ruby-twitter.rb
Last active November 26, 2017 21:27
twitter snaps
# Onliner Web Proxy Server in Ruby
ruby -r webrick/httpproxy -e 's = WEBrick::HTTPProxyServer.new(:Port => 8080, :RequestCallback => Proc.new {|req,res| puts req.request_line, req.raw_header}); trap("INT"){s.shutdown}; s.start'
@KINGSABRI
KINGSABRI / dummy-sw.xml
Created August 7, 2017 22:58
Nipper XML and HTML report
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="utf-8"?>
<document nipperstudio="2.5.5.5804" xmlversion="2" xmlrevision="3">
<information>
<title>Audit Report</title>
<author>Nipper Studio</author>
<date>Tuesday, August 8, 2017</date>
<generator>
<product>Nipper Studio</product>
<manufacturer>Titania</manufacturer>
<website>www.titania.com</website>
@KINGSABRI
KINGSABRI / USBArmoryHowTo.md
Last active June 24, 2017 22:15
USB Armory How to tutorial

Installing Image

wget -c wget -c https://github.com/inversepath/usbarmory-debian-base_image/releases/download/20170518/usbarmory-debian_jessie-base_image-20170518.raw.zip
fdisk -l

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@KINGSABRI
KINGSABRI / Powerline-shell-install-ubuntu.md
Last active September 26, 2021 23:16
Install Powerline-Shell on Ubuntu

Environment

  • Kubuntu 16.04.2 TLS
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.2 LTS
Release:        16.04
Codename:       xenial
  • Shell environment: Bash
  • Terminal application : Konsole
@KINGSABRI
KINGSABRI / zero-out.rb
Last active August 9, 2017 20:05
Script to inverse a given printable string to zeroing out registers (Buffer Overflow).
#!/usr/bin/env ruby
#
# KING SABRI | @KINGSABRI
# script to inverse a given printable string to zeroing out registers (Useful in Buffer Overflow).
#
class String
# inverse inverse a given printable string to zeroing out registers
# (Useful in Buffer Overflow).
@KINGSABRI
KINGSABRI / gist:fdf0132b0dfb69bc78948c7efc85e886
Created February 14, 2017 11:35 — forked from sonots/gist:8923003
how to use net/http in muliti threads
require 'net/http'
require 'uri'
host = "localhost"
port = 5125
path = "/api/hoge/hoge/hoge"
body = URI.encode_www_form({'number'=>0, 'mode'=>'gauge'})
# 1)
@client = Net::HTTP.new(host, port)
# @client.set_debug_output(STDOUT)
#!/usr/bin/env ruby
require 'rexec'
CLIENT = <<EOF
$connection.run do |path|
listing = []
IO.popen("ls -la " + path.dump, "r+") do |ls|