Skip to content

Commit 579d209

Browse files
committed
Adds all the stuff I've been meaning to commit
1 parent 974f6d1 commit 579d209

File tree

8 files changed

+61
-144
lines changed

8 files changed

+61
-144
lines changed

assetfinder/README.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# assetfinder
2+
3+
## TODO:
4+
* http://api.passivetotal.org/api/docs/
5+
* https://findsubdomains.com
6+
* https://community.riskiq.com/ (?)
7+
* https://riddler.io/
8+
* http://www.dnsdb.org/
9+
* https://certdb.com/api-documentation

jobqueue/main.go

-138
This file was deleted.

jsstrings/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

jsstrings/index.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ if (fn == ""){
99
}
1010

1111
fs.readFile(fn, "utf8", function(err, data) {
12-
for (let token of acorn.tokenizer(data)) {
12+
// TODO: Trim the strings
13+
for (let token of acorn.tokenizer(data,{
14+
onComment: function(block, text, start, end){
15+
console.log(text);
16+
}
17+
})) {
1318
if (token.type == acorn.tokTypes.string){
1419
console.log(token.value);
1520
}

jsstrings/testdata/broken.js

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jsstrings/testdata/simple.js

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
var dbl = "bar";
2+
var single = 'foo';
3+
var concat = 'foo' + 'bar';
4+
// comment 'with string'
5+
// in "it"
6+
// and `templates`
7+
var template = `foo bar`;
8+
var doubleWithEscaped = "hello \" there \\";
9+
/*
10+
* comment block
11+
* with 'single' and "double" and `template`
12+
* */
13+
var singleWithEscaped = 'hello \' there \\';
14+
var templateWithEscaped = `hello \` there \\`;
15+
var dev = 123 / 234;
16+
var regex = /foo?['"]\/bar/;
17+
var regexes = [/foo?['"]\/bar/, "must be in output"];
18+
var another = 'another string';
19+

urinteresting/main.go

+7
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ import (
99
"strings"
1010
)
1111

12+
// Ideas:
13+
// More than, say, 3 query string parameteres (exluding utm_*?)
14+
// Popular app names (phpmyadmin etc) in path
15+
// Filenames from configfiles list / seclist
16+
// dev/stage/test in path or hostname
17+
// jenkins, graphite etc in hostname or path
18+
1219
type urlCheck func(*url.URL) bool
1320

1421
func main() {

urlteamdl/main.go

+11-5
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,25 @@ type file struct {
1919
func main() {
2020
flag.Parse()
2121

22-
since := flag.Arg(0)
23-
if since == "" {
22+
sinceStr := flag.Arg(0)
23+
if sinceStr == "" {
2424
fmt.Println("usage: urlteamdl <sinceISODate>")
2525
return
2626
}
2727

28+
sinceTime, err := time.Parse("2006-01-02", sinceStr)
29+
if err != nil {
30+
fmt.Println("invalid date! try e.g. 2017-10-26")
31+
return
32+
}
33+
2834
req, err := http.NewRequest("GET", searchURL, nil)
2935
if err != nil {
3036
fmt.Println(err)
3137
return
3238
}
3339

40+
since := sinceTime.Format("2006-01-02")
3441
today := time.Now().Format("2006-01-02")
3542

3643
q := req.URL.Query()
@@ -65,7 +72,7 @@ func main() {
6572
}
6673

6774
for _, d := range wrapper.Response.Docs {
68-
files, err := getFiles(d.Identifier)
75+
files, err := getDownloadURLs(d.Identifier)
6976
if err != nil {
7077
fmt.Println(err)
7178
continue
@@ -80,7 +87,7 @@ func main() {
8087
}
8188
}
8289

83-
func getFiles(ident string) ([]file, error) {
90+
func getDownloadURLs(ident string) ([]file, error) {
8491

8592
res, err := http.Get(fmt.Sprintf(metaURL, ident))
8693
if err != nil {
@@ -96,5 +103,4 @@ func getFiles(ident string) ([]file, error) {
96103
err = dec.Decode(wrapper)
97104

98105
return wrapper.Files, err
99-
100106
}

0 commit comments

Comments
 (0)