Skip to content

Instantly share code, notes, and snippets.

@toripiyo
toripiyo / fabric.md
Last active August 29, 2015 14:15
vagrant and ansible tutorial

fabric tutorial

what is fabric

Fabric = Shell Script + Python + Useful Methods

install fabric

pip install fabric
fabric -V
@toripiyo
toripiyo / .tmux.conf
Last active February 10, 2017 13:33
my tmux.conf configuraiton
# decrease key stroke delay
set -sg escape-time 1
# enable mouse operation
set-option -g mouse on
# fix window name
set-option -g allow-rename off
###############
@toripiyo
toripiyo / sshrc
Created June 3, 2017 08:40
sshrc file for ssh notification to slack
#!/bin/bash
# [description]
# This script will be executed when someone login with ssh daemon
# [how to use]
# 1. put this file as a /etc/ssh/sshrc
# 2. change file permission with "chmod 755 /etc/ssh/sshrc"
# Send Slack's alerts room
@toripiyo
toripiyo / country_iptables.sh
Last active May 25, 2021 10:13
block ip address by country unit
#! /bin/bash
# set conf file path
IPTABLES_CONF='/etc/iptables/rules.v4'
# temporary iptables config file
IPTABLES_CONFIG_TMP=`mktemp`
# default rule
echo "*filter" >> $IPTABLES_CONFIG_TMP
@toripiyo
toripiyo / Vagrantfile
Last active November 17, 2020 22:28
OWASP Mutillidae II vagrant environment
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
#! /bin/bash
# set variables
_HASHFILE='/home/pi/script/apache_error_log_check/hash'
_OUTPUTFILE='/home/pi/script/apache_error_log_check/output.txt'
# OLD HASH
if test -f ${_HASHFILE}; then
_OLD_HASH=$(cat ${_HASHFILE})
else
@toripiyo
toripiyo / burp_additonal_request_header_extension.py
Created March 25, 2018 01:50
This script adds additional header on request header only if spcific host request is issued
from burp import IBurpExtender
from burp import IHttpListener
class BurpExtender(IBurpExtender, IHttpListener):
def registerExtenderCallbacks(self, callbacks):
self._callbacks = callbacks
self._helpers = callbacks.getHelpers()
callbacks.setExtensionName("Homemade Extension")
callbacks.registerHttpListener(self)
return
@toripiyo
toripiyo / docker-compose.yml
Created August 24, 2018 07:40
docker-compose.yml for minio
version: '3.3'
services:
os:
image: "minio/minio"
ports:
- "9000:9000"
volumes:
- os:/data
command: server /data
environment:
from burp import IBurpExtender
from burp import IContextMenuFactory
from burp import IHttpRequestResponse
from burp import IMessageEditorController
from burp import IHttpListener
from javax.swing import JMenuItem
from java.io import PrintWriter
from java.lang import RuntimeException
from java.net import URL
import string
@toripiyo
toripiyo / .dockerignore
Last active September 16, 2018 05:17
create nodejs application development environment with docker
app
logs/*.log*
node_modules