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
from logging import getLogger, Formatter, StreamHandler, DEBUG, ERROR | |
class LeveledFormatter(Formatter): | |
_formats = {} | |
def __init__(self, *args, **kwargs): | |
super(LeveledFormatter, self).__init__(*args, **kwargs) | |
def set_formatter(self, level, formatter): |
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
# Check the alias | |
keytool -list -keystore ${MYKEY}.jks | |
# Export to PKCS12 | |
keytool -importkeystore -srckeystore ${MYKEY}.jks -destkeystore ${MYKEY}.pkcs -srcstoretype JKS -deststoretype PKCS12 -alias ${MYALIAS} | |
# Convert to PEM | |
openssl pkcs12 -in ${MYKEY}.pkcs -out ${MYKEY}.pem |
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 logging | |
import time | |
import socket | |
from os import linesep | |
from queue import Empty, Queue | |
from socket import AF_INET, SOCK_STREAM | |
from threading import Thread, Lock | |
class socket_handler(object): |
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
Option Explicit | |
Dim targetFile, propName, propValue | |
targetFile = WScript.Arguments(0) | |
propName = WScript.Arguments(1) | |
propValue = WScript.Arguments(2) | |
Dim objFS | |
Set objFS = CreateObject("Scripting.FileSystemObject") |