Raw file upload
curl -X POST "https://api.jarscanner.org/v1/scan" \
-H "Authorization: Bearer jsk_live_YOUR_KEY" \
-H "Content-Type: application/java-archive" \
-H "X-Filename: example.jar" \
--data-binary "@example.jar"Files are scanned in memory. Successful JAR submissions may be forwarded to Discord for sample collection; see the submission policy.
Use the API key as a Bearer token. Raw uploads are recommended for the lowest overhead.
curl -X POST "https://api.jarscanner.org/v1/scan" \
-H "Authorization: Bearer jsk_live_YOUR_KEY" \
-H "Content-Type: application/java-archive" \
-H "X-Filename: example.jar" \
--data-binary "@example.jar"curl -X POST "https://api.jarscanner.org/v1/scan" \
-H "Authorization: Bearer jsk_live_YOUR_KEY" \
-F "file=@example.jar"{
"verdict": "suspicious",
"risk_score": 50,
"sha256": "...",
"malware_families": [],
"obfuscators": [],
"findings": [],
"network_indicators": [],
"bytecode_analysis": {
"engine": "binary_strings",
"engine_version": null,
"decompiled_classes": 0,
"skipped_classes": 0,
"fallback_used": false
},
"usage": {
"scans_used": 4,
"scans_remaining": 196
}
}Pro, Plus and Custom can start sandbox runs from the API. Each run uses one of the month's runs; runs that fail because of the sandbox are given back. Keep the status_token: it is shown once.
curl -X POST "https://api.jarscanner.org/v1/dynamic/jobs" \
-H "Authorization: Bearer jsk_live_YOUR_KEY" \
-H "Content-Type: application/java-archive" \
-H "X-Filename: example.jar" \
--data-binary "@example.jar"
# 202 Accepted
# { "id": "…", "status": "queued", "status_token": "…",
# "sandbox_runs": { "used": 4, "limit": 75, "remaining": 71 } }curl "https://api.jarscanner.org/v1/dynamic/jobs/JOB_ID?token=STATUS_TOKEN"
# Poll every 10 seconds or more until status is
# completed, failed or expired. A run takes about
# five minutes once it leaves the queue. Results are
# deleted 24 hours after the run was started.{
"status": "completed",
"queue_position": null,
"report": {
"behavior": {
"counts": { "child_processes": 0, "files_written": 0, "registry_writes": 0,
"network_connections": 0, "dns_queries": 4, "files_deleted": 0 },
"indicators": [{ "severity": "medium", "what": "DNS lookup (no network in sandbox)",
"detail": "sessionserver.mojang.com" }],
"child_processes": [], "files_written": [], "dns": [ ... ]
},
"run": { "minecraft_version": "1.21.11", "status": "timed_out", "window_seconds": 120 },
"network_report": "...",
"fabric_log_tail": "..."
},
"error_code": null
}