Skip to content

Instantly share code, notes, and snippets.

@nv1t
nv1t / sort.py
Created January 9, 2018 07:01
Sort Picture with OpenCV as Display (not automaticaly)
import numpy as np
import sys
import os
import cv2
import shutil
log = open('log.txt','a')
img = cv2.imread(sys.argv[1],1)
origimg = img
height, width, channels = img.shape
@nv1t
nv1t / check_einhornschoki.sh
Created November 9, 2016 04:49
Einhorn Schokolade Icinga Check
#!/bin/bash
URL="http://shop.ritter-sport.de/b2c/schokolade/social-media-limited-edition/einhorn.html"
SITE=$(curl -s "${URL}")
if echo "${SITE}" | grep "out-of-stock" > /dev/null 2> /dev/null; then
echo "OK: Sckokolade ist immer noch ausverkauft";
exit 0;
fi;
import sys
import time
import usb.core
import usb.util
class pyMouse(object):
def __init__(self,vendor,product):
self.device = usb.core.find(idVendor=vendor, idProduct=product)
if self.device is None:
raise Exception("Couldn't find device %sx%s" %(vendor,product))
#!/usr/env python
###############################################################################################################
## [Title]: linuxprivchecker.py -- a Linux Privilege Escalation Check Script
## [Author]: Mike Czumak (T_v3rn1x) -- @SecuritySift
##-------------------------------------------------------------------------------------------------------------
## [Details]:
## This script is intended to be executed locally on a Linux box to enumerate basic system info and
## search for common privilege escalation vectors such as world writable files, misconfigurations, clear-text
## passwords and applicable exploits.

Keybase proof

I hereby claim:

  • I am nv1t on github.
  • I am nv1t (https://keybase.io/nv1t) on keybase.
  • I have a public key whose fingerprint is 083F 9BF3 7C3B 3262 62AF 397D 09CF F87B 70EC 6E70

To claim this, I am signing this object:

@nv1t
nv1t / slideshare-download.sh
Last active September 10, 2015 01:20
slideshare-download.sh
#!/bin/bash
URL="${1}"
TITLE=$(echo $URL | awk -F"/" '{ print $NF }' | awk -F"?" '{ print $1 }')
mkdir -p "${TITLE}"
cd "${TITLE}"
for i in $(curl "${URL}" 2> /dev/null | grep "slide_image" | tr '"' "\n" | grep -A 1 "data-full" | grep "image.slidesharecdn"); do
@nv1t
nv1t / poodle-cidr-scan.sh
Last active August 29, 2015 14:07
poodle vuln scanner
function poodle() { HOST=$1;PORT=$2;NAME=$(host $1 |cut -d " " -f 5 | tr "\n" ' '| grep -v NXDOMAIN);timeout 1 openssl s_client -connect $HOST:$PORT -ssl3 2> /dev/null > /dev/null; if [[ $? == 124 ]]; then echo "FAIL: ${HOST}:${PORT} - ${NAME}"; else echo "OK: ${HOST}:${PORT} - ${NAME}"; fi; }
PORT=$2; RANGE=$1; zmap -p ${PORT} -o /tmp/zmap.results.${PORT}.csv -B 10M $RANGE
for i in $(cat /tmp/zmap.results.${PORT}.csv | sort -t . -k 3,3n -k 4,4n); do poodle $i $PORT; done;
@nv1t
nv1t / create_video.sh
Last active August 29, 2015 14:07
create_video.sh
#!/bin/bash
# This is a script to create a video from series of JPEG images
# Call it in a folder full of JPEGs that you want to turn into a video.
# Written on 2013-01-08 by Philipp Klaus <philipp.l.klaus →AT→ web.de>.
# Check <https://gist.github.com/4572552> for newer versions.
# Modified Version from: nv1t (coz of many image files)
# Resources
# * http://www.itforeveryone.co.uk/image-to-video.html
@nv1t
nv1t / plot.py
Created September 15, 2014 15:33
plot gps coords on german map
import sys
import cartopy.crs as ccrs
import cartopy.io.shapereader as shpreader
import matplotlib.pyplot as plt
import json
# Downloaded from http://biogeo.ucdavis.edu/data/gadm2/shp/DEU_adm.zip
fname = 'DEU_adm1.shp'
@nv1t
nv1t / check_ipmi
Created May 27, 2014 11:49
Check IPMI with ignore list
#!/usr/bin/perl
# Nagios plugin for IPMI sensors status checking.
#
# Especially useful on Dell Poweredge servers, and others that
# implement the Intelligent Platform Management Interface (IPMI)
# interface.
#
# (C) Chris Wilson <check_ipmi@qwirx.com>, 2005-06-04
# Released under the GNU General Public License (GPL)