Future victi.ms microservice. This is a work in progress.
The idea is to increase the scalability and development of the Web service by having a code base that only deals with service calls.
- API can be updated / deployed without modifying the Web UI
- API and Web can scale horizontally according to their specific needs
- API Version become releases rather than holding over multiple versions in a single code base
- API and Web can use different technologies
$ git clone https://github.com/victims/victims-api
$ go clean
$ go build -a ./...
$ go build -a .
First import some data. The quickest way is to import the test data from test/mongo_test_hash.json
:
$ mongoimport -d victims -c hashes test/mongo_test_hash.json
Then run the victims-api
binary:
$ ./victims-api --BindAddress="127.0.0.1" --BindPort=8080 --MongoDatabase=victims --MongoURI=mongodb://127.0.0.1/
Usage of ./victims-api:
--BindAddress="127.0.0.1": Bind address.
--BindHttpsPort=0: HTTPS bind port.
--BindPort=8080: HTTP bind port.
--CertFile="": Cert file.
--KeyFile="": Key file.
--LogFile="": Log file.
--LogLevel="info": Log level.
--MaxHeaderBytes=1048576: Max header bytes.
--MongoDatabase="victims": MongoDB database
--MongoURI="mongodb://127.0.0.1/": MongoDB server URI
--ReadTimeout=10s: Read timeout.
--WriteTimeout=10s: Write timeout.
Product view of hashes.
Partially implemented
GET /service/v3/product/{name}/
- version: A specific version to query for. If used with endversion then it is the starting version.
- endversion: The last version in a version range.
Shows what groups are available.
GET /service/v3/groups/
Implemented
None
Provides CVE information.
GET /service/v3/cve/{id}/
None
Returns a specific Hash instance
Partially implemented
GET /service/v3/hash/{hash}/
None
Syncing hash data to clients
GET /service/v3/sync/{since}/
None
Inspect hashes and return Hash instances if found
PUT /service/v3/inspect/{group}/
["hash", "hash", "..."]
Returns all known coordinates
Partially implemented
GET /service/v3/coordinates/
None