Keep going ...
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 sys | |
import win32com.client | |
openedDoc = win32com.client.Dispatch("Excel.Application") | |
filename= sys.argv[1] | |
password_file = open ( 'wordlist.lst', 'r' ) | |
passwords = password_file.readlines() | |
password_file.close() | |
passwords = [item.rstrip('\n') for item in passwords] |
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
# Backup files | |
*.~ | |
# Byte-compiled / optimized / DLL files | |
__pycache__/ | |
*.py[cod] | |
# C extensions | |
*.so |
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
SELECT | |
* | |
FROM | |
( | |
SELECT | |
a.record_time time_a, | |
b.record_time time_b, | |
a.flow AS data_a, | |
b.flow AS data_b, | |
a.flow - b.flow AS data_diff, |
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 python | |
# -*- coding:utf-8 -*- | |
''' | |
Author : myth | |
Date : 15-7-28 | |
Email : belongmyth at 163.com | |
''' | |
from datetime import datetime | |
from datetime import timedelta |
get passwd from user with termios
def getpass(prompt="Password: "):
import termios, sys
fd = sys.stdin.fileno()
old = termios.tcgetattr(fd)
new = termios.tcgetattr(fd)
new[3] = new[3] & ~termios.ECHO # lflags
try:
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
def how_many_open_files(): | |
import psutil | |
pss = psutil.process_iter() | |
total_count = 0 | |
for p in pss: | |
if p.num_fds() != len(p.open_files()): | |
print u'%s with pid %d has diff fds num %d and open files num %d'%(p.name, p.pid, p.num_fds(), len(p.open_files())) | |
total_count += len(p.open_files()) | |
return total_count |
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
def run(cmd, | |
cwd=None, | |
stdin=None, | |
runas=None, | |
shell=DEFAULT_SHELL, | |
python_shell=None, | |
env=None, | |
clean_env=False, | |
template=None, | |
rstrip=True, |
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 python | |
# -*- coding:utf-8 -*- | |
''' | |
Author : myth | |
Date : 15-7-22 | |
Email : belongmyth at 163.com | |
''' | |
import logging | |
import redis |