Skip to content

Usage Overview

This section provides a high-level understanding of how to use the CyberShield SDK to perform scans, analyze files, and monitor system behavior. Each example demonstrates the typical flow you will follow inside your application.


Quick Start Example

JavaScript

const report = await shield.scan.file("invoice.pdf");
console.log(report);

Python

report = shield.scan_file("invoice.pdf")
print(report)

What You Can Do With the SDK

Feature Description
File scanning Scan files for malware, suspicious behavior, or known signatures.
Hash lookup Submit SHA-256 hashes to check if a file was previously analyzed.
Process monitoring Watch for suspicious system processes or applications.
Metadata extraction Extract file hashes, structure, MIME type, and metadata.

Example: File Scan Flow

JavaScript

async function scanDocument() {
  const result = await shield.scan.file("document.pdf");
  console.log("Threat Level:", result.threatLevel);
}

Python

result = shield.scan_file("document.pdf")
print("Threat Level:", result["threatLevel"])

Example: Hash Lookup

JavaScript

const lookup = await shield.file.hashLookup("e3b0c44298fc1c...");

console.log(lookup.exists);

Python

lookup = shield.hash_lookup("e3b0c44298fc1c...")
print(lookup["exists"])

Example: System Monitoring

JavaScript

const alerts = await shield.monitor.processes();
console.log(alerts);

Python

alerts = shield.monitor_processes()
print(alerts)

Suggested Reading

Learn more about the SDK's internal modules: