Skip to content

Instantly share code, notes, and snippets.

Jonathan Kamens jikamens

Block or report user

Report or block jikamens

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jikamens
jikamens / lastpass_brute_force.c
Last active Aug 29, 2015
Proof of concept of brute-forcing LastPass passwords
View lastpass_brute_force.c
#include <assert.h>
#include <openssl/evp.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
/* Proof of concept for brute-forcing LastPass passwords from the
user's login key (sent at login from client to server) or from the
@jikamens
jikamens / phonepower-usage-cron.sh
Last active Aug 29, 2015
Scripts for using Selenium to check your Phone Power international minutes automatically
View phonepower-usage-cron.sh
#!/bin/bash -e
# Cron wrapper script for phonepower-usage.pl.
#
# Copyright (c) 2014 Jonathan Kamens <jik@kamens.us>. You can do
# whatever you want with this script, as long as you give me credit
# and don't make any money from it.
#
# The home page of this script is http://blog.kamens.us/2014/04/20/using-selenium-to-monitor-phone-power-international-call-usage/.
#
View gist:c2416d4d08df6037a9e0
Verifying I am +jik on my passcard. https://onename.com/jik
View hn-comment-feed.cgi
#!/usr/bin/perl
# CGI script for generating an RSS feed of the comment on a Hacker
# News posting.
#
# Copyright (c) 2013 Jonathan Kamens <jik@kamens.us>.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
View fork_safe_greenlet.py
import gc
import gevent
import greenlet
import multiprocessing
import os
"""
Gevent doesn't cope well with forking. The child process after the
fork ends up with all the same greenlets running as the parent
process, which is almost certainly not what you wanted.
@jikamens
jikamens / auto-dnsbl.pl
Last active Apr 9, 2017
auto-dnsbl.py - add DNSBL entries to /etc/hosts.deny automatically
View auto-dnsbl.pl
#!/usr/bin/env perl
=pod
=head1 SUMMARY
auto-dnsbl.py - add DNSBL entries to /etc/hosts.deny automatically
=head1 DESCRIPTION
@jikamens
jikamens / encryption.py
Last active Aug 11, 2017
Python code for Schematics field encryption / decryption that is compatible with Ruby's mongoid-encrypted-fields + gibberish. The Encryptor object in this gist does encryption / decryption that is compatible with "openssl enc -k *password* -salt -aes-256-cbc". If you want it also to be compatible with mongoid-encrypted-fields, then you need to s…
View encryption.py
import binascii
from Crypto.Cipher import AES
from Crypto.Random.random import getrandbits
from hashlib import md5
from schematics.types import StringType
import struct
class DecryptionException(Exception):
pass
View keybase.md

Keybase proof

I hereby claim:

  • I am jikamens on github.
  • I am jik (https://keybase.io/jik) on keybase.
  • I have a public key ASD44yzUyutb2s-C6BGHSYGt0BAQ5mglTt9Si89y3HE4PQo

To claim this, I am signing this object:

@jikamens
jikamens / download-helpscout-mailbox.py
Last active Oct 22, 2017
Python script for doanloding conversations, customers, and attachments from a Help Scout mailbox
View download-helpscout-mailbox.py
#!/usr/bin/env python
"""Download conversations, customers, and attachments from a Help Scout mailbox
Written by Jonathan Kamens (jik@kamens.us).
Released into the public domain.
Email me patches if you have enhancements you'd like me to incorporate. Don't
bother emailing me bug reports or suggestions; this script does exactly what I
You can’t perform that action at this time.