Skip to content

Instantly share code, notes, and snippets.

@GamePlayer-8
Created June 27, 2023 12:18
Show Gist options
  • Save GamePlayer-8/f9c2dd8337b977f53d96d5a923cb1051 to your computer and use it in GitHub Desktop.
Save GamePlayer-8/f9c2dd8337b977f53d96d5a923cb1051 to your computer and use it in GitHub Desktop.
Example CodeQ script
# Comment
!catch core
VARIABLE = [ test test2 ]
RAM_VARIABLE = VARIABLE[0]
SWAP_VARIABLE = []
DISK_VARIABLE = [] # get
:print 'Done' # I/O Output
INPUT = :input 'test 2' # I/O Input
:ifc [RAM_VARIABLE &= SWAP_VARIABLE && SWAP_VARIABLE && &! DISK_VARIABLE &? VARIABLE] [
':print \'Matching Success \' + :str:0'
]
:matchc VARIABLE [[], ':null'] [':print \'OK\'', ':print null', ':print \'ELSE\'']
:run [70, 3]
:codec ':print:\'Code from string\'' # Script code from string
:shellc 'echo \'test\'' # Run app
:outc 0 # Shutdown the script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment