Skip to content

georgia-tech-db/sqlfuzz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sqlfuzz

Currently uploaded to test index on pypi. To install: pip install -i https://test.pypi.org/simple/ sqlfuzz

Environment Setup

  • Install postgresql-12 (https://www.postgresql.org/download/)
  • Use your own data or to run the demo, download demo data from dropbox and unzip it to data folder
  • Start postgresql server with data folder: pg_ctl -D ./data start
    • If you install postgresql-12 from apt, stop it via sudo systemctl stop postgresql.service and give permission to the lock file via sudo chmod o+w /var/run/postgresql

Quick Start

To run sqlfuzz, simply do

from sqlfuzz import test_driver

if __name__ == '__main__':
  fuzz_args = test_driver.FuzzArgs(
      output={OUTPUT_DIR},
      dbconf={DB_CONFIG_PATH},
  )
  test_driver.main(fuzz_args)

A sample config file looks like:

{"name": "demo100", "tables": ["bonus", "emp", "dept"], "max_table": 3, "max_column": 16}

Note