/usr/lib64/python3.12
NameSizeModeActions
asyncio/-0755rm
collections/-0755rm
concurrent/-0755rm
config-3.12-x86_64-linux-gnu/-0755rm
ctypes/-0755rm
curses/-0755rm
dbm/-0755rm
email/-0755rm
encodings/-0755rm
ensurepip/-0755rm
html/-0755rm
http/-0755rm
importlib/-0755rm
json/-0755rm
lib-dynload/-0755rm
lib2to3/-0755rm
logging/-0755rm
multiprocessing/-0755rm
pydoc_data/-0755rm
re/-0755rm
site-packages/-0755rm
sqlite3/-0755rm
tomllib/-0755rm
unittest/-0755rm
urllib/-0755rm
venv/-0755rm
wsgiref/-0755rm
xml/-0755rm
xmlrpc/-0755rm
zipfile/-0755rm
zoneinfo/-0755rm
__pycache__/-0755rm
abc.py65380644editdlrm
aifc.py342110644editdlrm
antigravity.py5000644editdlrm
argparse.py1011550644editdlrm
ast.py644520644editdlrm
base64.py206340755editdlrm
bdb.py335730644editdlrm
bisect.py34230644editdlrm
bz2.py118470644editdlrm
calendar.py258640644editdlrm
cgi.py344180755editdlrm
cgitb.py124210644editdlrm
chunk.py55000644editdlrm
cmd.py148730644editdlrm
code.py109620644editdlrm
codecs.py368700644editdlrm
codeop.py59080644editdlrm
colorsys.py40620644editdlrm
compileall.py205070644editdlrm
configparser.py537890644editdlrm
contextlib.py276370644editdlrm
contextvars.py1290644editdlrm
copy.py84120644editdlrm
copyreg.py76140644editdlrm
cProfile.py65550755editdlrm
crypt.py39130644editdlrm
csv.py163860644editdlrm
dataclasses.py620850644editdlrm
datetime.py2680644editdlrm
decimal.py28050644editdlrm
difflib.py833680644editdlrm
dis.py302270644editdlrm
doctest.py1067490644editdlrm
enum.py815400644editdlrm
filecmp.py103810644editdlrm
fileinput.py157140644editdlrm
fnmatch.py59990644editdlrm
fractions.py381470644editdlrm
ftplib.py347350644editdlrm
functools.py379400644editdlrm
genericpath.py55720644editdlrm
getopt.py74880644editdlrm
getpass.py59900644editdlrm
gettext.py213200644editdlrm
glob.py87320644editdlrm
graphlib.py96480644editdlrm
gzip.py254020644editdlrm
hashlib.py96830644editdlrm
heapq.py230240644editdlrm
hmac.py80430644editdlrm
imaplib.py542090644editdlrm
imghdr.py43980644editdlrm
inspect.py1271250644editdlrm
io.py35820644editdlrm
ipaddress.py814140644editdlrm
keyword.py10730644editdlrm
LICENSE.txt139360644editdlrm
linecache.py58000644editdlrm
locale.py785990644editdlrm
lzma.py132770644editdlrm
mailbox.py789110644editdlrm
mailcap.py93330644editdlrm
mimetypes.py230370644editdlrm
modulefinder.py236990644editdlrm
netrc.py69220644editdlrm
nntplib.py410870644editdlrm
ntpath.py304040644editdlrm
nturl2path.py23740644editdlrm
numbers.py114670644editdlrm
opcode.py131740644editdlrm
operator.py109650644editdlrm
optparse.py603690644editdlrm
os.py408210644editdlrm
pathlib.py510520644editdlrm
pdb.py702970755editdlrm
pickle.py669110644editdlrm
pickletools.py940520644editdlrm
pipes.py89780644editdlrm
pkgutil.py182810644editdlrm
platform.py433880755editdlrm
plistlib.py285820644editdlrm
poplib.py147420644editdlrm
posixpath.py173560644editdlrm
pprint.py241580644editdlrm
profile.py230920755editdlrm
pstats.py292890644editdlrm
pty.py61370644editdlrm
pyclbr.py113960644editdlrm
pydoc.py1135080755editdlrm
py_compile.py78370644editdlrm
queue.py114960644editdlrm
quopri.py71830755editdlrm
random.py346890644editdlrm
reprlib.py71480644editdlrm
rlcompleter.py78270644editdlrm
runpy.py128850644editdlrm
sched.py63510644editdlrm
secrets.py19840644editdlrm
selectors.py196710644editdlrm
shelve.py85600644editdlrm
shlex.py133530644editdlrm
shutil.py567620644editdlrm
signal.py24950644editdlrm
site.py234390644editdlrm
smtplib.py435310755editdlrm
sndhdr.py74480644editdlrm
socket.py378150644editdlrm
socketserver.py280650644editdlrm
sre_compile.py2310644editdlrm
sre_constants.py2320644editdlrm
sre_parse.py2290644editdlrm
ssl.py509040644editdlrm
stat.py54850644editdlrm
statistics.py502270644editdlrm
string.py117860644editdlrm
stringprep.py129170644editdlrm
struct.py2570644editdlrm
subprocess.py887470644editdlrm
sunau.py184780644editdlrm
symtable.py124770644editdlrm
sysconfig.py337730644editdlrm
tabnanny.py115310755editdlrm
tarfile.py1142500755editdlrm
telnetlib.py233340644editdlrm
tempfile.py323860644editdlrm
textwrap.py197180644editdlrm
this.py10030644editdlrm
threading.py597420644editdlrm
timeit.py134630755editdlrm
token.py25110644editdlrm
tokenize.py215700644editdlrm
trace.py293520755editdlrm
traceback.py463930644editdlrm
tracemalloc.py180470644editdlrm
tty.py20350644editdlrm
types.py109930644editdlrm
typing.py1188360644editdlrm
uu.py73410644editdlrm
uuid.py296560644editdlrm
warnings.py219090644editdlrm
wave.py227690644editdlrm
weakref.py215130644editdlrm
webbrowser.py241690755editdlrm
xdrlib.py59420644editdlrm
zipapp.py75430644editdlrm
zipimport.py278400644editdlrm
_aix_support.py40210644editdlrm
_collections_abc.py320890644editdlrm
_compat_pickle.py87610644editdlrm
_compression.py56810644editdlrm
_markupbase.py146530644editdlrm
_osx_support.py220230644editdlrm
_pydatetime.py920870644editdlrm
_pydecimal.py2272830644editdlrm
_pyio.py935930644editdlrm
_pylong.py107900644editdlrm
_py_abc.py61890644editdlrm
_sitebuiltins.py31280644editdlrm
_strptime.py283930644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.py721320644editdlrm
_threading_local.py72200644editdlrm
_weakrefset.py58930644editdlrm
__future__.py52180644editdlrm
__hello__.py2270644editdlrm
Edit: /usr/lib64/python3.12/getpass.py (5990B)
"""Utilities to get a password and/or the current user name. getpass(prompt[, stream]) - Prompt for a password, with echo turned off. getuser() - Get the user name from the environment or password database. GetPassWarning - This UserWarning is issued when getpass() cannot prevent echoing of the password contents while reading. On Windows, the msvcrt module will be used. """ # Authors: Piers Lauder (original) # Guido van Rossum (Windows support and cleanup) # Gregory P. Smith (tty support & GetPassWarning) import contextlib import io import os import sys import warnings __all__ = ["getpass","getuser","GetPassWarning"] class GetPassWarning(UserWarning): pass def unix_getpass(prompt='Password: ', stream=None): """Prompt for a password, with echo turned off. Args: prompt: Written on stream to ask for the input. Default: 'Password: ' stream: A writable file object to display the prompt. Defaults to the tty. If no tty is available defaults to sys.stderr. Returns: The seKr3t input. Raises: EOFError: If our input tty or stdin was closed. GetPassWarning: When we were unable to turn echo off on the input. Always restores terminal settings before returning. """ passwd = None with contextlib.ExitStack() as stack: try: # Always try reading and writing directly on the tty first. fd = os.open('/dev/tty', os.O_RDWR|os.O_NOCTTY) tty = io.FileIO(fd, 'w+') stack.enter_context(tty) input = io.TextIOWrapper(tty) stack.enter_context(input) if not stream: stream = input except OSError: # If that fails, see if stdin can be controlled. stack.close() try: fd = sys.stdin.fileno() except (AttributeError, ValueError): fd = None passwd = fallback_getpass(prompt, stream) input = sys.stdin if not stream: stream = sys.stderr if fd is not None: try: old = termios.tcgetattr(fd) # a copy to save new = old[:] new[3] &= ~termios.ECHO # 3 == 'lflags' tcsetattr_flags = termios.TCSAFLUSH if hasattr(termios, 'TCSASOFT'): tcsetattr_flags |= termios.TCSASOFT try: termios.tcsetattr(fd, tcsetattr_flags, new) passwd = _raw_input(prompt, stream, input=input) finally: termios.tcsetattr(fd, tcsetattr_flags, old) stream.flush() # issue7208 except termios.error: if passwd is not None: # _raw_input succeeded. The final tcsetattr failed. Reraise # instead of leaving the terminal in an unknown state. raise # We can't control the tty or stdin. Give up and use normal IO. # fallback_getpass() raises an appropriate warning. if stream is not input: # clean up unused file objects before blocking stack.close() passwd = fallback_getpass(prompt, stream) stream.write('\n') return passwd def win_getpass(prompt='Password: ', stream=None): """Prompt for password with echo off, using Windows getwch().""" if sys.stdin is not sys.__stdin__: return fallback_getpass(prompt, stream) for c in prompt: msvcrt.putwch(c) pw = "" while 1: c = msvcrt.getwch() if c == '\r' or c == '\n': break if c == '\003': raise KeyboardInterrupt if c == '\b': pw = pw[:-1] else: pw = pw + c msvcrt.putwch('\r') msvcrt.putwch('\n') return pw def fallback_getpass(prompt='Password: ', stream=None): warnings.warn("Can not control echo on the terminal.", GetPassWarning, stacklevel=2) if not stream: stream = sys.stderr print("Warning: Password input may be echoed.", file=stream) return _raw_input(prompt, stream) def _raw_input(prompt="", stream=None, input=None): # This doesn't save the string in the GNU readline history. if not stream: stream = sys.stderr if not input: input = sys.stdin prompt = str(prompt) if prompt: try: stream.write(prompt) except UnicodeEncodeError: # Use replace error handler to get as much as possible printed. prompt = prompt.encode(stream.encoding, 'replace') prompt = prompt.decode(stream.encoding) stream.write(prompt) stream.flush() # NOTE: The Python C API calls flockfile() (and unlock) during readline. line = input.readline() if not line: raise EOFError if line[-1] == '\n': line = line[:-1] return line def getuser(): """Get the username from the environment or password database. First try various environment variables, then the password database. This works on Windows as long as USERNAME is set. """ for name in ('LOGNAME', 'USER', 'LNAME', 'USERNAME'): user = os.environ.get(name) if user: return user # If this fails, the exception will "explain" why import pwd return pwd.getpwuid(os.getuid())[0] # Bind the name getpass to the appropriate function try: import termios # it's possible there is an incompatible termios from the # McMillan Installer, make sure we have a UNIX-compatible termios termios.tcgetattr, termios.tcsetattr except (ImportError, AttributeError): try: import msvcrt except ImportError: getpass = fallback_getpass else: getpass = win_getpass else: getpass = unix_getpass