fingerprint.go 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. Extra map[string]string `bson:"extra" json:"extra" form:"extra"`
  26. //UserAgent string `bson:"user_agent" json:"user_agent" form:"user_agent"`
  27. //Adblock bool `bson:"adblock" json:"adblock" form:"adblock"`
  28. //AvailableResolution []int `bson:"available_resolution" json:"available_resolution" form:"available_resolution"`
  29. //Canvas string `bson:"canvas" json:"canvas" form:"canvas"`
  30. //ColorDepth int `bson:"color_depth" json:"color_depth" form:"color_depth"`
  31. //CpuClass string `bson:"cpu_class" json:"cpu_class" form:"cpu_class"`
  32. //DoNotTrack string `bson:"do_not_track" json:"do_not_track" form:"don_not_track"`
  33. //HasLiedBrowser bool `bson:"has_lied_browser" json:"has_lied_browser" form:"has_lied_browser"`
  34. //HasLiedLanguages bool `bson:"has_lied_languages" json:"has_lied_languages" form:"has_lied_languages"`
  35. //HasLiedOs bool `bson:"has_lied_os" json:"has_lied_os" form:"has_lied_os"`
  36. //HasLiedResolution bool `bson:"has_lied_resolution" json:"has_lied_resolution" form:"has_lied_resolution"`
  37. //IndexedDb int `bson:"indexed_db" json:"indexed_db" form:"indexed_db"`
  38. //JsFonts []string `bson:"js_fonts" json:"js_fonts" form:"js_fonts"`
  39. //Language string `bson:"language" json:"language" form:"language"`
  40. //LocalStorage int `bson:"local_storage" json:"local_storage" form:"local_storage"`
  41. //NavigatorPlatform string `bson:"navigator_platform" json:"navigator_platform" form:"navigator_platform"`
  42. //Plugins []string `bson:"regular_plugins" json:"regular_plugins" form:"regular_plugins"`
  43. //Resolution []int `bson:"resolution" json:"resolution" form:"resolution"`
  44. //SessionStorage int `bson:"session_storage" json:"session_storage" form:"session_storage"`
  45. //TouchSupport []interface{} `bson:"touch_support" json:"touch_support" form:"touch_support"`
  46. //WebGl string `bson:"webgl" json:"webgl" form:"webgl"`
  47. //TimeZoneOffset int `bson:"timezone_offset" json:"timezone_offset" form:"timezone_offset"`
  48. }