Skip to content

tommiu/python-joern_mirror

Folders and files

NameName
Last commit message
Last commit date
Jul 27, 2014
Oct 8, 2015
Oct 7, 2015
Sep 24, 2015
Sep 8, 2015
Dec 7, 2013
Sep 15, 2015
Aug 13, 2015
Aug 13, 2015

Repository files navigation

python-joern

Introduction

A thin python interface for joern and a set of useful utility traversals.

Dependencies:

Installation

$ sudo pip2 install git+git://github.com/fabsx00/python-joern.git

Example

The following is a simple sample script. It connects to the database and runs a gremlin traversal to retrieve all node with attribute 'functionName' set to 'main'.


from joern.all import JoernSteps

j = JoernSteps()

j.setGraphDbURL('http://localhost:7474/db/data/')

# j.addStepsDir('Use this to inject custom steps')

j.connectToDatabase()

res =  j.runGremlinQuery('g.idx("nodeIndex")[[functionName:"main"]]')

for r in res:
    print r