Skip to content

Instantly share code, notes, and snippets.

@manasmbellani
manasmbellani / pdf_to_text.py
Last active July 6, 2021 07:50
pdf_to_text.py - Converts pdf to text via pdftotext library in python and prints out the output. See for more details: https://github.com/jalan/pdftotext
import argparse
import sys
import pdftotext
def main():
parser = argparse.ArgumentParser("Converts PDF to text")
parser.add_argument("-f", "--file", required=True, help="File path")
parser.add_argument("-p", "--password", default='', help="Password for pdf")
args = parser.parse_args()
@manasmbellani
manasmbellani / get_favicon_hash.py
Created June 29, 2021 15:30
get_favicon_hash.py - Get Favicon hash from website
#!/usr/bin/python3
import mmh3
import requests
import codecs
import argparse
parser = argparse.ArgumentParser(description='Calculate the favicon hash from a domain')
parser.add_argument('-d', '--domain', required=True, help='Path under which favicon.ico sits e.g. www.google.com OR www.google.com/path/to/favicon')
parser.add_argument('-p', '--protocol', default='https', help='HTTP Protocol')
@manasmbellani
manasmbellani / !sysmon-scripts
Last active August 8, 2021 14:24
sysmon-scripts - Windows batch scripts for enable sysmon logging
This folder contains Windows batch scripts for enable sysmon logging.
These scripts should be run as Admin user.
To clone these scripts, run the command:
git clone https://gist.github.com/manasmbellani/57b5090f471e22c4276efffb169fb1c5 sysmon-scripts
@manasmbellani
manasmbellani / invoke_kiterunner.sh
Last active May 7, 2021 12:32
invoke_kiterunner.sh - Run kiterunner from Assetnote with large wordlists
#!/bin/bash
# Directory where the kiterunner wordlist files should be written
WORDLISTS_DIR="/opt/wordlists"
KITERUNNER_PATH="/opt/kiterunner/kiterunner"
KITERUNNER_WORDLIST_ZIP="routes-large.kite.tar.gz"
KITERUNNER_WORDLIST="$WORDLISTS_DIR/routes-large.kite"
USAGE="
[-] <...hosts...> | $0 run
@manasmbellani
manasmbellani / invoke_vncserver.sh
Last active April 19, 2021 08:18
Start the Tight VNC server
#!/bin/bash
/usr/bin/vncserver :0 -geometry 1280x800 -depth 16 -pixelformat rgb565
@manasmbellani
manasmbellani / set_vnc_user_pass.sh
Last active April 19, 2021 06:13
set_vnc_user_pass.sh - Used to set the password for vnc server. Taken from: https://askubuntu.com/a/848821
#!/bin/sh
if [ $# -lt 1 ]; then
echo "[-] $0 <mypass>"
exit 1
fi
mypass="$1"
/usr/bin/expect <<EOF
spawn /usr/bin/vncpasswd
@manasmbellani
manasmbellani / gogreetings.go
Last active March 9, 2021 10:53
Golang script to print greetings as an example for simple goroutines pattern
// Golang script to print greetings for users supplied as input as an example for
// simple goroutines pattern
//
// Example usage:
// --------------
// $ cat /tmp/test.txt
// Jim
// Jordan
//
// # Simple Example
root
bin
daemon
adm
lp
sync
shutdown
halt
mail
uucp
@manasmbellani
manasmbellani / vimrc
Last active March 26, 2020 02:59
.vimrc file: My .vimrc file
"------------------------------------------------------------
" URL: http://vim.wikia.com/wiki/Example_vimrc
" Authors: http://vim.wikia.com/wiki/Vim_on_Freenode
" Description: A minimal, but feature rich, example .vimrc. If you are a
" newbie, basing your first .vimrc on this file is a good choice.
" If you're a more advanced user, building your own .vimrc based
" on this file is still a good idea.
"------------------------------------------------------------
" Features {{{1
"
@manasmbellani
manasmbellani / test.bat
Created October 30, 2019 01:43
Test File
cmd