MCPcopy Index your code
hub / github.com/dbcli/pgcli / obfuscate_process_password

Function obfuscate_process_password

pgcli/main.py:1735–1742  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1733
1734
1735def obfuscate_process_password():
1736 process_title = setproctitle.getproctitle()
1737 if "://" in process_title:
1738 process_title = re.sub(r":(.*):(.*)@", r":\1:xxxx@", process_title)
1739 elif "=" in process_title:
1740 process_title = re.sub(r"password=(.+?)((\s[a-zA-Z]+=)|$)", r"password=xxxx\2", process_title)
1741
1742 setproctitle.setproctitle(process_title)
1743
1744
1745def has_meta_cmd(query):

Callers 2

cliFunction · 0.85

Calls

no outgoing calls

Tested by 1