report.go 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. package mitmengine
  2. import (
  3. fp "github.com/cloudflare/mitmengine/fputil"
  4. )
  5. // A Report contains mitm detection results for a request.
  6. type Report struct {
  7. // MatchedUASignature is the matched browser user agent signature
  8. MatchedUASignature string
  9. // BrowserSignature is the signature of the matched browser
  10. BrowserSignature string
  11. // BrowserSignatureMatch is the match result of the actual fingerprint
  12. // versus the browser signature
  13. BrowserSignatureMatch fp.Match
  14. // Reason for mismatch between actual fingerprint and expected signature
  15. Reason string
  16. // ReasonDetails supplied additional details for the above reason
  17. ReasonDetails string
  18. // BrowserGrade is the expected security grade for the browser without interference
  19. BrowserGrade fp.Grade
  20. // Actual security grade of the request
  21. ActualGrade fp.Grade
  22. // WeakCiphers is true if the request contains weak ciphers
  23. WeakCiphers bool
  24. // LosesPfs is true if a MITM causes the request to lose perfect
  25. // forward secrecy
  26. LosesPfs bool
  27. // MatchedMitmSignature is the signature of the MITM software if matched
  28. MatchedMitmSignature string
  29. // MatchedMitmName is the name of the MITM software if matched
  30. MatchedMitmName string
  31. // MatchedMitmType classification of the MITM software if matched
  32. MatchedMitmType uint8
  33. // Error is set if the user agent does not indicate a supported browser, or
  34. // does not match any known user agent signature
  35. Error error
  36. }