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 ipaddress | |
from bson.codec_options import TypeCodec | |
from bson.codec_options import TypeRegistry | |
from bson.codec_options import CodecOptions | |
from bson.int64 import Int64 | |
class IPv4Codec(TypeCodec): | |
python_type = ipaddress.IPv4Address | |
bson_type = Int64 | |
def transform_python(self, value): |
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
package main | |
import ( | |
"encoding/json" | |
"log" | |
"fmt" | |
"net/http" | |
) | |
type DNSQuestion struct { |
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
# coding: utf-8 | |
from dataclasses import dataclass, asdict, field | |
from typing import Dict, List, Optional | |
import pprint | |
import json | |
try: | |
import requests | |
except ImportError: | |
raise SystemExit("Please install 'requests' first") |
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
#from ioctl_opt import IOC, IO, IOC_READ, IOC_WRITE, IOR, IOW | |
from fcntl import ioctl | |
import ctypes | |
#https://github.com/apple/darwin-xnu/blob/0a798f6738bc1db01281fc08ae024145e84df927/bsd/security/audit/audit_ioctl.h | |
#/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/ioccom.h | |
AUDITPIPE_IOBASE = ord('A') | |
AUDITSDEV_IOBASE = ord('S') | |
##======================================================================================================================== | |
#@(#)ioccom.h 8.2 (Berkeley) 3/28/94 |
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
#!/usr/bin/env python3 | |
import os | |
import re | |
import sys | |
import json | |
import argparse | |
import pprint | |
import logging |
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 | |
from datetime import datetime, timedelta | |
# pip install pytz is required. | |
from pytz import timezone | |
import pytz | |
import os | |
import sys | |
import argparse |
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
#!/usr/bin/env python3 | |
import os | |
import sys | |
import csv | |
import json | |
import logging | |
import pprint | |
import time |
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 ctypes | |
import requests | |
ctypes.windll.user32.MessageBoxW(0, "Start", "start", 0) | |
check = False | |
while True: | |
data = requests.get('http://elk.nexon.net:9200/_cluster/health').json() | |
status = data.get('status') | |
if status == 'green': | |
if check is False: | |
ctypes.windll.user32.MessageBoxW(0, "Green", "Green", 0) |
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 argparse | |
import win32com | |
import win32com.client | |
import os | |
import re | |
try: | |
import _winreg as winreg | |
except ImportError: | |
import winreg |
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
#!/usr/bin/env python | |
import sys | |
import datetime | |
import json | |
import argparse | |
import logging | |
from collections import namedtuple | |
try: | |
from elasticsearch import Elasticsearch |
NewerOlder