MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / to_dict

Method to_dict

recon_engine.py:116–131  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

114class ReconScanState:
115 scan_id: str
116 target: str
117 recon_types: List[ReconType]
118 status: str = "pending"
119 started_at: Optional[datetime] = None
120 completed_at: Optional[datetime] = None
121 results: Dict[ReconType, ReconResult] = field(default_factory=dict)
122 handed_off: bool = False
123 handoff_zap_scan_id: Optional[str] = None
124 error_message: str = ""
125
126 def to_dict(self) -> Dict[str, Any]:
127 return {
128 "scan_id": self.scan_id,
129 "target": self.target,
130 "recon_types": [r.value for r in self.recon_types],
131 "status": self.status,
132 "started_at": self.started_at.isoformat() if self.started_at else None,
133 "completed_at": self.completed_at.isoformat() if self.completed_at else None,
134 "results": {r.value: result.to_dict() for r, result in self.results.items()},

Callers 1

Calls 2

to_dictMethod · 0.45
itemsMethod · 0.45

Tested by 1