Linux ip-148-66-134-25.ip.secureserver.net 3.10.0-1160.119.1.el7.tuxcare.els10.x86_64 #1 SMP Fri Oct 11 21:40:41 UTC 2024 x86_64
Apache
: 148.66.134.25 | : 18.191.162.73
66 Domain
8.0.30
amvm
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
usr /
lib /
python2.7 /
site-packages /
serial /
[ HOME SHELL ]
Name
Size
Permission
Action
tools
[ DIR ]
drwxr-xr-x
urlhandler
[ DIR ]
drwxr-xr-x
__init__.py
2.73
KB
-rw-r--r--
__init__.pyc
2.12
KB
-rw-r--r--
__init__.pyo
2.12
KB
-rw-r--r--
rfc2217.py
56.98
KB
-rw-r--r--
rfc2217.pyc
37.64
KB
-rw-r--r--
rfc2217.pyo
37.64
KB
-rw-r--r--
serialcli.py
9.8
KB
-rw-r--r--
serialcli.pyc
9.46
KB
-rw-r--r--
serialcli.pyo
9.46
KB
-rw-r--r--
serialjava.py
9.07
KB
-rw-r--r--
serialjava.pyc
9.88
KB
-rw-r--r--
serialjava.pyo
9.88
KB
-rw-r--r--
serialposix.py
23.86
KB
-rw-r--r--
serialposix.pyc
21.54
KB
-rw-r--r--
serialposix.pyo
21.54
KB
-rw-r--r--
serialutil.py
18.81
KB
-rw-r--r--
serialutil.pyc
20.05
KB
-rw-r--r--
serialutil.pyo
20.05
KB
-rw-r--r--
serialwin32.py
16.09
KB
-rw-r--r--
serialwin32.pyc
13.92
KB
-rw-r--r--
serialwin32.pyo
13.92
KB
-rw-r--r--
sermsdos.py
5.71
KB
-rw-r--r--
sermsdos.pyc
6.63
KB
-rw-r--r--
sermsdos.pyo
6.63
KB
-rw-r--r--
win32.py
9.88
KB
-rw-r--r--
win32.pyc
7.58
KB
-rw-r--r--
win32.pyo
7.58
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : __init__.py
#!/usr/bin/env python # portable serial port access with python # this is a wrapper module for different platform implementations # # (C) 2001-2010 Chris Liechti <cliechti@gmx.net> # this is distributed under a free software license, see license.txt VERSION = '2.6' import sys if sys.platform == 'cli': from serial.serialcli import * else: import os # chose an implementation, depending on os if os.name == 'nt': #sys.platform == 'win32': from serial.serialwin32 import * elif os.name == 'posix': from serial.serialposix import * elif os.name == 'java': from serial.serialjava import * else: raise ImportError("Sorry: no implementation for your platform ('%s') available" % (os.name,)) protocol_handler_packages = [ 'serial.urlhandler', ] def serial_for_url(url, *args, **kwargs): """\ Get an instance of the Serial class, depending on port/url. The port is not opened when the keyword parameter 'do_not_open' is true, by default it is. All other parameters are directly passed to the __init__ method when the port is instantiated. The list of package names that is searched for protocol handlers is kept in ``protocol_handler_packages``. e.g. we want to support a URL ``foobar://``. A module ``my_handlers.protocol_foobar`` is provided by the user. Then ``protocol_handler_packages.append("my_handlers")`` would extend the search path so that ``serial_for_url("foobar://"))`` would work. """ # check remove extra parameter to not confuse the Serial class do_open = 'do_not_open' not in kwargs or not kwargs['do_not_open'] if 'do_not_open' in kwargs: del kwargs['do_not_open'] # the default is to use the native version klass = Serial # 'native' implementation # check port type and get class try: url_nocase = url.lower() except AttributeError: # it's not a string, use default pass else: if '://' in url_nocase: protocol = url_nocase.split('://', 1)[0] for package_name in protocol_handler_packages: module_name = '%s.protocol_%s' % (package_name, protocol,) try: handler_module = __import__(module_name) except ImportError: pass else: klass = sys.modules[module_name].Serial break else: raise ValueError('invalid URL, protocol %r not known' % (protocol,)) else: klass = Serial # 'native' implementation # instantiate and open when desired instance = klass(None, *args, **kwargs) instance.port = url if do_open: instance.open() return instance
Close