Tobias Begalke há 8 anos atrás
commit
29cc79f712
2 ficheiros alterados com 80 adições e 0 exclusões
  1. 44 0
      fingerprint.go
  2. 36 0
      request_data.go

+ 44 - 0
fingerprint.go

@@ -0,0 +1,44 @@
+package data
+
+import (
+	"time"
+
+	"git.scraperwall.com/scw/geoip"
+	"git.scraperwall.com/scw/grs"
+)
+
+type Fingerprint struct {
+	// ID                  bson.ObjectId `bson:"_id,omitempty" json:"_id"`
+	Remote              string        `bson:"remote" json:"remote" form:"remote"`
+	Url                 string        `bson:"url" json:"url" form:"url"`
+	UserAgent           string        `bson:"user_agent" json:"user_agent" form:"user_agent"`
+	Adblock             bool          `bson:"adblock" json:"adblock" form:"adblock"`
+	AvailableResolution []int         `bson:"available_resolution" json:"available_resolution" form:"available_resolution"`
+	Canvas              string        `bson:"canvas" json:"canvas" form:"canvas"`
+	ColorDepth          int           `bson:"color_depth" json:"color_depth" form:"color_depth"`
+	CpuClass            string        `bson:"cpu_class" json:"cpu_class" form:"cpu_class"`
+	DoNotTrack          string        `bson:"do_not_track" json:"do_not_track" form:"don_not_track"`
+	Fingerprint         string        `bson:"fingerprint" json:"fingerprint" form:"fingerprint"`
+	HasLiedBrowser      bool          `bson:"has_lied_browser" json:"has_lied_browser" form:"has_lied_browser"`
+	HasLiedLanguages    bool          `bson:"has_lied_languages" json:"has_lied_languages" form:"has_lied_languages"`
+	HasLiedOs           bool          `bson:"has_lied_os" json:"has_lied_os" form:"has_lied_os"`
+	HasLiedResolution   bool          `bson:"has_lied_resolution" json:"has_lied_resolution" form:"has_lied_resolution"`
+	IndexedDb           int           `bson:"indexed_db" json:"indexed_db" form:"indexed_db"`
+	JsFonts             []string      `bson:"js_fonts" json:"js_fonts" form:"js_fonts"`
+	Language            string        `bson:"language" json:"language" form:"language"`
+	LocalStorage        int           `bson:"local_storage" json:"local_storage" form:"local_storage"`
+	NavigatorPlatform   string        `bson:"navigator_platform" json:"navigator_platform" form:"navigator_platform"`
+	Plugins             []string      `bson:"regular_plugins" json:"regular_plugins" form:"regular_plugins"`
+	Resolution          []int         `bson:"resolution" json:"resolution" form:"resolution"`
+	SessionStorage      int           `bson:"session_storage" json:"session_storage" form:"session_storage"`
+	TouchSupport        []interface{} `bson:"touch_support" json:"touch_support" form:"touch_support"`
+	WebGl               string        `bson:"webgl" json:"webgl" form:"webgl"`
+	TimeZoneOffset      int           `bson:"timezone_offset" json:"timezone_offset" form:"timezone_offset"`
+	CreatedAt           time.Time     `bson:"created_at" json:"created_at" form:"created_at"`
+	Source              string        `bson:"source" json:"source" form:"source"`
+	XForwardedFor       string        `bson:"x_forwarded_for" json:"x-forwarded-for" form:"x_forwarded_for"`
+	XRealIP             string        `bson:"x_real_ip" json:"x-real-ip" form:"x_real_ip"`
+	XScwIP              string        `bson:"x_scw_ip" json:"x-scw-ip" form:"x_scw_ip"`
+	Grs                 *grs.GRS      `bson:"grs" json:"grs" form:"grs"`
+	GeoIP               *geoip.GeoIP  `bson:"geoip" json:"geoip" form:"geoip"`
+}

+ 36 - 0
request_data.go

@@ -0,0 +1,36 @@
+package data
+
+import (
+	"time"
+
+	"git.scraperwall.com/scw/grs"
+)
+
+type RequestData struct {
+	ID             string                 `bson:"_id,omitempty" json:"_id,omitempty"`
+	Connection     string                 `bson:"connection" json:"connection"`
+	IpDst          string                 `bson:"ip_dst" json:"ip_dst"`
+	TcpSeq         int                    `bson:"tcp_seq" json:"tcp_seq"`
+	XForwardedFor  string                 `bson:"x_forwarded_for" json:"x_forwarded_for"`
+	XRealIP        string                 `bson:"x_real_ip" json:"x_real_ip"`
+	Origin         string                 `bson:"origin" json:"origin"`
+	PortDst        int                    `bson:"port_dst" json:"port_dst"`
+	Referer        string                 `bson:"referer" json:"referer"`
+	XRequestedWith string                 `bson:"x_requested_with" json:"x_requested_with"`
+	PortSrc        int                    `bson:"port_src" json:"port_src"`
+	Url            string                 `bson:"url" json:"url"`
+	Reverse        string                 `bson:"reverse" json:"reverse"`
+	AcceptEncoding string                 `bson:"accept_encoding" json:"accept_encoding"`
+	AcceptLanguage string                 `bson:"accept_language" json:"accept_language"`
+	CreatedAt      time.Time              `bson:"created_at" json:"created_at"`
+	IpSrc          string                 `bson:"ip_src" json:"ip_src"`
+	Method         string                 `bson:"method" json:"method"`
+	UserAgent      string                 `bson:"user_agent" json:"user_agent"`
+	Accept         string                 `bson:"accept" json:"accept"`
+	Cookie         string                 `bson:"cookie" json:"cookie"`
+	Host           string                 `bson:"host" json:"host"`
+	Protocol       string                 `bson:"protocol" json:"protocol"`
+	Source         string                 `bson:"source" json:"source"`
+	DataRaw        map[string]interface{} `bson:"data_raw" json:"data_raw"`
+	Grs            grs.GRS                `bson:"grs" json:"grs"`
+}