fixed db query and export
This commit is contained in:
@@ -38,6 +38,10 @@ type Result struct {
|
||||
DatabaseName string `json:"database_name,omitempty" xml:"database_name,omitempty" yaml:"database_name,omitempty"`
|
||||
}
|
||||
|
||||
func (Result) TableName() string {
|
||||
return "results"
|
||||
}
|
||||
|
||||
type DehashedResults struct {
|
||||
Results []Result `json:"results"`
|
||||
}
|
||||
|
||||
@@ -69,6 +69,10 @@ type QueryOptions struct {
|
||||
CredsOnly bool `json:"creds_only"`
|
||||
}
|
||||
|
||||
func (QueryOptions) TableName() string {
|
||||
return "query_options"
|
||||
}
|
||||
|
||||
func NewQueryOptions(maxRecords, maxRequests, startingPage int, outputFormat, outputFile, usernameQuery, emailQuery, ipQuery, passQuery, hashQuery, nameQuery, domainQuery, vinQuery, licensePlateQuery, addressQuery, phoneQuery, socialQuery, cryptoAddressQuery string, regexMatch, wildcardMatch, printBalance, credsOnly bool) *QueryOptions {
|
||||
return &QueryOptions{
|
||||
MaxRecords: maxRecords,
|
||||
@@ -103,6 +107,10 @@ type Creds struct {
|
||||
Password string `json:"password" yaml:"password" xml:"password"`
|
||||
}
|
||||
|
||||
func (Creds) TableName() string {
|
||||
return "creds"
|
||||
}
|
||||
|
||||
func (c Creds) ToString() string {
|
||||
return fmt.Sprintf("%s%s%s", c.Username, "%", c.Password)
|
||||
}
|
||||
|
||||
@@ -38,6 +38,10 @@ type WhoisRecord struct {
|
||||
UpdatedDateNormalized string `json:"updatedDateNormalized"`
|
||||
}
|
||||
|
||||
func (WhoisRecord) TableName() string {
|
||||
return "whois"
|
||||
}
|
||||
|
||||
type Audit struct {
|
||||
CreatedDate string `json:"createdDate"`
|
||||
UpdatedDate string `json:"updatedDate"`
|
||||
@@ -105,6 +109,10 @@ type SubdomainRecord struct {
|
||||
LastSeen int64 `json:"lastSeen"`
|
||||
}
|
||||
|
||||
func (SubdomainRecord) TableName() string {
|
||||
return "subdomains"
|
||||
}
|
||||
|
||||
type WhoIsHistory struct {
|
||||
RemainingCredits int `json:"remaining_credits"`
|
||||
Data HistoryData `json:"data"`
|
||||
@@ -139,6 +147,10 @@ type HistoryRecord struct {
|
||||
ZoneContact ContactInfo `json:"zoneContact" gorm:"serializer:json"`
|
||||
}
|
||||
|
||||
func (HistoryRecord) TableName() string {
|
||||
return "history"
|
||||
}
|
||||
|
||||
type ContactInfo struct {
|
||||
City string `json:"city"`
|
||||
Country string `json:"country"`
|
||||
|
||||
Reference in New Issue
Block a user