Skip to content

Instantly share code, notes, and snippets.

View fnzv's full-sized avatar
🌐

Sami fnzv

🌐
View GitHub Profile
@fnzv
fnzv / install-esdump.sh
Created April 3, 2018 13:51
Install ElasticDump on Ubuntu 16
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
ln -s /usr/bin/nodejs /usr/bin/node
npm install elasticdump -g
elasticdump --help
@fnzv
fnzv / openvas-setup.sh
Created April 3, 2018 19:37
Edited Openvas Setup to automatically configure openvas with no user interaction
#!/bin/sh
# Author: Scott R. Shinn <[email protected]>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2,
# or at your option any later version, as published by the
# Free Software Foundation
#
# This program is distributed in the hope that it will be useful,
@fnzv
fnzv / atomic-installer.sh
Created April 3, 2018 20:03
openvas atomic installer automated
#!/bin/bash
# Name: Atomic Archive configuration script
# Copyright Atomicorp, 2002-2016
# License: AGPL
# Credits
# Scott R. Shinn (atomicorp)
# Andy Gredler (rackspace)
export LANG=C
ATOMIC_VER="3.2.1"
@fnzv
fnzv / ulimit_increase.sh
Created April 7, 2018 10:51
Automatically increase ulimit to 100k on Ubuntu 16
sudo echo 'fs.file-max = 100000' >> /etc/sysctl.conf
sudo sysctl -p
echo '* soft nproc 100000
* hard nproc 100000
* soft nofile 100000
* hard nofile 100000
root soft nproc 100000
@fnzv
fnzv / Commands
Created April 28, 2018 14:48
Generic systemd unit for simple service
systemctl daemon-reload
systemctl enable generic.service
systemctl start generic.service
@fnzv
fnzv / wp_masscan.sh
Created May 3, 2018 09:52
Massive scan of WP site list and save logs divided per site
#!/bin/bash
# Massive scan of WP site list and save logs divided per site
cat site_list | xargs -L1 -I {} sh -c "ruby wpscan.rb -u {} vp --batch --follow-redirection >> {}-wpscan.txt"
@fnzv
fnzv / gist:f375fe897ec935b1f3dd284edb6d7c85
Last active May 9, 2018 19:21 — forked from jmn/gist:4de857259b1dfc54ab80b5682af935ad
Building h2load (of nghttp2) on Ubuntu 16.04
#! /bin/bash
# https://nghttp2.org/documentation/h2load-howto.html
sudo apt-get update
sudo apt-get install -y g++ make binutils autoconf automake autotools-dev libtool pkg-config zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libev-dev libevent-dev libjansson-dev libc-ares-dev libjemalloc-dev cython python3-dev python-setuptools libjemalloc-dev libspdylay-dev
git clone https://github.com/nghttp2/nghttp2.git && cd nghttp2 && autoreconf -i && automake && autoconf && ./configure --enable-app && make && make install
./src/h2load --help
@fnzv
fnzv / show-esta-conns.sh
Last active May 12, 2018 16:26
Show current network connections
echo "Total Established Conns:"
netstat -peanut | grep ESTA | wc -l
echo "Interface stats:"
ifconfig | grep RX
@fnzv
fnzv / yt-dl
Created May 13, 2018 21:42
youtube-dl alias
alias yt-dl='youtube-dl --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s"'
@fnzv
fnzv / auditd-monitor.sh
Created May 15, 2018 07:50
Monitoring file changes with auditd
apt-get install auditd
auditctl -w <path to the file you need to monitor> -p war -k test
# Compare file changes
ausearch -ts today -k test