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
SecureJS is a powerful tool designed to collect all related links from a target website, perform requests on these links (primarily JavaScript files), and scan for sensitive information such as tokens, keys, passwords, AKSKs, and more.
4
+
5
+
## Table of Contents
6
+
7
+
-[SecureJS](#securejs)
8
+
-[Table of Contents](#table-of-contents)
9
+
-[Features](#features)
10
+
-[Usage](#usage)
11
+
-[Example](#example)
12
+
-[Configuration](#configuration)
13
+
-[Sample `config.yaml`](#sample-configyaml)
14
+
-[Loading Configuration](#loading-configuration)
15
+
-[Project Structure](#project-structure)
16
+
17
+
## Features
18
+
19
+
-**Comprehensive Crawling**: Simulates browser visits to collect all links and JavaScript files from the target.
20
+
-**Secondary Requests**: Performs additional requests on collected resources for deeper analysis.
21
+
-**Customizable Matching Rules**: Supports custom rules defined in `config.yaml` to identify sensitive information.
22
+
-**Flexible Output Formats**: Outputs results in CSV, JSON, or plain text formats.
23
+
-**Easy Configuration**: Simplifies setup and customization through a configuration file.
24
+
25
+
## Usage
26
+
27
+
SecureJS can be executed via the command line with various options to customize its behavior.
28
+
29
+
### Example
30
+
31
+
```bash
32
+
./SecureJS -u https://example.com -o results.csv
33
+
```
34
+
```bash
35
+
./SecureJS -l targets.txt -o results.csv -t 30
36
+
```
37
+
## Configuration
38
+
39
+
SecureJS uses a `config.yaml` file to define custom matching rules and other project-level configurations.
The configuration is automatically loaded from the `config/config.yaml` file. Ensure that your custom rules are correctly defined to match the sensitive information you aim to identify.
61
+
62
+
## Project Structure
63
+
64
+
```
65
+
SecureJS/
66
+
├── cmd/
67
+
│ └── root.go # Entry point for command-line arguments handling (-u, -l, -t, etc.)
68
+
│
69
+
├── internal/
70
+
│ ├── crawler/
71
+
│ │ ├── crawler.go # Crawler logic, simulates browser access, collects all links and JS files
72
+
│ │ └── linkfind.go # Extracts all links and JS from the response body of the target page
73
+
│ │
74
+
│ ├── parser/
75
+
│ │ └── parser.go # Performs secondary requests on all collected links and JS files
76
+
│ │
77
+
│ ├── matcher/
78
+
│ │ └── matcher.go # Reads and parses custom rules from config.yaml and matches against response bodies
79
+
│ │
80
+
│ └── output/
81
+
│ └── output.go # Outputs results to files in CSV, JSON, or text formats
82
+
│
83
+
├── config/
84
+
│ ├── config.go # Handles loading and parsing of the configuration file (config.yaml)
85
+
│ └── config.yaml # Custom rules and other project-level configurations
86
+
│
87
+
├── go.mod # Go Modules management file
88
+
├── go.sum # Go Modules checksum file
89
+
└── main.go # Main program entry point, initializes and starts the application
SecureJS is a powerful tool designed to collect all related links from a target website, perform requests on these links (primarily JavaScript files), and scan for sensitive information such as tokens, keys, passwords, AKSKs, and more.
The configuration is automatically loaded from the `config/config.yaml` file. Ensure that your custom rules are correctly defined to match the sensitive information you aim to identify.
0 commit comments