Skip to content

Instantly share code, notes, and snippets.

View draft04's full-sized avatar

draft04 draft04

  • Bogota, Colombia
View GitHub Profile
@draft04
draft04 / find-unused-amis
Created March 22, 2024 16:00 — forked from amosshapira/find-unused-amis
Find self-owned AMI's which are not used by any instances or launch configurations in a region
#!/bin/bash
# Find self-owned AMI's which are not used by any instances or launch configurations in the default region.
comm -23 \
<(aws ec2 describe-images --owner self --query 'Images[].[ImageId]' --output text | sort) \
<((aws ec2 describe-instances --query 'Reservations[].Instances[].[ImageId]' --output text;
aws autoscaling describe-launch-configurations --query 'LaunchConfigurations[].[ImageId]' --output text) | sort -u)
@draft04
draft04 / unix-aws-ses-testmail.txt
Created November 22, 2023 22:30 — forked from oliveratgithub/unix-aws-ses-testmail.txt
SMTP test email using AWS Simple Email Service (SES) on UNIX openssl s_client or Windows PowerShell
# Source: https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-smtp-client-command-line.html
# X-SES-CONFIGURATION-SET is optional
EHLO yourdomain.com
AUTH LOGIN
base64 encoded Smtp Username
base64 encoded Smtp Password
MAIL FROM: from@yourdomain.com
RCPT TO: email@anydomain.com
DATA
#X-SES-CONFIGURATION-SET: YourSESConfigSet
@draft04
draft04 / office2016_activation.bat
Created October 7, 2021 03:05 — forked from Kibur/office2016_activation.bat
Microsoft Office 2016 activation script for all versions
@echo off
title Activate Microsoft Office 2016 ALL versions for FREE!&cls&echo ============================================================================&echo #Project: Activating Microsoft software products for FREE without software&echo ============================================================================&echo.&echo #Supported products:&echo - Microsoft Office Standard 2016&echo - Microsoft Office Professional Plus 2016&echo.&echo.&(if exist "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles%\Microsoft Office\Office16")&(if exist "%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles(x86)%\Microsoft Office\Office16")&(for /f %%x in ('dir /b ..\root\Licenses16\proplusvl_kms*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul)&(for /f %%x in ('dir /b ..\root\Licenses16\proplusvl_mak*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul)&echo.&echo ============================================================================&ech
@draft04
draft04 / fortinet_victim_list_2021.txt
Created September 11, 2021 03:27 — forked from crypto-cypher/fortinet_victim_list_2021.txt
Fortinet Victim List - "Hackers leak passwords for 500,000 Fortinet VPN accounts" #TrackThePlanet
This file has been truncated, but you can view the full file.
##### COURTESY
# @CuratedIntel
# https://curatedintel.org
##### BACKGROUND
# Initally shared on RAMP ransomware forum
# Last shared on Groove ransomware extortion website
# Publicized by Bleeping Computer, which led to this post being issued to help blue teamers
# https://www.bleepingcomputer.com/news/security/hackers-leak-passwords-for-500-000-fortinet-vpn-accounts/
@draft04
draft04 / .vim-after-syntax-php.vim
Created March 6, 2021 11:48 — forked from stronk7/.vim-after-syntax-php.vim
My IDE (vim) configuration as of 20200805, mainly for PHP (autocompletion, jump to definition, quick search, LSP integration, Vundle packages, Dash, Spelling on comments, git support... and other personal tricks/niceties). Note that "-" in the file names means "/" (dirs)
" Override the default @Spell on strings via after syntax.
" The lines are 100% the original ones, just changing @Spell by @NoSpell
" Maybe this can be done simpler, but it's easier to just keep a copy
" of the original php.vim code and perform the replacement to @NoSpell.
if (exists("php_parent_error_open") && php_parent_error_open)
syn region phpStringDouble matchgroup=phpStringDelimiter start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@NoSpell,@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex,phpStrEsc contained keepend
syn region phpBacktick matchgroup=phpStringDelimiter start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@NoSpell,@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex,phpStrEsc contained keepend
syn region phpStringSingle matchgroup=phpStringDelimiter start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@NoSpell,@phpAddStrings,phpStrEsc contained keepend
else
syn region phpStringDouble matchgroup=phpStringDelimiter start=+"+ skip=+\\\\