A lightweight Atom plugin for inserting interactive screenshots into Markdown files from Kali linux.
This plugin has been forked from https://github.com/cavaunpeu/markdown-insert-screenshot
This plugin uses the import command from ImageMagick to automatically insert a screenshot into a markdown file.
See the installation section below.
Since I modified this code for myself, I made some pretty opinionated choices for how it would work.
- Screenshots are placed in a folder called
screenshotsnext to the current file. - Names for screenshot files are sanitized so that only characters from
/a-zA-Z0-9\-_/are allowed. Any other character is replaced with a_. - Images are
.pngfiles, and an epoch timestamp is included in the filename.
Either:
- Right click where you want your screenshot to appear, and select
Take screenshot and save to relative destinationor - Place your cursor where you want the screenshot to appear and enter
alt-i
Your cursor should change and you can alt-tab to a different window, drag the cursor to grab a section of the screen and a file will be saved with a name like 1503643021492.png in the screenshots folder.
Then the following text will be inserted into your markdown .
Then hit enter so your markdown preview will update.
- Type a short description of the screenshot you want to capture, ie:
root shell of web server. - Highlight your description, Then either:
- right click and select
Take screenshot and save to relative destination. - Enter
alt-i
Your cursor should change and you can alt-tab to a different window, drag the cursor to grab a section of the screen and a file will be saved with a name like root_shell_of_web_server-1503676385263.png in the screenshots folder.
Then the following text will be inserted into your markdown 
Then hit enter so your markdown preview will update.
Note for OSCP Students: OSCP Documents say that the VMs provided do not need to be updated, and although they can be, such updates could introduce new bugs, etc. It is encouraged that you take a snapshot before installing Atom. I found the procedure below to work without updating any software, but that may not be the case in the future.
Atom is distributed as a 64 bit debian package on the Atom website, but that won't work inside the OSCP provided version of Kali linux. There is a PPA for 32-bit builds of Kali called webup8team/atom but that PPA is for Ubuntu, and Kali will throw an error if you try to add it.
- Go to https://launchpad.net/~webupd8team/+archive/ubuntu/atom/+packages and expand the atom version you would like to download.

- After clicking the triangle on the right, select the i386 version to download it.

- After downloading the
.debfile, install it with dpkg, which likely won't work and will show dependency problems.
dpkg -i atom_1.19.3-1~webupd8~0_i386.deb
- Resolve the dependency problems using apt-get and enter
Yto install additional packages.
apt-get update && apt-get install -f
Then proceed to installing the package.
- Make a directory for this package to live where you won't accidently delete it (like in downloads)
mkdir ~/support
- Enter the directory and clone this repository to it:
cd ~/supportgit clone https://github.com/amccormack/markdown-insert-screenshot.git
- Enter the repository to link and install dependencies.
cd markdown-insert-screenshotapm linkapm install
Now open or restart Atom and check to see that it works!