Skip to content

Commit fb30501

Browse files
added sleeps
1 parent 0701aba commit fb30501

File tree

8 files changed

+16
-0
lines changed

8 files changed

+16
-0
lines changed

c2/cli/basic.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ func backgroundResponse(ch *channel.Channel, wg *sync.WaitGroup, conn net.Conn,
4949
// below. I that that's tolerable for now.
5050
responseCh <- string(responseBuffer[:bytesRead])
5151
}
52+
time.Sleep(10 * time.Millisecond)
5253
}
5354
}
5455

@@ -83,6 +84,7 @@ func Basic(conn net.Conn, ch *channel.Channel) {
8384
output.PrintShell(response)
8485
default:
8586
}
87+
time.Sleep(10 * time.Millisecond)
8688
}
8789
}(ch)
8890

@@ -109,6 +111,7 @@ func Basic(conn net.Conn, ch *channel.Channel) {
109111

110112
break
111113
}
114+
time.Sleep(10 * time.Millisecond)
112115
}
113116
}(ch)
114117

c2/httpservefile/httpservefile.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ func (httpServer *Server) Run(timeout int) {
265265

266266
break
267267
}
268+
time.Sleep(10 * time.Millisecond)
268269
}
269270
}()
270271
// Handle timeouts
@@ -292,6 +293,7 @@ func (httpServer *Server) Run(timeout int) {
292293

293294
break
294295
}
296+
time.Sleep(10 * time.Millisecond)
295297
}
296298
}()
297299
// Handle timeouts

c2/httpserveshell/httpserveshell.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ package httpserveshell
3333
import (
3434
"flag"
3535
"sync"
36+
"time"
3637
"sync/atomic"
3738

3839
"github.com/vulncheck-oss/go-exploit/c2/channel"
@@ -139,6 +140,7 @@ func (serveShell *Server) Run(timeout int) {
139140

140141
break
141142
}
143+
time.Sleep(10 * time.Millisecond)
142144
}
143145
}()
144146
// Spin up the shell
@@ -155,6 +157,7 @@ func (serveShell *Server) Run(timeout int) {
155157

156158
break
157159
}
160+
time.Sleep(10 * time.Millisecond)
158161
}
159162
}()
160163
} else {
@@ -168,6 +171,7 @@ func (serveShell *Server) Run(timeout int) {
168171

169172
break
170173
}
174+
time.Sleep(10 * time.Millisecond)
171175
}
172176
}()
173177
}

c2/httpshellserver/httpshellserver.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ func (httpServer *Server) Run(timeout int) {
244244

245245
break
246246
}
247+
time.Sleep(10 * time.Millisecond)
247248
}
248249
}()
249250
// Handle timeouts
@@ -271,6 +272,7 @@ func (httpServer *Server) Run(timeout int) {
271272

272273
break
273274
}
275+
time.Sleep(10 * time.Millisecond)
274276
}
275277
}()
276278
// Handle timeouts

c2/shelltunnel/shelltunnel.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ func (shellTunnel *Server) Run(timeout int) {
191191

192192
break
193193
}
194+
time.Sleep(10 * time.Millisecond)
194195
}
195196
}()
196197

@@ -214,6 +215,7 @@ func (shellTunnel *Server) Run(timeout int) {
214215
// but may not be immediately clear.
215216
shellTunnel.Channel().AddSession(&client, client.RemoteAddr().String())
216217
go handleTunnelConn(client, shellTunnel.ConnectBackHost, shellTunnel.ConnectBackPort, shellTunnel.ConnectBackSSL, shellTunnel.channel)
218+
time.Sleep(10 * time.Millisecond)
217219
}
218220
}
219221

c2/simpleshell/simpleshellclient.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ func (shellClient *Client) Run(timeout int) {
8484

8585
break
8686
}
87+
time.Sleep(10 * time.Millisecond)
8788
}
8889
}()
8990

c2/simpleshell/simpleshellserver.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ func (shellServer *Server) Run(timeout int) {
107107

108108
break
109109
}
110+
time.Sleep(10 * time.Millisecond)
110111
}
111112
}()
112113
// Accept arbitrary connections. In the future we need something for the

c2/sslshell/sslshellserver.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ func (shellServer *Server) Run(timeout int) {
154154

155155
break
156156
}
157+
time.Sleep(10 * time.Millisecond)
157158
}
158159
}()
159160
// Accept arbitrary connections. In the future we need something for the

0 commit comments

Comments
 (0)