Skip to content

Instantly share code, notes, and snippets.

View anibalardid's full-sized avatar
🏠
Working from home

Anibal anibalardid

🏠
Working from home
View GitHub Profile
@anibalardid
anibalardid / extractPorts.sh
Created May 18, 2021 01:02
Extract ports from nmap output #hack #security #s4vitar
# Used:
# nmap -p- --open -T5 -v -n ip -oG allPorts
# Extract nmap information
# Run as:
# extractPorts allPorts
function extractPorts(){
ports="$(cat $1 | grep -oP '\d{1,5}/open' | awk '{print $1}' FS='/' | xargs | tr ' ' ',')"
ip_address="$(cat $1 | grep -oP '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}' | sort -u | head -n 1)"
echo -e "\n[*] Extracting information...\n" > extractPorts.tmp
@anibalardid
anibalardid / mkt.sh
Last active August 20, 2023 19:35
mkt, create working directories #hack #security #s4vitar
# create enum directories
function mkt(){
mkdir {nmap,content,exploits,scripts}
}
@anibalardid
anibalardid / disable-calendar-evolution-notifications.txt
Created May 28, 2020 13:29
disable evolution gnome notifications (display duplicate in calendar notifications)
In the file /etc/xdg/autostart/org.gnome.Evolution-alarm-notify.desktop I changed the line
OnlyShowIn=GNOME;Unity;XFCE;Dawati;MATE;
to
NotShowIn=GNOME;
@anibalardid
anibalardid / convert-image-img2iso.sh
Created April 9, 2020 17:38
convert image .img to .iso
sudo apt-get install ccd2iso
ccd2iso file.img fil1.iso
#OR
sudo apt install iat
iat file.img file.iso

remove_old_kernels.sh

#!/bin/bash
# Run this script without any param for a dry run
# Run the script with root and with exec param for removing old kernels after checking
# the list printed in the dry run

uname -a
IN_USE=$(uname -a | awk '{ print $3 }')
@anibalardid
anibalardid / git-remove-unused-local-branches.md
Created July 7, 2022 12:26
Git Remove unused local branches

Prune local tracking branches that do not exist on remote anymore

git fetch -p ; git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -d
https://support.nordvpn.com/es/Preguntas-frecuentes/Tutoriales-de-configuraci%C3%B3n/1636892662/Instalar-y-utilizar-NordVPN-en-Debian-Ubuntu-Raspberry-Pi-Elementary-OS-y-Linux-Mint.htm
1. Descarga el cliente NordVPN Linux. Para ello, abre la terminal, escribe el siguiente comando y sigue las instrucciones que aparezcan en la pantalla:
sh <(curl -sSf https://downloads.nordcdn.com/apps/linux/install.sh)
sh <(curl -sSf https://downloads.nordcdn.com/apps/linux/install.sh) ejemplo de comando
Nota: Si no tienes un paquete curl, (en caso de que no haya funcionado el paso anterior), puedes utilizar el siguiente comando en su lugar:
sh <(wget -qO - https://downloads.nordcdn.com/apps/linux/install.sh)
@anibalardid
anibalardid / convert-heic-to-jpg.sh
Created June 23, 2022 17:33
Convert .heic to .jpg
https://linuxnightly.com/convert-heif-images-to-jpg-or-png-on-linux/
$ sudo apt install libheif-examples
$ find . -iname "*.heic" -exec heif-convert -q 100 {} {}.jpg \;
@anibalardid
anibalardid / fix-chrome-shortcuts-multimedia-sound-keys.txt
Created June 22, 2022 17:49
Chrome shortcuts media keys sound multimedia
chrome://flags/
Hardware Media Key Handling
in ENABLED