Skip to content

Commit 2cc31b8

Browse files
committed
rename project
1 parent 5cdc8e1 commit 2cc31b8

File tree

8 files changed

+42
-42
lines changed

8 files changed

+42
-42
lines changed

Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ FROM golang:1.21-alpine as builder
33
RUN mkdir /app
44
ADD . /app
55
WORKDIR /app
6-
RUN go build -o ctlog ./cmd/...
7-
RUN chmod +x ./ctlog
8-
ENTRYPOINT ["/app/ctlog"]
6+
RUN go build -o crtsher ./cmd/...
7+
RUN chmod +x ./crtsher
8+
ENTRYPOINT ["/app/crtsher"]

README.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![Go version](https://img.shields.io/badge/Go-v1.21-blue.svg) [![Contribute](https://img.shields.io/badge/Contribute-Welcome-green.svg)](CONTRIBUTING.md)
22

3-
# ctlog
3+
# crtsher
44

55
A tool used to grab domains from certificate transparency logs (crt.sh).
66

@@ -11,21 +11,21 @@ Unlike other tools that often make a single request to crt.sh, this tool is desi
1111
## Installation
1212

1313
```bash
14-
go get github.com/root4loot/ctlog@latest
14+
go get github.com/root4loot/crtsher@latest
1515
```
1616

1717
## Docker
1818

1919
```bash
20-
git clone https://github.com/root4loot/ctlog
21-
cd ctlog
20+
git clone https://github.com/root4loot/crtsher
21+
cd crtsher
2222
docker run --rm -it $(docker build -q .) example.com
2323
```
2424

2525
## Usage
2626

2727
```bash
28-
Usage: ctlog [options] <domain | orgname>
28+
Usage: crtsher [options] <domain | orgname>
2929
-f, --file <file> Specify input file containing targets, one per line.
3030
-t, --timeout <seconds> Set the timeout for each request (default: 90).
3131
-c, --concurrency <number> Set the number of concurrent requests (default: 3).
@@ -37,21 +37,21 @@ Search Query Identity:
3737
- Organization Name
3838

3939
Examples:
40-
ctlog example.com
41-
ctlog "Hackerone Inc"
42-
ctlog --file domains.txt
40+
crtsher example.com
41+
crtsher "Hackerone Inc"
42+
crtsher --file domains.txt
4343
```
4444

4545
## Example Running
4646

4747
```bash
48-
$ ctlog example.com
49-
[ctlog] (INF) Querying example.com
50-
[ctlog] (RES) www.example.org
51-
[ctlog] (RES) hosted.jivesoftware.com
52-
[ctlog] (RES) uat3.hosted.jivesoftware.com
53-
[ctlog] (RES) www.example.com
54-
[ctlog] (RES) example.com
48+
$ crtsher example.com
49+
[crtsher] (INF) Querying example.com
50+
[crtsher] (RES) www.example.org
51+
[crtsher] (RES) hosted.jivesoftware.com
52+
[crtsher] (RES) uat3.hosted.jivesoftware.com
53+
[crtsher] (RES) www.example.com
54+
[crtsher] (RES) example.com
5555
```
5656

5757
## As a Library

cmd/main.go

+10-10
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ import (
77
"os"
88
"strings"
99

10-
"github.com/root4loot/ctlog"
10+
"github.com/root4loot/crtsher"
1111
"github.com/root4loot/goutils/domainutil"
1212
"github.com/root4loot/goutils/fileutil"
1313
"github.com/root4loot/goutils/log"
1414
)
1515

1616
const (
17-
AppName = "ctlog"
17+
AppName = "crtsher"
1818
Version = "0.1.0"
1919
)
2020

@@ -23,7 +23,7 @@ func init() {
2323
}
2424

2525
const usage = `
26-
Usage: ctlog [options] <domain | orgname>
26+
Usage: crtsher [options] <domain | orgname>
2727
-f, --file <file> Specify input file containing targets, one per line.
2828
-t, --timeout <seconds> Set the timeout for each request (default: 90).
2929
-c, --concurrency <number> Set the number of concurrent requests (default: 3).
@@ -35,14 +35,14 @@ Search Query Identity:
3535
- Organization Name
3636
3737
Examples:
38-
ctlog example.com
39-
ctlog "Hackerone Inc"
40-
ctlog --file domains.txt
38+
crtsher example.com
39+
crtsher "Hackerone Inc"
40+
crtsher --file domains.txt
4141
`
4242

4343
func main() {
4444
inputList, opts, err := parseCLI()
45-
runner := ctlog.NewRunnerWithOptions(opts)
45+
runner := crtsher.NewRunnerWithOptions(opts)
4646

4747
if err != nil {
4848
if err.Error() == "version" {
@@ -69,7 +69,7 @@ func main() {
6969

7070
}
7171

72-
func processResults(runner *ctlog.Runner, target ...string) {
72+
func processResults(runner *crtsher.Runner, target ...string) {
7373
go runner.RunMultipleAsync(target)
7474

7575
printed := make(map[string]bool)
@@ -93,12 +93,12 @@ func processResults(runner *ctlog.Runner, target ...string) {
9393
}
9494
}
9595

96-
func parseCLI() ([]string, *ctlog.Options, error) {
96+
func parseCLI() ([]string, *crtsher.Options, error) {
9797
var version, help bool
9898
var inputFilePath string
9999
var inputList []string
100100

101-
opts := *ctlog.DefaultOptions()
101+
opts := *crtsher.DefaultOptions()
102102

103103
flag.StringVar(&inputFilePath, "f", "", "")
104104
flag.StringVar(&inputFilePath, "file", "", "")

ctlog.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package ctlog
1+
package crtsher
22

33
import (
44
"context"
@@ -55,7 +55,7 @@ type Result struct {
5555
var seen map[string]bool // map of seen domains
5656

5757
func init() {
58-
log.Init("ctlog")
58+
log.Init("crtsher")
5959
}
6060

6161
func DefaultOptions() *Options {
@@ -65,7 +65,7 @@ func DefaultOptions() *Options {
6565
Concurrency: 3,
6666
Timeout: int(timeout.Seconds()),
6767
Delay: 2,
68-
UserAgent: "ctlog",
68+
UserAgent: "crtsher",
6969
Debug: false,
7070
HTTPClient: &http.Client{
7171
Transport: &http.Transport{

examples/multiple/multiple.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ package main
33
import (
44
"fmt"
55

6-
"github.com/root4loot/ctlog"
6+
"github.com/root4loot/crtsher"
77
)
88

99
func main() {
10-
options := &ctlog.Options{
10+
options := &crtsher.Options{
1111
Concurrency: 2,
1212
Timeout: 90,
1313
Delay: 2,
1414
DelayJitter: 1,
15-
UserAgent: "ctlog",
15+
UserAgent: "crtsher",
1616
}
1717

18-
runner := ctlog.NewRunnerWithOptions(options)
18+
runner := crtsher.NewRunnerWithOptions(options)
1919
results := runner.RunMultiple([]string{"example.com", "Hackerone Inc"})
2020
for _, result := range results {
2121
for _, res := range result {

examples/multipleAsync/multipleAsync.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ package main
33
import (
44
"fmt"
55

6-
"github.com/root4loot/ctlog"
6+
"github.com/root4loot/crtsher"
77
)
88

99
func main() {
1010
targets := []string{"Hackerone Inc", "example.com", "google.com"}
1111

12-
runner := ctlog.NewRunner()
12+
runner := crtsher.NewRunner()
1313

14-
runner.Options = &ctlog.Options{
14+
runner.Options = &crtsher.Options{
1515
Concurrency: len(targets),
1616
Timeout: 90,
1717
Delay: 2,
18-
UserAgent: "ctlog",
18+
UserAgent: "crtsher",
1919
Debug: true,
2020
}
2121

examples/single/single.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ package main
33
import (
44
"fmt"
55

6-
"github.com/root4loot/ctlog"
6+
"github.com/root4loot/crtsher"
77
)
88

99
func main() {
10-
runner := ctlog.NewRunner()
10+
runner := crtsher.NewRunner()
1111

1212
results := runner.Run("example.com")
1313
for _, result := range results {

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/root4loot/ctlog
1+
module github.com/root4loot/crtsher
22

33
go 1.21.1
44

0 commit comments

Comments
 (0)