Table of contents

Context

I was using Obsidian for a while at first during my first year of university, but I stopped using it, then when I started studying Offensive Security I wanted to have a more systematic note taking methodology, so I went back to it.

The Setup

I have a vault on my local machine, and I use Obsidian Live Sync, to sync it to my homelab, so I can access it from anywhere and have a backup of my notes.

Automatization & Dynamic Variables

My vault contains a lot of commands and snippets that I want to be able to run from the terminal, but they are not really executable as is, I usually need to modify them. For example for an nmap scan I might have a snippet like this:

nmap -sC -sV -oA target.com

But I don’t want to copy paste it and modify it every time. So I loaded a Plugin called Live Variables. I have multiple variables stored in a single Mardown file like LOCAL_IP, REMOTE_IP, LOCAL_PORT, REMOTE_PORT, etc. Then I can reference these variables in my snippets like this:

nmap -sC -sV -oA {{REMOTE_IP}} -p {{REMOTE_PORT}}

Then I have a script that transforms these snippets so that they can be displayed “normally” in the editing mode, given the Obsidian limitations.

Configuration

Conclusion

Obsidian is a powerful tool for note taking and organizing knowledge, and with the right plugins you can greatly enhance your workflow and productivity. I can just copy/paste snippets from my notes and have them automatically updated with the right variables, which is a huge time saver.