Skip to content

Commit

Permalink
Add fixes before release
Browse files Browse the repository at this point in the history
  • Loading branch information
PumpkinSeed committed Mar 14, 2021
1 parent cfc8be4 commit 0c690aa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ go install main.go
### Usage

```
# MySQL
sqlfuzz -u username -p password -d database -h 127.0.0.1 -t table -n 100000 -w 100
# Postgres
sqlfuzz -u username -p password -d database -h 127.0.0.1 -t table -n 100000 -w 100 -P 5432 -D postgres
```

#### Flags
Expand All @@ -56,7 +60,7 @@ sqlfuzz -u username -p password -d database -h 127.0.0.1 -t table -n 100000 -w 1
- `d`: Database name for database connection
- `h`: Host for database connection
- `P`: Port for database connection
- `D`: Driver for database connection (currently only `mysql`)
- `D`: Driver for database connection (supported: `mysql`, `postgres`)
- `t`: Table for fuzzing
- `n`: Number of rows to fuzz
- `w`: Concurrent workers to work on fuzzing
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
func main() {
f := flags.Get()
gofakeit.Seed(0)
driver := drivers.New(flags.Get().Driver)
driver := drivers.New(f.Driver)
db := connector.Connection(driver)
defer db.Close()

Expand Down
2 changes: 1 addition & 1 deletion pkg/flags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func parse() {
flag.StringVar(&f.Driver.Username, "u", "", "Username for the database connection")
flag.StringVar(&f.Driver.Password, "p", "", "Password for the database connection")
flag.StringVar(&f.Driver.Database, "d", "", "Database of the database connection")
flag.StringVar(&f.Driver.Host, "h", "", "Host for the database connection")
flag.StringVar(&f.Driver.Host, "h", "localhost", "Host for the database connection")
flag.StringVar(&f.Driver.Port, "P", "3306", "Port for the database connection")
flag.StringVar(&f.Driver.Driver, "D", "mysql", "Driver for the database connection (mysql, postgres, etc.)")
flag.StringVar(&f.Table, "t", "", "Table for fuzzing")
Expand Down

0 comments on commit 0c690aa

Please sign in to comment.