How Vim Can Make a Hacker’s Life Easier with Macros and Registers
How Vim Can Make a Hacker’s Life Easier with Macros and Registers
Why Every Hacker Should Master Vim Macros and Registers
If you’re deep into hacking, pentesting, or security research, you know that automation is key. Repetitive tasks like manipulating payloads, encoding/decoding strings, or tweaking shell scripts can become tedious. Enter Vim macros and registers! These powerful features let you record and replay keystrokes, making your workflow insanely efficient.
No that I dont use IDE’s the likes of Visual Studio code (sometimes I do). However they can never match the raw power of vi/vim/nvim or any of the vim family of editors. To reap the maximum benefit, you have to learn the basics of using the editor in normal mode ( which is by the not the editing mode).
Continue readingSend history of current host to some other host over ssh
Sometimes I want to save the history of current host on another host. This is to ensure that I can use copy/paste on other host to run the commands. To this, I found a simple solution –
history| ssh <user>@<host> 'cat - > /tmp/history'
And on the new host, you can find the history in file “/tmp/history”, cool :). Now I can quick edit this file to create this as shell script as well if required. How cool is that.
Continue readingsend mail using telnet from script
If you have no other option but to use telnet with authentication to send mail 🙂
( echo "ehlo" sleep 1 auth login sleep 1 $(echo username |base64) sleep 1 $(echo password |base64) sleep 1 mail from: from-address sleep 1 rcpt to: recepient sleep 1 data sleep 1 subject: test test mail . exit ) |telnet server port
ansible with docker dynamic inventory
So, I have a few dockers. Every now and then I want to run some command on all of them. Doing ‘docker exec’ is tiresome. I found this neat solution with ansible that I thought I should share with you.
To get started, you need to have the “docker.py” script. This script will be used as python script inventory for ansible. So, use the following command and get the script:
Continue readingExecuting commands on multiple hosts
If you have to execute the same command in multiple hosts, then you can use mussh:
- Description : Mussh is a shell script that allows you to execute a command or script
- over ssh on multiple hosts with one command. When possible mussh will use
- ssh-agent and RSA/DSA keys to minimize the need to enter your password
- more than once.
First install mussh with the following command
dnf install mussh
Now to run this for multiple hosts, you can run like this
Continue readingscript to get hard disk health in fedora/ubuntu
First, put this in a script.
|
|
and then put this in cron:
Continue reading