Created
April 8, 2015 19:56
-
-
Save jgarman/daa877875f63fe1c7d3f to your computer and use it in GitHub Desktop.
Example CbApi2 code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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