Skip to content

Commit 3342861

Browse files
authored
Update README.md
1 parent 428cda9 commit 3342861

1 file changed

Lines changed: 19 additions & 15 deletions

File tree

README.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ go get github.com/003random/getJS
2222

2323
# Usage
2424
Note: When you supply urls from different sources, e.g. with stdin and an input file, it will add all the urls together :)
25-
Example: `echo "https://github.com" | getJS -url=https://example.com -input=domains.txt`
25+
Example: `echo "https://github.com" | getJS --url https://example.com --input domains.txt`
2626

2727
To get all options, do:
2828
```bash
@@ -32,13 +32,17 @@ getJS -h
3232

3333
| Flag | Description | Example |
3434
|------|-------------|---------|
35-
| -url | The url to get the javascript sources from | getJS -url=htt<span></span>ps://poc-server.com |
36-
| -input | Input file with urls | getJS -input=domains.txt |
37-
| -output | The file where to save the output to | getJS -output=output.txt |
38-
| -verbose | Display info of what is going on | getJS -verbose |
39-
| -complete | Complete the urls. e.g. /js/index.js -> htt<span></span>ps://example.<span></span>com/js/index.js | getJS -complete |
40-
| -resolve | Resolve the output and filter out the non existing files (Can only be used in combination with -complete) | getJS -complete -resolve |
41-
| -nocolors | Don't color the output | getJS -nocolors |
35+
| --url | The url to get the javascript sources from | getJS --url https://poc-server.com |
36+
| --method | The request method. e.g. POST or GET. Default: "GET"| getJS --url https://poc-server.com --method POST |
37+
| --timeout | The request timeout. Default: 10 (secs) | getJS --url https://poc-server.com --timeout 15 |
38+
| --insecure | Skip SSL certificate verification. Use when the cert is expired or invalid | getJS --url https://poc-server.com --insecure |
39+
| --header | Custom request header(s). -H "Authorization: Bearer token" | getJS --url https://poc-server.com --insecure |
40+
| --input | Input file with urls | getJS --input domains.txt |
41+
| --output | The file where to save the output to | getJS --output output.txt |
42+
| --verbose | Display info of what is going on | getJS --verbose |
43+
| --complete | Complete the urls. e.g. /js/index.js -> htt<span></span>ps://example.<span></span>com/js/index.js | getJS --complete |
44+
| --resolve | Resolve the output and filter out the non existing files (Can only be used in combination with --complete) | getJS --complete --resolve |
45+
| --nocolors | Don't color the output | getJS --nocolors |
4246

4347
## Examples
4448

@@ -53,32 +57,32 @@ $ cat domains.txt | getJS
5357

5458
To save the js files, you can use:
5559
```bash
56-
$ getJS -url=https://poc-server.com | xargs wget
60+
$ getJS --url https://poc-server.com | xargs wget
5761
```
5862

5963
If you would like the output to be in JSON format, you can combine it with [@Tomnomnom's](https://github.com/tomnomnom) [toJSON](https://github.com/tomnomnom/hacks/tree/master/tojson):
6064
```bash
61-
$ getJS -url=https://poc-server.com | tojson
65+
$ getJS --url https://poc-server.com | tojson
6266
```
6367

6468
To feed urls from a file use:
6569
```bash
66-
$ getJS -input=domains.txt
70+
$ getJS --input domains.txt
6771
```
6872

6973
To save the results to a file, and don't display anything, use:
7074
```bash
71-
$ getJS -url=https://poc-server.com -output=results.txt
75+
$ getJS --url https://poc-server.com --output results.txt
7276
```
7377

7478
If you want to have a list of full urls as output use:
7579
```bash
76-
$ getJS -url=domains.txt -complete
80+
$ getJS --url domains.txt -complete
7781
```
7882

7983
If you want to only show the existing js files, use:
8084
```bash
81-
$ getJS -url=domains.txt -complete -resolve
85+
$ getJS --url domains.txt --complete --resolve
8286
```
8387

8488
## Built With
@@ -102,4 +106,4 @@ This project is licensed under the MIT License.
102106

103107
---
104108

105-
*This is my first tool written in GO. I created it to learn the language more. Please don't hate on my coding style xD (useful feeback is always welcome!)*
109+
*This is my first tool written in GO. I created it to learn the language more. (useful feeback is always welcome!)*

0 commit comments

Comments
 (0)