Documentation ¶
Index ¶
- Constants
- type Database
- func (d *Database) AddCertInfo(line []byte) error
- func (d *Database) Close() error
- func (d *Database) FlushCertInfo() error
- func (d *Database) GetCertByID(id primitive.ObjectID) (bson.M, error)
- func (d *Database) GetCertsByIDs(ids []primitive.ObjectID) ([]bson.M, error)
- func (d *Database) GetUntransvalidatedCerts() (*mongo.Cursor, error)
- func (d *Database) GetUnvalidatedCerts() (*mongo.Cursor, error)
- func (d *Database) InsertCert(cert interface{}, getID bool) (interface{}, error)
- func (d *Database) SetCertValidation(id primitive.ObjectID, validRoots map[string]struct{}) error
- func (d *Database) SetScanValidation(id primitive.ObjectID, isValid bool, transvalid bool) error
- type ZGrabResponse
Constants ¶
View Source
const ALLCERT_COL = "allCerts"
View Source
const BUFFER_SIZE = 650
View Source
const CERT_DB = "tls-observatory"
View Source
const CREDS_FILE = "output/dbcreds.json"
View Source
const SCANINFO_COL = "scanInfo"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct { ScanInfo *mongo.Collection AllCerts *mongo.Collection // contains filtered or unexported fields }
func CreateDatabase ¶
func OpenDatabase ¶
func (*Database) AddCertInfo ¶
expects a line of json Buffers the insert
func (*Database) FlushCertInfo ¶
func (*Database) GetCertByID ¶
func (*Database) GetCertsByIDs ¶
func (*Database) GetUntransvalidatedCerts ¶
func (*Database) GetUnvalidatedCerts ¶
func (*Database) InsertCert ¶
func (*Database) SetCertValidation ¶
type ZGrabResponse ¶
type ZGrabResponse struct { ID *interface{} `json:"_id" bson:"_id"` Domain *string `json:"domain" bson:"domain"` IP *string `json:"ip" bson:"ip"` Data *struct { TLS *struct { Timestamp string `json:"timestamp" bson:"timestamp"` Status string `json:"status" bson:"status"` Error string `json:"error" bson:"error"` Result *struct { HandshakeLog *struct { ServerCertificates *struct { Certificate *interface{} `json:"certificate" bson:"certificate"` Chain *[]interface{} `json:"chain" bson:"chain"` } `json:"server_certificates" bson:"server_certificates"` } `json:"handshake_log" bson:"handshake_log"` } `json:"result" bson:"result"` } `json:"tls" bson:"tls"` } `json:"data" bson:"data"` }
Click to show internal directories.
Click to hide internal directories.