Skip to content

Instantly share code, notes, and snippets.

Avatar
♠️

KING SABRI KINGSABRI

♠️
View GitHub Profile
@KINGSABRI
KINGSABRI / httpd.rb
Created Sep 6, 2019
A simple HTTP Server in Ruby
View httpd.rb
#!/usr/bin/env ruby
#
# Author: Sabri (@KINGSABRI)
#
require 'webrick'
require 'webrick/https'
require 'optparse'
options = {
ip: '0.0.0.0',
@KINGSABRI
KINGSABRI / .powerline-shell.json
Created Mar 12, 2019
Powerline-shell Configuration file
View .powerline-shell.json
{
"segments": [
"virtual_env",
"username",
"ssh",
"cwd",
"git",
"hg",
"jobs",
"set_term_title",
@KINGSABRI
KINGSABRI / injector.cpp
Created Nov 18, 2018 — forked from Barakat/injector.cpp
Code injection using shared sections
View injector.cpp
#include <Windows.h>
#include <ntdef.h>
#include <cstdint>
#include <cassert>
#include <cstring>
#include <cstdio>
typedef enum
{
@KINGSABRI
KINGSABRI / tomcat-directory.list
Created Nov 7, 2018
Tomcat Dictionary list for Directory brute
View tomcat-directory.list
/admin
/admin-console
/docs/
/examples
/examples/jsp/index.html
/examples/jsp/snp/snoop.jsp
/examples/jsp/source.jsp
/examples/servlet/HelloWorldExample
/examples/servlet/SnoopServlet
/examples/servlet/TroubleShooter
@KINGSABRI
KINGSABRI / Disable-Windows10-autoupdate-and-security.ps1
Last active Oct 2, 2019
PowerShell Disable Windows10 Auto update and Security
View Disable-Windows10-autoupdate-and-security.ps1
Clear-Host
Write-Host "1 -> Never check for updates"
Write-Host "2 -> Disable Windiws Firewall"
Write-Host "3 -> Disable Windiws Defender"
Write-Host "Enter any character to exit"
Write-Host
switch(Read-Host "Choose Window Update Settings"){
View gist:cf45e054d91ff8821acd99561c42c9d2
#!/usr/bin/env crystal
#
# Author: KING SABRI | @KINGSABRI
# Description: Base64 encoding all characters in a given payload
# Requirements: None
#
require "json"
require "base64"
json = JSON.parse(ARGV[0])
View RubyNmap.rb
#!/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 Dec 3, 2017
How to create SQLmap tamper
View sqlmap-tamper.py
#!/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
View ruby-twitter.rb
# 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 Aug 7, 2017
Nipper XML and HTML report
View dummy-sw.xml
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>
You can’t perform that action at this time.