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 asyncio | |
import ctypes | |
from ctypes import windll, wintypes | |
from pathlib import Path | |
# Define necessary constants and structures | |
FILE_READ_DATA = 0x1 | |
FILE_READ_SHARED = 0x1 | |
FILE_WRITE_DATA = 0x2 | |
CREATE_ALWAYS = 0x2 |
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
;-------------------------------Cut file parameters------------------------ | |
; Input file name : reorder.svg | |
; File rotation : 0 File scale : 1 | |
; Material name : Glass, Soda Lime | |
; Material thickness : 3.3 mm | |
; Cut path : Centerline | |
; Cut quality : roughRate | |
; Raw Material width : 130.00mm | |
; Raw Material height : 100.00mm | |
;-------------------------------Do Not modify the Gcode file--------------- |
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 typing import List | |
import ipaddress | |
lst = ['10.10.20.0/24', | |
'10.10.30.0/25', | |
'10.10.30.128/25', | |
'10.10.31.0/24', | |
'10.10.32.0/24' | |
] |
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
Value REMOTE_DEVICE_ID (.*) | |
Value List REMOTE_ENTRY_ADDRESSES (.*) | |
Value REMOTE_PLATFORM ([^,]+) | |
Value REMOTE_SYSTEM_CAPAB (.*) | |
Value LOCAL_INTERFACE ([^,]+) | |
Value REMOTE_PORT (.*) | |
Value REMOTE_HOLDTIME (\d+) | |
Value REMOTE_SYSTEM_VERSION (.+) | |
Value REMOTE_CDP_VERSION (.+) | |
Value REMOTE_DUPLEX (.+) |
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 re | |
def flipACE(ace: str) -> list: | |
search = r'(?:host \d+\.\d+\.\d+\.\d+|\d+\.\d+\.\d+\.\d+ \d+\.\d+\.\d+\.\d+|any)' | |
endofline = r'(?:established|log-input|log|$)' | |
remark = r'^ ?remark' | |
if re.search(remark, ace): | |
return ace.split() | |
if re.search(' reflect ', ace): |
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
grammar aclv3; | |
acl : ace+ EOF ; | |
ace : action ops ; | |
action : REMARK | |
| ( PERMIT ( NAMED | NUM ) source dest ) | |
| ( DENY ( NAMED | NUM ) source dest ) | |
; | |
source : ( ANY | HOST ADDRESS | ADDRESS ( MASK | ADDRESS ) ) srcports? ; | |
dest : (ANY | HOST ADDRESS | ADDRESS ( MASK | ADDRESS ) ) dstports? ; |
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
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
grammar aclv2; | |
acl : ace+ EOF ; | |
ace : remarks*? action ops ; |
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
# Sexy Lexi | |
import collections | |
import re | |
import acltests | |
import aceNamePort | |
from tkinter import * | |
root = Tk() | |
Token = collections.namedtuple('Token', ['typ', 'value', 'line', 'column']) |
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
# Name-Port Mappings Cisco | |
tcp_ports = { | |
'bgp': '179', | |
'chargen': '19', | |
'cmd': '514', | |
'daytime': '13', | |
'discard': '9', | |
'domain': '53', | |
'echo': '7', |
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
# flip ace | |
import re | |
def ace_elements(ace): | |
ace = ace.strip() | |
'''Dissect ACE statement into it's parts. | |
returns and array of each part as follows | |
[action protocol src_address src_ports dst_address dst_ports established] | |
Any empty element returns None. For example: |