Skip to content

Instantly share code, notes, and snippets.

@kostyll
kostyll / usefull_linux_cli_tools
Last active December 27, 2016 10:10
usefull_linux_cli_tools pactl
pactl set-sink-volume $SINK $VOLUME - volume value setting
@kostyll
kostyll / MininetCustomNetwork_POX_RemoteController
Last active December 27, 2016 10:09
MininetCustomNetwork_POX_RemoteController
#!/usr/bin/python
"""
Works with RemoteController:
first install and run pox controller:
502 git clone http://github.com/noxrepo/pox
503 cd pox/
505 git checkout dart
511 ./pox.py log.level --DEBUG misc.of_tutorial
@kostyll
kostyll / mininet_with_nat.configure_wlan0_or_eth0_interface_in_CODE.py
Last active December 27, 2016 10:09
mininet_with_nat.configure_wlan0_or_eth0_interface_in_CODE.py
#!/usr/bin/python
"""
Example to create a Mininet topology and connect it to the internet via NAT
through eth0 on the host.
Glen Gibb, February 2011
(slight modifications by BL, 5/13)
"""
@kostyll
kostyll / mininet_linux_router_works_under_pox
Last active December 27, 2016 10:08
mininet_linux_router_works_under_pox
"""
Works with RemoteController:
first install and run pox controller:
502 git clone http://github.com/noxrepo/pox
503 cd pox/
505 git checkout dart
511 ./pox.py log.level --DEBUG misc.of_tutorial
@kostyll
kostyll / generate_certs.sh
Last active December 27, 2016 10:08
generate_certs.sh
#!/bin/bash
mkdir -p keys
openssl \
req -x509 -sha256 -nodes -days 365 \
-newkey rsa:2048 -keyout keys/server.key -out keys/server.crt
openssl \
req -new -x509 -keyout keys/server.pem \
-out keys/server.pem -days 365 -nodes
@kostyll
kostyll / debootstrap_stable
Last active December 27, 2016 10:07
debootstrap_stable
mkdir stable-chroot
apt-get install debootstrap
debootstrap stable stable-chroot http://httpredir.debian.org/debian/
sudo debootstrap stable stable-chroot http://httpredir.debian.org/debian/
debootstrap --arch i386 jessie debian_8_jessie.i386.original http://ftp.us.debian.org/debian
@kostyll
kostyll / metasploit_vds.md
Last active December 27, 2016 10:07
metasploit_vds.md

debootstrap --arch i386 jessie debian_8_jessie.i386.original http://ftp.us.debian.org/debian

cp -rf debian_8_jessie.i386.original debian_8_jessie.i386.metasploit

cat << EOF >> /root/start_metaploitenv.sh #!/bin/bash export MSFROOT=/root/debian_8_jessie.i386.metasploit mount -o bind /dev/ $MSFROOT/dev mount -t proc proc $MSFROOT/proc chroot $MSFROOT

@kostyll
kostyll / autogen.sh
Last active December 27, 2016 10:07
autogen.sh
#!/bin/sh -x
rm -fv ltmain.sh config.sub config.guess config.h.in
mkdir -p m4
aclocal -I m4
autoheader
libtoolize --automake --copy
automake --add-missing --copy --force
autoreconf
chmod 755 configure
@kostyll
kostyll / _service.md
Created November 17, 2016 14:45 — forked from naholyr/_service.md
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
@kostyll
kostyll / bottle_example.py
Created November 9, 2016 15:00 — forked from Arthraim/bottle_example.py
a python web framework bottle's example
#coding: utf-8
from bottle import route, error, post, get, run, static_file, abort, redirect, response, request, template
@route('/')
@route('/index.html')
def index():
return '<a href="/hello">Go to Hello World page</a>'
@route('/hello')
def hello():