Skip to content

Commit f8ac739

Browse files
authored
Update README.md
1 parent f251a78 commit f8ac739

File tree

1 file changed

+60
-30
lines changed

1 file changed

+60
-30
lines changed

README.md

Lines changed: 60 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,77 @@
1-
# JSMon
2-
JSMon - JavaScript Change Monitor for BugBounty
1+
# JSMonWin
2+
JSMonWin - JavaScript Change Monitor for BugBounty in Windows
33

44
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.
55

6-
![](telegram.png)
6+
![](static/telegram.png)
77

8-
![](diff.png)
8+
![](static/diff.png)
99

1010
## Installation
1111

1212
To install JSMon:
1313
```bash
14-
git clone https://github.com/robre/jsmon.git
15-
cd jsmon
14+
git clone https://github.com/sl4x0/jsmonwin.git
15+
cd jsmonwin
1616
python setup.py install
1717
```
1818
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`
2020
With The Contents:
2121
```
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
2828
```
2929
To Enable slack, uncomment the slack lines in the env and add your token.
3030

31-
To create a cron script to run JSMon regularly:
32-
```
33-
crontab -e
34-
```
31+
## To create a task to run JSMonWin regularly
3532

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**:
4153

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."
4455

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).
4675

4776

4877
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
5180
```
5281
echo "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.js" >> targets/cdnjs-example
5382
```
54-
All done ! now you can run `python jsmon.py` to download the specified files for the first time!
83+
All done ! now you can run `python jsmonwin.py` to download the specified files for the first time!
5584

5685
## Features
5786

58-
- Keep Track of endpoints - check them in a configurable interval (using cron)
87+
- Keep Track of endpoints - check them in a configurable interval (using Task Schedular)
5988
- when endpoints change - send a notification via Telegram or Slack
6089

6190

62-
6391
## Usage
6492

6593
- Provide Endpoints via files in `targets/` directory (line seperated endpoints)
@@ -68,13 +96,15 @@ All done ! now you can run `python jsmon.py` to download the specified files for
6896
- Every endpoint gets downloaded and stored in downloads/ with its hash as file name (first 10 chars of md5 hash)
6997
- if it already exists nothing changes
7098
- if it is changed, user gets notified
71-
- jsmon.json keeps track of which endpoints are associated with which filehashes
99+
- jsmonwin.json keeps track of which endpoints are associated with which filehashes
72100

73-
- jsmon is designed to keep track of javascript files on websites - but it can be used for any filetype to add endpoints
101+
- jsmonwin is designed to keep track of javascript files on websites - but it can be used for any filetype to add endpoints
74102

75103

76104
## Contributors
77105
[@r0bre](https://twitter.com/r0bre) - Core
78106

79107
[@Yassineaboukir](https://twitter.com/Yassineaboukir) - Slack Notifications
80108

109+
[@sl4x0](https://x.com/sl4x0) - Windows Modification Version
110+

0 commit comments

Comments
 (0)