Skip to content
This repository has been archived by the owner on Dec 25, 2022. It is now read-only.

Commit

Permalink
fix unused dnsworkers flag, update defaults, fix not updated files
Browse files Browse the repository at this point in the history
  • Loading branch information
erkexzcx committed Mar 3, 2022
1 parent 4769233 commit 3620a18
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ Default value is `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (

## dnsworkers

Configuration via command line argument `-dnsworkers 5000` or via environment variable `SP_DNSWORKERS=5000`.
Configuration via command line argument `-dnsworkers 100` or via environment variable `SP_DNSWORKERS=100`.

Default value of `5000` means that there will be a pool of 5000 workers that will DOS all the defined DNS servers.
Default value of `100` means that there will be a pool of 100 workers that will DOS all the defined DNS servers.

## dnstimeout

Expand Down
4 changes: 2 additions & 2 deletions docker-compose-tor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ services:
ports:
- "8049:8049/tcp"
environment:
SP_WORKERS: "20"
SP_WORKERS: "1000"
SP_TIMEOUT: "10s"
SP_DNSWORKERS: "100"
SP_DNSTIMEOUT: "125ms"
SP_DNSTIMEOUT: "1s"
SP_USERAGENT: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36"
HTTPS_PROXY: http://tor:8118
ulimits:
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ services:
ports:
- "8049:8049/tcp"
environment:
SP_WORKERS: "20"
SP_WORKERS: "1000"
SP_TIMEOUT: "10s"
SP_DNSWORKERS: "100"
SP_DNSTIMEOUT: "125ms"
SP_DNSTIMEOUT: "1s"
SP_USERAGENT: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36"
ulimits:
nofile:
Expand Down
2 changes: 1 addition & 1 deletion internal/stoppropaganda/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func startDNS() {
dnsChannel := make(chan *DNSServer, *flagDNSWorkers)

// Spawn workers
for i := 0; i < *flagWorkers; i++ {
for i := 0; i < *flagDNSWorkers; i++ {
go runDNSWorker(dnsChannel)
}

Expand Down
2 changes: 1 addition & 1 deletion internal/stoppropaganda/stoppropaganda.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var (
flagBind = fs.String("bind", ":8049", "bind on specific host:port")
flagWorkers = fs.Int("workers", 1000, "DOS each website with this amount of workers")
flagTimeout = fs.Duration("timeout", 10*time.Second, "timeout of HTTP request")
flagDNSWorkers = fs.Int("dnsworkers", 5000, "DOS each DNS server with this amount of workers")
flagDNSWorkers = fs.Int("dnsworkers", 100, "DOS each DNS server with this amount of workers")
flagDNSTimeout = fs.Duration("dnstimeout", time.Second, "timeout of DNS request")
flagUserAgent = fs.String("useragent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36", "User agent used in HTTP requests")
)
Expand Down
4 changes: 2 additions & 2 deletions stoppropaganda.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ spec:
- name: SP_BIND
value: ":8049"
- name: SP_WORKERS
value: "20"
value: "1000"
- name: SP_TIMEOUT
value: "10s"
- name: SP_DNSWORKERS
value: "100"
- name: SP_DNSTIMEOUT
value: "125ms"
value: "1s"
- name: SP_USERAGENT
value: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36"

0 comments on commit 3620a18

Please sign in to comment.