Skip to content

Commit

Permalink
🔨 update configs
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-mizu committed May 16, 2024
1 parent b5d9f31 commit dd8a1e6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 27 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ https://github.com/kevin-mizu/domloggerpp/assets/48991194/0827eef3-6c16-42fc-b84
- `Domains`: Easily manage allowed domains, similar to the functionality in the popup menu.
- `Webhook`: Specify a remote host that will receive logs based on your configuration settings.
- `Devtools`: If you're using a backend server and prefer not to display information in your devtool panel, this section lets you disable that feature.
- `Table`: Personalize the devtools tables to align with your preferences.
- `Customize`: Personalize the application's theme to align with your preferences.

<br>
Expand All @@ -110,12 +111,12 @@ https://github.com/kevin-mizu/domloggerpp/assets/48991194/0827eef3-6c16-42fc-b84
"config": {
"*": {},
"sink_1": {
"match": [ "regex_1", "regex_2" ],
"!match": [ "regex_1", "regex_2" ],
"match": [ "regex_1", "regex_2", "exec:return 'regex_3'" ],
"!match": [ "regex_1", "regex_2", "exec:return 'regex_3'" ],
"hookFunction": "return args",
"alert": {
"match": [ "regex_1", "regex_2" ],
"!match": [ "regex_1", "regex_2" ],
"match": [ "regex_1", "regex_2", "exec:return 'regex_3'" ],
"!match": [ "regex_1", "regex_2", "exec:return 'regex_3'" ],
"notification": true
}
}
Expand Down Expand Up @@ -150,6 +151,8 @@ https://github.com/kevin-mizu/domloggerpp/assets/48991194/0827eef3-6c16-42fc-b84
+ `match` & `!match`: Additional regular expressions that the sink parameters must respect to or avoid, respectively, in order to trigger the alert.
+ `notification`: If set to `true`, a notification popup will appear when all conditions are satisfied.

Since version `1.0.4`, it is now possible to use the `exec:` regex directive, which allows you to generate a regex from JavaScript execution. For instance: `exec:return document.location.pathname`.

*For more detailed examples and insights, please refer to the [examples](./examples/) folder.*

<br>
Expand Down
27 changes: 13 additions & 14 deletions configs/dom-invader.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
"hooks": {
"DOM": {
"attribute": [
"Element.prototype.innerHTML",
"Element.prototype.outerHTML",
"HTMLAnchorElement.prototype.href",
"HTMLButtonElement.prototype.formAction",
"HTMLFormElement.prototype.action",
"HTMLIFrameElement.prototype.src",
"HTMLIFrameElement.prototype.srcdoc",
"HTMLInputElement.prototype.formAction",
"HTMLScriptElement.prototype.innerHTML",
"HTMLScriptElement.prototype.innerText",
"HTMLScriptElement.prototype.text",
"HTMLScriptElement.prototype.textContent",
"HTMLScriptElement.prototype.src"
"set:Element.prototype.innerHTML",
"set:Element.prototype.outerHTML",
"set:HTMLAnchorElement.prototype.href",
"set:HTMLButtonElement.prototype.formAction",
"set:HTMLFormElement.prototype.action",
"set:HTMLIFrameElement.prototype.src",
"set:HTMLIFrameElement.prototype.srcdoc",
"set:HTMLInputElement.prototype.formAction",
"set:HTMLScriptElement.prototype.innerHTML",
"set:HTMLScriptElement.prototype.innerText",
"set:HTMLScriptElement.prototype.text",
"set:HTMLScriptElement.prototype.textContent",
"set:HTMLScriptElement.prototype.src"
],
"function": [
"Element.prototype.insertAdjacentHTML",
Expand Down Expand Up @@ -80,7 +80,6 @@
"function": [
"document.implementation.createHTMLDocument",
"execScript",
"JSON.parse",
"msSetImmediate",
"navigator.serviceWorker.register",
"Range.prototype.createContextualFragment",
Expand Down
9 changes: 0 additions & 9 deletions examples/misc.json

This file was deleted.

0 comments on commit dd8a1e6

Please sign in to comment.