This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import win32com.client | |
import time | |
shell = win32com.client.Dispatch("WScript.Shell") | |
type_str = 'KexAlgorithms diffie-hellman-group1-sha1,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1' | |
time.sleep(3) | |
shell.SendKeys(type_str) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2.7 | |
import urllib2 | |
for line in open('/usr/share/dict/cracklib-small','rb'): | |
try: | |
urllib2.urlopen('https://github.com/'+line.replace('\n','')) | |
except urllib2.HTTPError as e: | |
if e.code == 404: | |
print line.replace('\n','') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
for a,b,c in itertools.product(itertools.count(0),xrange(0,10),xrange(0,10)): | |
print a,b,c | |
if a > 20: break |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class suffix_tree(): | |
def __init__(self,input_str): | |
self.root = node(ptr=[]) | |
for i in range(0,len(input_str)): | |
self.add(self.root,input_str[i:]) | |
# add if input_str never starts with vals in node.ptr | |
# otherwise, add to node that starts with it | |
# if a val in node.ptr starts with input_str |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import operator | |
# primality test | |
def is_prime(i): | |
if i <= 1: return False | |
if i <= 3: return True | |
if i%3 == 0 or i%2 == 0: return False | |
return sum((1 for y in xrange(5, int(i**0.5)+1, 6) if i%y == 0 or i%(y+2) == 0)) == 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String[] msg_chars = new String[msg_text.length()]; | |
for(int i=0; i < msg_text.length(); i++) { | |
msg_chars[i] = "\\" +String.valueOf(String.format("\\u%04x", (int) msg_text.charAt(i))); | |
} | |
msg_text = "" | |
for(int i=0; i < msg_chars.length; i++) { | |
msg_text += msg_chars[i]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'Nathaniel' | |
import requests | |
import mysql.connector | |
import time | |
import unicodedata | |
# region sql stuff | |
def sql_filter_param(text): | |
output = unicodedata.normalize('NFKD', text).encode('ascii','ignore'); |
NewerOlder