PoC||GTFO 0x18

Posted by Wxcafé on Mon 25 June 2018

So PoC||GTFO 0x18 was released in PDF today. Contrary to issue 0x17, and like all previous issues, I wasn’t able to get it in paper form, but I still got the PDF (and haven’t had time to read it yet!!). In a flagrant example of bikeshedding, I’ve used the opportunity to update my mirror to look nicer than an nginx file index.

This page is made by running the command on top:

echo "SHA256                                                           \
MD5                              File"; for f in *.pdf; do
echo $(sha256sum $f | cut -d ' ' -f 1) $(md5sum $f | cut -d ' ' -f 1) $f
done

which uses a very ugly hack to get titles on top of the columns, (but who cares really?) (I do, please tell me if you have something better), then pasting the whole thing in vim and using it’s :TOhtml tool to make an HTML page out of it. I then run a simple :%s/ command to turn the pdf names into links

:%s@\(pocorgtfo.*\)@<a href="https://wxcafe.net/pub/PoC||GTFO/\1">\1</a>@g

and add font-size: 16px to the style block because I’m starting to have trouble reading small text… and voilà! A perfect index.html file for my PoC||GTFO mirror.

Anyways, I have a 64-page zine to run and it looks really good… Seeya!

Update 2018-06-25T22:19+02:00 :

I have now automated this whole task. Here’s the script:

#!/bin/bash
echo '[wxcafe@yoshi] /srv/pub/mirror/PoC||GTFO $ echo "SHA256                                                           MD5                              File"; for f in *.pdf; do
echo $(sha256sum $f | cut -d ' ' -f 1) $(md5sum $f | cut -d ' ' -f 1) $f
done' > index

echo "SHA256                                                           MD5                              File" >> index
for f in *.pdf; do
    echo $(sha256sum $f | cut -d ' ' -f 1) $(md5sum $f | cut -d ' ' -f 1) $f >> index
done

vim -c 'set ft=sh' -c TOhtml -c "w index.html | qall!" index &> /dev/null
sed -i 's/\(pocorgtfo.*\)/<a href="https:\/\/wxcafe.net\/pub\/PoC||GTFO\/\1">\1<\/a>/g' index.html
sed -i 's/\(body {\)\(.*\)/\1font-size: 16px; \2/' index.html

Update 2018-06-26T00:42+02:00 :

I went too far…

(Link for those poor souls without js)