Skip to content

Instantly share code, notes, and snippets.

View DanijelMi's full-sized avatar
:octocat:

Danijel Milosevic DanijelMi

:octocat:
  • Vroom
  • Serbia, Belgrade
View GitHub Profile
@DanijelMi
DanijelMi / nmap2csv
Last active March 23, 2020 13:41
Pipe in nmap stdout, output CSV format of ports suitable for Nessus. Install for bash: curl https://gist.githubusercontent.com/DanijelMi/d019b5aff111908e5f3177c10857228b/raw/347f5e41b7ce03567ac6245e1dee92214ab86dff/nmap2csv >> ~/.bashrc && source ~/.bashrc
# Usage: nmap {OPTIONS} {TARGET_IP} | nmap2csv
nmap2csv (){
# License: GPLv2
# Author: Danijel M.
# Brief help prompt
if [[ $1 == "-h" || $1 == "--help" ]]; then
printf "\e[32;1m Usage: nmap {OPTIONS} {TARGET_IP} | nmap2csv\e[0m \n"
return 0
fi
@DanijelMi
DanijelMi / rsync_backup.sh
Last active May 22, 2019 21:49
A cron-managed script used for performing incremental backups.
#!/usr/bin/env bash
# Author: Danijel Milosevic
# No warranty, use at your own risk.
# How many snapshots to keep before starting to delete the old ones
SNAPSHOT_COUNT=15
# A list of absolute paths to backup.
INCLUDE_PATHS=("$HOME/Desktop/RSYNC/F1/")
# Overwrite if an arg was given
[ -z "$1" ] || INCLUDE_PATHS=$1