m0m0x01d 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/file.html +15 -7
  2. package/package.json +1 -1
package/file.html CHANGED
@@ -7,13 +7,21 @@
7
7
  <title>Redirecting...</title>
8
8
  <script>
9
9
  window.onload = function() {
10
- // Get the 'redir' parameter from the query string
11
- const urlParams = new URLSearchParams(window.location.search);
12
- const redirectUrl = urlParams.get('redir');
13
-
14
- // If 'redir' is present, redirect to the provided URL
15
- if (redirectUrl) {
16
- window.location.href = redirectUrl;
10
+ // Get the full URL
11
+ const fullUrl = window.location.href;
12
+
13
+ // Extract the 'redir' parameter manually
14
+ const urlParams = fullUrl.split("?")[1];
15
+ if (urlParams) {
16
+ const params = new URLSearchParams(urlParams);
17
+ const redirectUrl = params.get('redir');
18
+
19
+ // Check if redir parameter exists and is a valid URL
20
+ if (redirectUrl) {
21
+ window.location.href = decodeURIComponent(redirectUrl);
22
+ } else {
23
+ document.body.innerHTML = "<h1>Error: No redirection URL provided or invalid!</h1>";
24
+ }
17
25
  } else {
18
26
  document.body.innerHTML = "<h1>Error: No redirection URL provided!</h1>";
19
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "m0m0x01d",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "ssrf",
5
5
  "main": "index.html",
6
6
  "scripts": {