masking out key,token,secret when reading a file to stdout - could be used as an alias to used for demo/presenting.
gsed -r -e "s/((key|token|secret)[^(:|=)]*(=|:)[\t| ]+?['|\"]?+)[^('|\"|$)]*('|\"|$)/\1xxxxxxxxxxx\4/g" ~/.aws/credentials
## This used to be the way I deploy ... | |
## aws --profile=san-study s3 cp ./public/ s3://jeremyandjames/ --recursive | |
## Now I use this simple script to increamentally update a hugo site on s3 bucket. It is a whole lot faster and take less bandwidth ;) | |
## Note that the change base on size of the file, not hash because it's quicker to just get the size :p | |
## Uncomment aws copy and remove command to start using it ;) | |
#!/bin/bash | |
set -e | |
function finish { |
#!/bin/bash | |
### Requirements: | |
### zbarimg, xclip, zenity, xvkbd | |
### pip: segno | |
set -e | |
## Require: xclip, zbarimg, zenity | |
function pbcopy { | |
xclip -selection clipboard $1 | |
} |
#!/bin/bash | |
## pchrome.sh is a snippet to create various pentest profiles base on 1 single chrome profile. | |
## The new profiles will have the same Extension, extension setting as the base profile | |
# Bail if there is an error | |
set -e | |
# Uncomment line below if you want to see the command being run | |
# set -x |
/** | |
* Sample plugin. | |
*/ | |
Draw.loadPlugin(function(ui) { | |
/** | |
* Overrides SVG export to add metadata for each cell. | |
*/ | |
var graphCreateSvgImageExport = Graph.prototype.createSvgImageExport; | |
[^\\]\"> ?<[Ss]+[0-9]+> 0 Web Medium Certain | |
[^\\]"> ?<[Ss]+[0-9]+> 0 Web Medium Certain |
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "CTF check", | |
"Resources": { | |
"sg": { | |
"Type": "AWS::EC2::SecurityGroup", | |
"Properties": { | |
"GroupDescription": "SSH Security Group", | |
"SecurityGroupIngress": { | |
"CidrIp": "0.0.0.0/0", |
// Example of vulnerable code. | |
const express = require('express'); | |
const router = express.Router(); | |
const { | |
exec | |
} = require('child_process') | |
const fs = require('fs') | |
const uniqid = require('uniqid') | |
const streamifier = require('streamifier'); | |
var magic = require('stream-mmmagic'); |
#!/usr/bin/env python | |
""" | |
Very simple HTTP server in python to answer challenge request from slack server when create an event subscription | |
Usage:: | |
./dummy-web-server.py [<port>] | |
Send a GET request:: | |
curl http://localhost | |
Send a HEAD request:: | |
curl -I http://localhost | |
Send a POST request:: |
package main | |
import ( | |
"context" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"strings" | |
"time" |