Skip to content

Instantly share code, notes, and snippets.

@jezman
jezman / handler.go
Created February 28, 2018 09:27
template
package main
import (
"log"
"net/http"
"os"
)
var (
err error
@jezman
jezman / dhcp-fill.rb
Created February 13, 2018 14:21
Fill DHCP table.
#!/usr/bin/env ruby
# Fill DHCP table.
require 'optparse'
options = {}
OptionParser.new do |opt|
opt.banner = 'Usage: ruby dhcpfill.rb [options]'
opt.on('-i', '--interface NAME', 'Network interface name') { |interface| options[:interface]=interface }
@jezman
jezman / brutedir.rb
Created February 13, 2018 14:18
Brute forcing directories.
#!/usr/bin/ruby
require 'find'
require 'optparse'
options = {brute: nil, scan: nil, users: nil, dir_wl: 'wordlist.txt', log: nil, verbose: true}
def chech_exist(o, file, opts)
if File.exist?(file)
o = file
@jezman
jezman / deploy
Created June 1, 2017 14:44
Generate multiple ssh keys from '.ssh/config' and copy to servers.
# Example ~/.ssh/config
#
#Host node01
# HostName 192.168.0.1
# Port 22
# User root
# PreferredAuthentications publickey
# IdentitiesOnly yes
# IdentityFile ~/.ssh/node01.pub
#
#!/bin/bash
# Generate ssh key and deploy to server
# keyName=$1
# server=$2
# Example: ./gendep.sh rsaNode01 'user@192.168.0.1 -p2222'
ssh-keygen -t rsa -q -N '' -C $1 -f ~/.ssh/$1
ssh-copy-id -i ~/.ssh/$1 $2
#!/bin/bash
# Official Wiki
# https://wiki.debian.org/InstallingDebianOn/Thinkpad/X250/Jessie
# Wifi
echo deb http://httpredir.debian.org/debian/ jessie main contrib non-free >> /etc/apt/sources.list
# Indel HD Graphic
echo deb http://http.debian.net/debian jessie-backports main > /etc/apt/sources.list.d/jessie-backports.list
systemctl enable dhcpcd
systemctl start dhcpd
pacman -S sudo git wget nmap zsh net-tools gpm \
ttf-dejavu ttf-inconsolata \
lxappearance
# xorg
sudo pacman -S xorg-server xorg-xinit xorg-server-utils mesa xterm
# Intel video driver
@jezman
jezman / arch-linux-install
Last active April 10, 2017 10:03 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Create partitions
@jezman
jezman / sendMessage.go
Created March 14, 2017 10:48
Send message to telegram chat.
package main
import (
"fmt"
"net/http"
"os"
"strings"
)
const (
@jezman
jezman / geo_ip.py
Created February 7, 2017 07:36
GeoIP DB by Pentestit
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from requests import get
from sys import argv
ip = argv[1]
r = get('https://ip.pentestit.ru/json.php?ip=' + ip)
data = r.json()