MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / db_connect

Function db_connect

Scripts/Developer Base/Free Internet.py:749–760  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

747
748# ---------------- vault ----------------
749def db_connect() -> sqlite3.Connection:
750 prefs = browser_prefs()
751 sess = browser_session()
752 mode = prefs.get("mode", "smart")
753 if mode == "direct":
754 return direct_fetch(sess, method, url, data=data, files=files, stream=stream), "direct"
755 if mode == "strict":
756 return proxied_fetch(sess, method, url, prefs.get("country", "US"), data=data, files=files, stream=stream), "proxy"
757 try:
758 return proxied_fetch(sess, method, url, prefs.get("country", "US"), data=data, files=files, stream=stream), "proxy"
759 except Exception:
760 return direct_fetch(sess, method, url, data=data, files=files, stream=stream), "direct"
761
762# ---------------- vault ----------------
763def db_connect() -> sqlite3.Connection:

Callers 10

init_vault_dbFunction · 0.70
meta_getFunction · 0.70
meta_setFunction · 0.70
homeFunction · 0.70
vault_homeFunction · 0.70
vault_addFunction · 0.70
vault_viewFunction · 0.70
vault_editFunction · 0.70
vault_deleteFunction · 0.70
vault_settingsFunction · 0.70

Calls 4

browser_prefsFunction · 0.70
browser_sessionFunction · 0.70
direct_fetchFunction · 0.70
proxied_fetchFunction · 0.70

Tested by

no test coverage detected