fingerprint.go 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. package data
  2. import (
  3. "time"
  4. "git.scraperwall.com/scw/geoip"
  5. "git.scraperwall.com/scw/grs"
  6. "github.com/scraperwall/asndb"
  7. )
  8. type Fingerprint struct {
  9. // ID bson.ObjectId `bson:"_id,omitempty" json:"_id"`
  10. ClientID string `bson:"cid" json:"cid" form:"cid"`
  11. Remote string `bson:"remote" json:"remote" form:"remote"`
  12. Url string `bson:"url" json:"url" form:"url"`
  13. Fingerprint string `bson:"fp" json:"fp" form:"fp"`
  14. CreatedAt time.Time `bson:"created_at" json:"created_at" form:"created_at"`
  15. Source string `bson:"source" json:"source" form:"source"`
  16. XForwardedFor string `bson:"x_forwarded_for" json:"x-forwarded-for" form:"x_forwarded_for"`
  17. XRealIP string `bson:"x_real_ip" json:"x-real-ip" form:"x_real_ip"`
  18. XScwIP string `bson:"x_scw_ip" json:"x-scw-ip" form:"x_scw_ip"`
  19. Grs *grs.GRS `bson:"grs" json:"grs" form:"grs"`
  20. GeoIP *geoip.GeoIP `bson:"geoip" json:"geoip" form:"geoip"`
  21. Data map[string]interface{} `bson:"data" json:"data" form:"data"`
  22. Bot bool `bson:"bot" json:"b" form:"b"`
  23. ASN *asndb.ASN `bson:"asn" json:"asn" form:"asn"`
  24. Country string `bson:"country" json:"country" form:"country"`
  25. //UserAgent string `bson:"user_agent" json:"user_agent" form:"user_agent"`
  26. //Adblock bool `bson:"adblock" json:"adblock" form:"adblock"`
  27. //AvailableResolution []int `bson:"available_resolution" json:"available_resolution" form:"available_resolution"`
  28. //Canvas string `bson:"canvas" json:"canvas" form:"canvas"`
  29. //ColorDepth int `bson:"color_depth" json:"color_depth" form:"color_depth"`
  30. //CpuClass string `bson:"cpu_class" json:"cpu_class" form:"cpu_class"`
  31. //DoNotTrack string `bson:"do_not_track" json:"do_not_track" form:"don_not_track"`
  32. //HasLiedBrowser bool `bson:"has_lied_browser" json:"has_lied_browser" form:"has_lied_browser"`
  33. //HasLiedLanguages bool `bson:"has_lied_languages" json:"has_lied_languages" form:"has_lied_languages"`
  34. //HasLiedOs bool `bson:"has_lied_os" json:"has_lied_os" form:"has_lied_os"`
  35. //HasLiedResolution bool `bson:"has_lied_resolution" json:"has_lied_resolution" form:"has_lied_resolution"`
  36. //IndexedDb int `bson:"indexed_db" json:"indexed_db" form:"indexed_db"`
  37. //JsFonts []string `bson:"js_fonts" json:"js_fonts" form:"js_fonts"`
  38. //Language string `bson:"language" json:"language" form:"language"`
  39. //LocalStorage int `bson:"local_storage" json:"local_storage" form:"local_storage"`
  40. //NavigatorPlatform string `bson:"navigator_platform" json:"navigator_platform" form:"navigator_platform"`
  41. //Plugins []string `bson:"regular_plugins" json:"regular_plugins" form:"regular_plugins"`
  42. //Resolution []int `bson:"resolution" json:"resolution" form:"resolution"`
  43. //SessionStorage int `bson:"session_storage" json:"session_storage" form:"session_storage"`
  44. //TouchSupport []interface{} `bson:"touch_support" json:"touch_support" form:"touch_support"`
  45. //WebGl string `bson:"webgl" json:"webgl" form:"webgl"`
  46. //TimeZoneOffset int `bson:"timezone_offset" json:"timezone_offset" form:"timezone_offset"`
  47. }