mirror of
https://github.com/bettercap/bettercap
synced 2025-07-06 04:52:10 -07:00
Update dns_proxy_js_query.go
This commit is contained in:
parent
086eed49d5
commit
c8c1072cc0
1 changed files with 8 additions and 0 deletions
|
@ -324,3 +324,11 @@ func (j *JSQuery) WasModified() bool {
|
||||||
// check if any of the fields has been changed
|
// check if any of the fields has been changed
|
||||||
return j.NewHash() != j.refHash
|
return j.NewHash() != j.refHash
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (j *JSQuery) CheckIfModifiedAndUpdateHash() bool {
|
||||||
|
// check if query was changed and update its hash
|
||||||
|
newHash := j.NewHash()
|
||||||
|
wasModified := j.refHash != newHash
|
||||||
|
j.refHash = newHash
|
||||||
|
return wasModified
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue