Linux anchor 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
Apache/2.4.18 (Ubuntu)
Server IP : 10.10.100.4 & Your IP : 216.73.217.150
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
python3 /
dist-packages /
serial /
urlhandler /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2016-11-15 15:19
__init__.py
0
B
-rw-r--r--
2015-08-03 00:00
protocol_alt.py
1.65
KB
-rw-r--r--
2015-12-16 22:50
protocol_hwgrep.py
2.97
KB
-rw-r--r--
2015-12-22 22:46
protocol_loop.py
9.26
KB
-rw-r--r--
2015-12-16 22:51
protocol_rfc2217.py
269
B
-rw-r--r--
2015-12-16 23:01
protocol_socket.py
9.6
KB
-rw-r--r--
2015-12-16 23:00
protocol_spy.py
8.1
KB
-rw-r--r--
2015-12-16 22:51
Save
Rename
#! python # # This module implements a special URL handler that allows selecting an # alternate implementation provided by some backends. # # This file is part of pySerial. https://github.com/pyserial/pyserial # (C) 2015 Chris Liechti <cliechti@gmx.net> # # SPDX-License-Identifier: BSD-3-Clause # # URL format: alt://port[?option[=value][&option[=value]]] # options: # - class=X used class named X instead of Serial # # example: # use poll based implementation on Posix (Linux): # python -m serial.tools.miniterm alt:///dev/ttyUSB0?class=PosixPollSerial import sys import time import serial try: import urlparse except ImportError: import urllib.parse as urlparse def serial_class_for_url(url): """extract host and port from an URL string""" parts = urlparse.urlsplit(url) if parts.scheme != 'alt': raise serial.SerialException('expected a string in the form "alt://port[?option[=value][&option[=value]]]": not starting with alt:// (%r)' % (parts.scheme,)) class_name = 'Serial' try: for option, values in urlparse.parse_qs(parts.query, True).items(): if option == 'class': class_name = values[0] else: raise ValueError('unknown option: %r' % (option,)) except ValueError as e: raise serial.SerialException('expected a string in the form "alt://port[?option[=value][&option[=value]]]": %s' % e) return (''.join([parts.netloc, parts.path]), getattr(serial, class_name)) # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if __name__ == '__main__': s = serial_for_url('alt:///dev/ttyS0?class=PosixPollSerial') print(s)