You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JSMonWin - JavaScript Change Monitor for BugBounty in Windows
3
3
4
4
Using this script, you can configure a number of JavaScript files on websites that you want to monitor. Everytime you run this script, these files will be fetched and compared to the previously fetched version. If they have changed, you will be notified via Telegram with a message containing a link to the script, the changed filesizes, and a diff file to inspect the changes easily.
5
5
6
-

6
+

7
7
8
-

8
+

9
9
10
10
## Installation
11
11
12
12
To install JSMon:
13
13
```bash
14
-
git clone https://github.com/robre/jsmon.git
15
-
cdjsmon
14
+
git clone https://github.com/sl4x0/jsmonwin.git
15
+
cdjsmonwin
16
16
python setup.py install
17
17
```
18
18
You need to set up your Slack or Telegram token in the Environment, e.g. by creating a `.env` File:
19
-
`touch .env`
19
+
`vscode => New File => .env`
20
20
With The Contents:
21
21
```
22
-
JSMON_NOTIFY_TELEGRAM=True
23
-
JSMON_TELEGRAM_TOKEN=YOUR TELEGRAM TOKEN
24
-
JSMON_TELEGRAM_CHAT_ID=YOUR TELEGRAM CHAT ID
25
-
#JSMON_NOTIFY_SLACK=True
26
-
#JSMON_SLACK_TOKEN=sometoken
27
-
#JSMON_SLACK_CHANNEL_ID=somechannel
22
+
JSMONWIN_NOTIFY_TELEGRAM=True
23
+
JSMONWIN_TELEGRAM_TOKEN=YOUR TELEGRAM TOKEN
24
+
JSMONWIN_TELEGRAM_CHAT_ID=YOUR TELEGRAM CHAT ID
25
+
#JSMONWIN_NOTIFY_SLACK=True
26
+
#JSMONWIN_SLACK_TOKEN=sometoken
27
+
#JSMONWIN_SLACK_CHANNEL_ID=somechannel
28
28
```
29
29
To Enable slack, uncomment the slack lines in the env and add your token.
30
30
31
-
To create a cron script to run JSMon regularly:
32
-
```
33
-
crontab -e
34
-
```
31
+
## To create a task to run JSMonWin regularly
35
32
36
-
create an entry like this:
37
-
```
38
-
@daily /path/to/jsmon.sh
39
-
```
40
-
Note that you should run the `.sh` file, because otherwise the environment will be messed up.
33
+
On Windows, you can use the Task Scheduler app to schedule the execution of a PowerShell script (`.ps1`) in a manner similar to creating a cron job on Unix-based systems. Here are the steps to create a scheduled task in Task Scheduler to run your PowerShell script daily:
34
+
35
+
1.**Open Task Scheduler**:
36
+
37
+
- Press `Win + R` to open the Run dialog.
38
+
- Type `taskschd.msc` and press Enter.
39
+
40
+
2.**Create a New Task**:
41
+
42
+
- In the Task Scheduler window, navigate to the "Task Scheduler Libaray" pane on the left and click on "Create Basic Task..."
43
+
44
+
3.**Name and Description**:
45
+
46
+
- Provide a name and description for the task, then click "Next."
47
+
48
+
4.**Trigger**:
49
+
50
+
- Choose "Daily" and click "Next."
51
+
52
+
5.**Daily Trigger Settings**:
41
53
42
-
This will run JSMon once a day, at midnight.
43
-
You can change ``@daily`` to whatever schedule suits you.
54
+
- Set the start day and time. You can also choose to recur every 1 day, which will make it a daily task. Click "Next."
44
55
45
-
To configure Telegram notifications, you need to add your Telegram API key and chat_id to the code, at the start of `jsmon.py`. You can read how to get these values [here](https://blog.r0b.re/automation/bash/2020/06/30/setup-telegram-notifications-for-your-shell.html).
56
+
6.**Action**:
57
+
58
+
- Select "Start a program" and click "Next."
59
+
60
+
7.**Program/script**:
61
+
62
+
- Browse to the location of your PowerShell executable, typically `C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe`.
63
+
- In the "Add arguments" field, provide the path to your PowerShell script, e.g., `"C:\Path\To\YourScript.ps1"`. Make sure to enclose the script path in double quotes.
64
+
65
+
66
+
After creating the task, you can test it by right-clicking on the task in the Task Scheduler and selecting "Run." This will execute the task immediately.
67
+
68
+
The equivalent of `@daily` in a cron job schedule is achieved by configuring the task to recur daily in Task Scheduler.
69
+
70
+
71
+
---
72
+
73
+
74
+
To configure Telegram notifications, you need to add your Telegram API key and chat_id to the code, at the start of `jsmonwin.py`. You can read how to get these values [here](https://blog.r0b.re/automation/bash/2020/06/30/setup-telegram-notifications-for-your-shell.html).
46
75
47
76
48
77
Note, for Slack Support, you need to set up your slack app correctly and use the slack oauth token.
@@ -51,15 +80,14 @@ Lastly, you need to get started with some targets that you want to monitor. Lets
0 commit comments