This file contains 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 yubikey_otp_check_v2 | |
def verify(otp): | |
message = '' | |
user = '' | |
users = { | |
b'cccccabcdef1': b'user1', | |
b'cccccabcdef2': b'user2', | |
} |
This file contains 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 os | |
import re | |
print('--------------') | |
active_kernel_version = os.popen('uname -r').read().strip().replace('-generic', '') | |
existing_kernels = os.popen('dpkg --list | egrep -i --color "ii (linux-image|linux-headers|linux-modules)"').read().strip() | |
print(existing_kernels) | |
print('--------------') | |
existing_kernels = os.popen('dpkg --list | egrep -i --color "ii (linux-image)"').read().strip() | |
kernel_versions = [] |
This file contains 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 | |
sys.dont_write_bytecode = True | |
import yubikey_otp_check_v2 | |
users = { | |
'cccccabcdef1': 'user1', | |
'cccccabcdef2': 'user2', | |
} |
This file contains 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
# header = email.message_from_string(mail['header']) | |
# decoded_subject = myDecodeHeader(header["subject"]) | |
def myDecodeHeader(subject): | |
if subject is None: | |
subject = '' | |
else: | |
subject = subject.replace("\r\n", "") | |
try: | |
subject = unicode(subject, 'utf-8') |
This file contains 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 time | |
import socket | |
import base64 | |
src = '192.168.1.2' # ip of remote | |
mac = '00-AB-11-11-11-11' # mac of remote | |
remote = 'python remote' # remote name | |
dst = '192.168.1.3' # ip of tv | |
app = 'python' # iphone..iapp.samsung |