georgia-tech-db / sqlfuzz

SQLAlchemy-based Fuzzer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

SQLAlchemy-based Fuzzer

License:Apache License 2.0


Languages

Language:Python 73.6%Language:C++ 24.1%Language:PLpgSQL 1.3%Language:XSLT 0.5%Language:Makefile 0.3%Language:M4 0.2%Language:Shell 0.0%