Top-Level Commands
Interactive help
Access to the workspace directory
Create new project from code
Create new project from existing CPG
CPG of the active project
Currently active project
Open project
Close project by name
Close and remove project from disk
reload policy
Run analyzer on active CPG
Write all changes to disk
Undo effects of analyzer
The Ocular configuration object
Prints the version of Ocular
Prints the Ocular banner
help
Interactive help
ocular> help
res33: Helper = Welcome to the interactive help system. Below you find a table of all available
top-level commands. To get more detailed help on a specific command, just type
`help.<command>`.
Try `help.importCode` to begin with.
_______________________________________________________________________________
command | description | example |
==============================================================================|
close | Close project by name | close(projectName) |
cpg | CPG of the active project | cpg.method.l |
delete | Close and remove project from disk | delete(projectName) |
importCode | Create new project from code | importCode("example.jar")|
importCpg | Create new project from existing CPG| importCpg("cpg.bin.zip") |
open | Open project | open("projectName") |
project | Currently active project | project |
reloadPolicy| reload policy | reloadPolicy |
run | Run analyzer on active CPG | run.securityprofile |
save | Write all changes to disk | save |
undo | undo effects of analyzer | undo |
workspace | Access to the workspace directory | workspace |workspace
The Workspace object - see Organizing Projects
List available projects in workspace and see which one is open
Reset workspace and delete all projects and CPGs
importCode
Create code property graph from code and create a new project in the workspace for it.
List available language frontends
Import code - guessing programming language
Import code using a specific language frontend
Import code from string
importCpg
Import Code Property Graph for analysis
cpg
Cpg of the active project
project
Currently active project
open
Open project by name
close
Close project by name
save
Write all changes to disk
delete
Close project and remove it from disk
run
List available layer creators that can be run to enhance the graph. The command
run.$nameexecutes the layer creator named$name.run($query)runs the$queryas a custom layer creator, e.g.,run(cpg.method.newTagNode("foo"))applies the tag "foo" to all methods.
undo
Undo effects of analyzer
regenerateCacheOnNextLoad
Applies to Ocular only
create new policy cache on next load/import
use e.g. if you edited the policy text files - on first usage they are being converted to an efficient binary format, which is being cached
reloadPolicy
Applies to Ocular only
Reload policies
config
Print the Ocular installation path
version
Print the Ocular version
banner
Print the 1337 Ocular banner
Last updated
Was this helpful?