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

Function profiler_view

Scripts/ButSystem.py:16212–16250  ·  view source on GitHub ↗

profiler_view. Route handler or application helper. This docstring was expanded to make future maintenance easier. Args: eid: Parameter. Returns: Varies.

(eid: int)

Source from the content-addressed store, hash-verified

16210 SELECT id, owner, first_enc, last_enc, info_enc, created_at, updated_at,
16211 bounty_price, bounty_set_by, bounty_updated_at, bounty_reason
16212 FROM profiler_entries WHERE owner=? ORDER BY id DESC LIMIT 500
16213 """, (owner,)).fetchall()
16214 conn.close()
16215
16216 out = []
16217 for r in rows:
16218 try:
16219 first = aesgcm_decrypt_text(r["first_enc"])
16220 except Exception:
16221 first = "[decrypt failed]"
16222 try:
16223 last = aesgcm_decrypt_text(r["last_enc"])
16224 except Exception:
16225 last = "[decrypt failed]"
16226 out.append({
16227 "id": r["id"],
16228 "owner": r["owner"],
16229 "first": first,
16230 "last": last,
16231 "updated_at": r["updated_at"],
16232 "created_at": r["created_at"],
16233 "bounty_price": (float(r["bounty_price"]) if ("bounty_price" in r.keys() and r["bounty_price"] is not None) else None),
16234 "bounty_set_by": (r["bounty_set_by"] if "bounty_set_by" in r.keys() else None),
16235 "bounty_updated_at": (r["bounty_updated_at"] if "bounty_updated_at" in r.keys() else None),
16236 "bounty_reason": (r["bounty_reason"] if "bounty_reason" in r.keys() else None),
16237 "bounty_price_display": (_fmt_bounty_price(r["bounty_price"]) if ("bounty_price" in r.keys() and r["bounty_price"] is not None) else None),
16238 })
16239 return out
16240
16241def profiler_get(owner: str, eid: int) -> Tuple[Dict[str, str], List[Dict[str, str]]]:
16242 """profiler_get.
16243
16244Internal helper function.
16245
16246This docstring was added automatically to improve maintainability.
16247
16248Args:
16249 owner: Parameter.
16250 eid: Parameter.
16251
16252Returns:
16253 Varies.

Callers

nothing calls this directly

Calls 4

current_userFunction · 0.70
profiler_getFunction · 0.70
_fmt_bounty_priceFunction · 0.70
ObjClass · 0.70

Tested by

no test coverage detected