vulsio / go-exploitdb

Tool for searching Exploits from Exploit Databases, etc.
MIT License
250 stars 55 forks source link

Batch-Size as property #202

Open flashpixx opened 6 months ago

flashpixx commented 6 months ago

What did you do?

Integrate the Fetcher and Search option into my program by using the SQLite database. I would like to use go-exploitdb as library in an own program with SQLite database for offline usage

What did you expect to happen?

I get an error batch-size option is not set properly

Steps to reproduce the behaviour

See the line the batch-size is set by an environment variable / argument flag and not by a property of the RDBDriver struct.

Solution Suggestion

Add to the Option struct a property batchSize: uint and use it instead of the viper.GetInt("batch-size") call and it would be nice to provide a default value.

Configuration:

flashpixx commented 6 months ago

add PR to fix it