Skip to content

Instantly share code, notes, and snippets.

@jgarman
Created April 8, 2015 19:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgarman/daa877875f63fe1c7d3f to your computer and use it in GitHub Desktop.
Save jgarman/daa877875f63fe1c7d3f to your computer and use it in GitHub Desktop.
Example CbApi2 code
from cbapi2 import CbApi2
cb = CbApi2("http://cb.example.com", "API_TOKEN", ssl_verify=False, debug=True)
# find all executions of a process named "svchost.exe" not in a Windows System directory
procs = cb.process_search('process_name:svchost.exe -path:c:\\windows\\system32\\svchost.exe -path:c:\\windows\\syswow64\\svchost.exe')
for proc in procs:
print proc.start, proc.hostname, proc.path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment