Skip to content

Commit 5be9dc0

Browse files
committed
Fixed minor pipe test failure and added go.mod file.
1 parent 853222a commit 5be9dc0

File tree

3 files changed

+36
-2
lines changed

3 files changed

+36
-2
lines changed

go.mod

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module github.com/Binject/backdoorfactory
2+
3+
go 1.14
4+
5+
require (
6+
github.com/Binject/binjection v0.0.0-20191205221130-3927f970a61f
7+
github.com/Binject/debug v0.0.0-20190929072709-9846938ecdec // indirect
8+
github.com/Binject/shellcode v0.0.0-20191101084904-a8a90e7d4563
9+
github.com/akamensky/argparse v1.2.1
10+
github.com/fatih/color v1.9.0 // indirect
11+
github.com/h2non/filetype v1.1.0
12+
)

go.sum

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
github.com/Binject/binjection v0.0.0-20191205221130-3927f970a61f h1:wMX2JpPTdxj4l8Gp5K5Cg+rIEH+Dz66mPmF0JftpoZg=
2+
github.com/Binject/binjection v0.0.0-20191205221130-3927f970a61f/go.mod h1:q8QKD0q91rhE0ufjGDCaAEtHCYJwGaMkr22Yb9QRx08=
3+
github.com/Binject/debug v0.0.0-20190929072709-9846938ecdec h1:Ueu7+7zwf+GFoj5kYfRHK+iFe/IOPHpBGU1pw6eFxNE=
4+
github.com/Binject/debug v0.0.0-20190929072709-9846938ecdec/go.mod h1:6WgJ7mEG7ngJkNwwDkEVreDk2dPGg3oqdI6OEWaeDNg=
5+
github.com/Binject/shellcode v0.0.0-20191101084904-a8a90e7d4563 h1:T8z8Wz/fqaPPANF8Unv4LjWLoa0TAvsjYAsRpvSkOqs=
6+
github.com/Binject/shellcode v0.0.0-20191101084904-a8a90e7d4563/go.mod h1:HMbzsKPz1sF7H4Hmeovh+d2PH2iKPYpAB4XMOVz8wmM=
7+
github.com/akamensky/argparse v1.2.1 h1:YMYF1VMku+dnz7TVTJpYhsCXHSYCVMAIcKaBbjwbvZo=
8+
github.com/akamensky/argparse v1.2.1/go.mod h1:S5kwC7IuDcEr5VeXtGPRVZ5o/FdhcMlQz4IZQuw64xA=
9+
github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s=
10+
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
11+
github.com/h2non/filetype v1.1.0 h1:Or/gjocJrJRNK/Cri/TDEKFjAR+cfG6eK65NGYB6gBA=
12+
github.com/h2non/filetype v1.1.0/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy1HndBY=
13+
github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA=
14+
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
15+
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
16+
github.com/mattn/go-isatty v0.0.11 h1:FxPOTFNqGkuDUGi3H/qkUbQO4ZiBa2brKq5r0l8TGeM=
17+
github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
18+
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
19+
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 h1:YyJpGZS1sBuBCzLAR1VEpK193GlqGZbnPFnPV/5Rsb4=
20+
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=

pipeinject_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"testing"
1111
"time"
1212

13+
"github.com/Binject/shellcode"
1314
"github.com/Binject/binjection/bj"
1415
)
1516

@@ -56,12 +57,13 @@ func Test_Pipe_Elf_Inject_1(t *testing.T) {
5657
dryPipe := MakePipe(namedPipe + "dry")
5758
wetPipe := MakePipe(namedPipe + "wet")
5859

59-
config := &bj.BinjectConfig{CodeCaveMode: false}
60+
repo := shellcode.NewRepo("test")
61+
config := &bj.BinjectConfig{Repo:repo, CodeCaveMode: false}
6062

6163
go ListenPipeDry(dryPipe, config)
6264
go ListenPipeWet(wetPipe)
6365

64-
dryBytes, err := ioutil.ReadFile("test/static_ls")
66+
dryBytes, err := ioutil.ReadFile(filepath.Join("test","static_ls"))
6567
if err != nil {
6668
t.Fatal(err)
6769
}

0 commit comments

Comments
 (0)