зеркало из https://github.com/mozilla/mig.git
[major] reorganize repository structure for `go get mig.ninja/mig`
This is a major change to the structure of the repository and the Makefile, but a minor change in terms of functionalities. It simply changes the structure of the directories to be compliant with Go's idiomatic build methods. I also bought the domain `mig.ninja` and will now be using that as a standard import path for everything. The magic to serve everything under mig.ninja/mig will be documented elsewhere.
This commit is contained in:
Родитель
a6958d2b51
Коммит
e9aa7febf9
|
@ -5,18 +5,18 @@ bin/*
|
|||
conf/*
|
||||
!conf/*.inc
|
||||
!conf/mig-agent-installer.wxs
|
||||
src/mig/agent/configuration.go
|
||||
src/mig/*/available_modules.go
|
||||
src/mig/*/*/available_modules.go
|
||||
src/mig/*/*/*/available_modules.go
|
||||
agent/configuration.go
|
||||
*/available_modules.go
|
||||
*/*/available_modules.go
|
||||
*/*/*/available_modules.go
|
||||
!conf/available_modules.go
|
||||
*.a
|
||||
*.so
|
||||
*.o
|
||||
!src/mig
|
||||
*.rpm
|
||||
*.deb
|
||||
packages/
|
||||
tmp/
|
||||
src/mig/workers/*/*.html
|
||||
src/mig/modules/*/*.html
|
||||
.builddir/
|
||||
workers/*/*.html
|
||||
modules/*/*.html
|
||||
|
|
80
Makefile
80
Makefile
|
@ -29,16 +29,14 @@ PREFIX := /usr/local/
|
|||
DESTDIR := /
|
||||
BINDIR := bin/$(OS)/$(ARCH)
|
||||
AGTCONF := conf/mig-agent-conf.go.inc
|
||||
AVAILMODS := conf/available_modules.go
|
||||
MSICONF := mig-agent-installer.wxs
|
||||
|
||||
GCC := gcc
|
||||
CFLAGS :=
|
||||
LDFLAGS :=
|
||||
GOOPTS :=
|
||||
GO := GOPATH=$(shell pwd):$(shell go env GOROOT)/bin GOOS=$(OS) GOARCH=$(ARCH) GO15VENDOREXPERIMENT=1 go
|
||||
GO := GOOS=$(OS) GOARCH=$(ARCH) GO15VENDOREXPERIMENT=1 go
|
||||
GOGETTER := GOPATH=$(shell pwd)/.tmpdeps go get -d
|
||||
GOTEST := GOPATH=$(shell pwd) GOOS=$(OS) GOARCH=$(ARCH) GO15VENDOREXPERIMENT=1 go test
|
||||
GOLDFLAGS := -ldflags "-X main.version=$(BUILDREV)"
|
||||
GOCFLAGS :=
|
||||
MKDIR := mkdir
|
||||
|
@ -49,47 +47,55 @@ all: test mig-agent mig-scheduler mig-api mig-cmd mig-console mig-action-generat
|
|||
|
||||
mig-agent:
|
||||
echo building mig-agent for $(OS)/$(ARCH)
|
||||
if [ ! -r $(AGTCONF) ]; then echo "$(AGTCONF) configuration file is missing" ; exit 1; fi
|
||||
cp $(AGTCONF) src/mig/agent/configuration.go
|
||||
if [ ! -r $(AVAILMODS) ]; then echo "$(AVAILMODS) configuration file is missing" ; exit 1; fi
|
||||
cp $(AVAILMODS) src/mig/agent/available_modules.go
|
||||
if [ ! -r $(AGTCONF) ]; then echo "$(AGTCONF) configuration file does not exist" ; exit 1; fi
|
||||
# test if the agent configuration variable contains something different than the default value
|
||||
# and if so, replace the link to the default configuration with the provided configuration
|
||||
if [ $(AGTCONF) != "conf/mig-agent-conf.go.inc" ]; then rm agent/configuration.go; cp $(AGTCONF) agent/configuration.go; fi
|
||||
$(MKDIR) -p $(BINDIR)
|
||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-agent-$(BUILDREV)$(BINSUFFIX) $(GOLDFLAGS) mig/agent
|
||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-agent-$(BUILDREV)$(BINSUFFIX) $(GOLDFLAGS) mig.ninja/mig/agent
|
||||
ln -fs "$$(pwd)/$(BINDIR)/mig-agent-$(BUILDREV)$(BINSUFFIX)" "$$(pwd)/$(BINDIR)/mig-agent-latest"
|
||||
[ -x "$(BINDIR)/mig-agent-$(BUILDREV)$(BINSUFFIX)" ] && echo SUCCESS && exit 0
|
||||
|
||||
mig-scheduler:
|
||||
$(MKDIR) -p $(BINDIR)
|
||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-scheduler $(GOLDFLAGS) mig/scheduler
|
||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-scheduler $(GOLDFLAGS) mig.ninja/mig/scheduler
|
||||
|
||||
mig-api:
|
||||
$(MKDIR) -p $(BINDIR)
|
||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-api $(GOLDFLAGS) mig/api
|
||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-api $(GOLDFLAGS) mig.ninja/mig/api
|
||||
|
||||
mig-action-generator:
|
||||
$(MKDIR) -p $(BINDIR)
|
||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-action-generator $(GOLDFLAGS) mig/client/generator
|
||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-action-generator $(GOLDFLAGS) mig.ninja/mig/client/generator
|
||||
|
||||
mig-action-verifier:
|
||||
$(MKDIR) -p $(BINDIR)
|
||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-action-verifier $(GOLDFLAGS) mig/client/verifier
|
||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-action-verifier $(GOLDFLAGS) mig.ninja/mig/client/verifier
|
||||
|
||||
mig-console:
|
||||
if [ ! -r $(AVAILMODS) ]; then echo "$(AGTCONF) configuration file is missing" ; exit 1; fi
|
||||
cp $(AVAILMODS) src/mig/client/console/available_modules.go
|
||||
$(MKDIR) -p $(BINDIR)
|
||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-console $(GOLDFLAGS) mig/client/console
|
||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-console $(GOLDFLAGS) mig.ninja/mig/client/console
|
||||
|
||||
mig-cmd:
|
||||
if [ ! -r $(AVAILMODS) ]; then echo "$(AGTCONF) configuration file is missing" ; exit 1; fi
|
||||
cp $(AVAILMODS) src/mig/client/cmd/available_modules.go
|
||||
$(MKDIR) -p $(BINDIR)
|
||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-$(OS)$(ARCH) $(GOLDFLAGS) mig/client/cmd
|
||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-$(OS)$(ARCH) $(GOLDFLAGS) mig.ninja/mig/client/cmd
|
||||
ln -fs "$$(pwd)/$(BINDIR)/mig-$(OS)$(ARCH)" "$$(pwd)/$(BINDIR)/mig"
|
||||
|
||||
mig-agent-search:
|
||||
$(MKDIR) -p $(BINDIR)
|
||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-agent-search $(GOLDFLAGS) mig/client/agent-search
|
||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-agent-search $(GOLDFLAGS) mig.ninja/mig/client/agent-search
|
||||
|
||||
worker-agent-verif:
|
||||
$(MKDIR) -p $(BINDIR)
|
||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig_agent_verif_worker $(GOLDFLAGS) mig.ninja/mig/workers/agent_verif
|
||||
|
||||
worker-agent-intel:
|
||||
$(MKDIR) -p $(BINDIR)
|
||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-agent-intel-worker $(GOLDFLAGS) mig.ninja/mig/workers/agent_intel
|
||||
|
||||
worker-compliance-item:
|
||||
$(MKDIR) -p $(BINDIR)
|
||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-compliance-item-worker $(GOLDFLAGS) mig.ninja/mig/workers/compliance_item
|
||||
|
||||
go_vendor_dependencies:
|
||||
GOOS="linux" $(GOGETTER) github.com/bobappleyard/readline
|
||||
|
@ -113,9 +119,9 @@ go_vendor_dependencies:
|
|||
$(GOGETTER) golang.org/x/net/ipv4
|
||||
$(GOGETTER) golang.org/x/net/ipv6
|
||||
$(GOGETTER) gopkg.in/gcfg.v1
|
||||
echo 'removing .git from vendored pkg and moving them to src/mig/vendor'
|
||||
echo 'removing .git from vendored pkg and moving them to vendor'
|
||||
find .tmpdeps/src -type d -name ".git" ! -name ".gitignore" -exec rm -rf {} \; || exit 0
|
||||
cp -ar .tmpdeps/src/* src/mig/vendor/
|
||||
cp -ar .tmpdeps/src/* vendor/
|
||||
rm -rf .tmpdeps
|
||||
|
||||
install: mig-agent mig-scheduler
|
||||
|
@ -262,27 +268,21 @@ deb-server: mig-scheduler mig-api worker-agent-intel worker-compliance-item
|
|||
fpm -C tmp -n mig-server --license GPL --vendor mozilla --description "Mozilla InvestiGator Server" \
|
||||
-m "Mozilla OpSec" --url http://mig.mozilla.org --architecture $(FPMARCH) -v $(BUILDREV) -s dir -t deb .
|
||||
|
||||
worker-agent-verif:
|
||||
$(MKDIR) -p $(BINDIR)
|
||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig_agent_verif_worker $(GOLDFLAGS) mig/workers/agent_verif
|
||||
|
||||
worker-agent-intel:
|
||||
$(MKDIR) -p $(BINDIR)
|
||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-agent-intel-worker $(GOLDFLAGS) mig/workers/agent_intel
|
||||
|
||||
worker-compliance-item:
|
||||
$(MKDIR) -p $(BINDIR)
|
||||
$(GO) build $(GOOPTS) -o $(BINDIR)/mig-compliance-item-worker $(GOLDFLAGS) mig/workers/compliance_item
|
||||
|
||||
doc:
|
||||
make -C doc doc
|
||||
|
||||
test: test-modules
|
||||
#$(GO) test mig/...
|
||||
$(GO) test mig.ninja/mig/agent/...
|
||||
$(GO) test mig.ninja/mig/scheduler/...
|
||||
$(GO) test mig.ninja/mig/api/...
|
||||
$(GO) test mig.ninja/mig/client/...
|
||||
$(GO) test mig.ninja/mig/database/...
|
||||
$(GO) test mig.ninja/mig/workers/...
|
||||
$(GO) test mig.ninja/mig
|
||||
|
||||
test-modules:
|
||||
# test all modules
|
||||
$(GOTEST) mig/modules...
|
||||
$(GO) test mig.ninja/mig/modules/...
|
||||
|
||||
clean-agent:
|
||||
find bin/ -name mig-agent* -exec rm {} \;
|
||||
|
@ -290,10 +290,18 @@ clean-agent:
|
|||
rm -rf tmp
|
||||
|
||||
vet:
|
||||
$(GO) vet mig/...
|
||||
$(GO) vet mig.ninja/mig/agent/...
|
||||
$(GO) vet mig.ninja/mig/scheduler/...
|
||||
$(GO) vet mig.ninja/mig/api/...
|
||||
$(GO) vet mig.ninja/mig/client/...
|
||||
$(GO) vet mig.ninja/mig/modules/...
|
||||
$(GO) vet mig.ninja/mig/database/...
|
||||
$(GO) vet mig.ninja/mig/workers/...
|
||||
$(GO) vet mig.ninja/mig
|
||||
|
||||
clean: clean-agent
|
||||
rm -rf bin
|
||||
rm -rf tmp
|
||||
rm -rf .builddir
|
||||
|
||||
.PHONY: clean clean-agent doc agent-install-script agent-remove-script
|
||||
|
|
|
@ -4,6 +4,11 @@ MIG: Mozilla InvestiGator
|
|||
|
||||
[![Build Status](https://travis-ci.org/mozilla/mig.svg?branch=master)](https://travis-ci.org/mozilla/mig)
|
||||
|
||||
Build one-liner:
|
||||
```bash
|
||||
$ go get mig.ninja/mig && cd $GOPATH/src/mig.ninja/mig && make
|
||||
````
|
||||
|
||||
MIG is OpSec's platform for investigative surgery of remote endpoints.
|
||||
|
||||
MIG is composed of agents installed on all systems of an infrastructure that are
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"mig/pgp"
|
||||
"mig.ninja/mig/pgp"
|
||||
"os"
|
||||
"strconv"
|
||||
"sync"
|
|
@ -9,8 +9,8 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"mig"
|
||||
"mig/pgp"
|
||||
"mig.ninja/mig"
|
||||
"mig.ninja/mig/pgp"
|
||||
"time"
|
||||
)
|
||||
|
|
@ -13,8 +13,8 @@ import (
|
|||
"github.com/jvehent/service-go"
|
||||
"github.com/streadway/amqp"
|
||||
"io/ioutil"
|
||||
"mig"
|
||||
"mig/modules"
|
||||
"mig.ninja/mig"
|
||||
"mig.ninja/mig/modules"
|
||||
"os"
|
||||
"os/exec"
|
||||
"runtime"
|
|
@ -0,0 +1 @@
|
|||
../conf/available_modules.go
|
|
@ -9,7 +9,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"mig"
|
||||
"mig.ninja/mig"
|
||||
"time"
|
||||
|
||||
"gopkg.in/gcfg.v1"
|
|
@ -0,0 +1 @@
|
|||
../conf/mig-agent-conf.go.inc
|
|
@ -18,7 +18,7 @@ import (
|
|||
"github.com/streadway/amqp"
|
||||
"io/ioutil"
|
||||
mrand "math/rand"
|
||||
"mig"
|
||||
"mig.ninja/mig"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
|
@ -8,7 +8,7 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"mig"
|
||||
"mig.ninja/mig"
|
||||
"os"
|
||||
"os/exec"
|
||||
)
|
|
@ -9,7 +9,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"mig"
|
||||
"mig.ninja/mig"
|
||||
"os"
|
||||
"os/exec"
|
||||
)
|
|
@ -8,7 +8,7 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"mig"
|
||||
"mig.ninja/mig"
|
||||
"os"
|
||||
"os/exec"
|
||||
)
|
|
@ -9,7 +9,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"mig"
|
||||
"mig.ninja/mig"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/url"
|
|
@ -9,7 +9,7 @@ package main
|
|||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"mig"
|
||||
"mig.ninja/mig"
|
||||
"os/exec"
|
||||
"strings"
|
||||
)
|
|
@ -10,7 +10,7 @@ import (
|
|||
"bytes"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"mig"
|
||||
"mig.ninja/mig"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
|
@ -10,7 +10,7 @@ import (
|
|||
"bufio"
|
||||
"bytes"
|
||||
"fmt"
|
||||
"mig"
|
||||
"mig.ninja/mig"
|
||||
"os/exec"
|
||||
"strings"
|
||||
)
|
|
@ -10,7 +10,7 @@ import (
|
|||
"bufio"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"mig"
|
||||
"mig.ninja/mig"
|
||||
"net"
|
||||
"os"
|
||||
"strings"
|
|
@ -9,8 +9,8 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/jvehent/cljs"
|
||||
"mig"
|
||||
"mig/pgp"
|
||||
"mig.ninja/mig"
|
||||
"mig.ninja/mig/pgp"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"time"
|
|
@ -8,7 +8,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
"github.com/jvehent/cljs"
|
||||
"mig"
|
||||
"mig.ninja/mig"
|
||||
"net/http"
|
||||
"strconv"
|
||||
)
|
|
@ -11,7 +11,7 @@ import (
|
|||
"github.com/gorilla/context"
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/jvehent/cljs"
|
||||
"mig"
|
||||
"mig.ninja/mig"
|
||||
"net/http"
|
||||
"os"
|
||||
"runtime"
|
|
@ -7,7 +7,7 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"mig"
|
||||
"mig.ninja/mig"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
|
@ -8,9 +8,9 @@ package main
|
|||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"mig"
|
||||
"mig/modules"
|
||||
"mig/modules/file"
|
||||
"mig.ninja/mig"
|
||||
"mig.ninja/mig/modules"
|
||||
"mig.ninja/mig/modules/file"
|
||||
"time"
|
||||
)
|
||||
|
|
@ -6,12 +6,12 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"gopkg.in/gcfg.v1"
|
||||
"fmt"
|
||||
geo "github.com/oschwald/geoip2-golang"
|
||||
"gopkg.in/gcfg.v1"
|
||||
"io"
|
||||
"mig"
|
||||
migdb "mig/database"
|
||||
"mig.ninja/mig"
|
||||
migdb "mig.ninja/mig/database"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
|
@ -7,7 +7,7 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"mig"
|
||||
"mig.ninja/mig"
|
||||
"net"
|
||||
)
|
||||
|
|
@ -8,8 +8,8 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"mig"
|
||||
"mig/pgp"
|
||||
"mig.ninja/mig"
|
||||
"mig.ninja/mig/pgp"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
|
@ -10,8 +10,8 @@ import (
|
|||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"mig"
|
||||
"mig/pgp"
|
||||
"mig.ninja/mig"
|
||||
"mig.ninja/mig/pgp"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
|
@ -8,8 +8,8 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
"github.com/jvehent/cljs"
|
||||
"mig"
|
||||
migdb "mig/database"
|
||||
"mig.ninja/mig"
|
||||
migdb "mig.ninja/mig/database"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"regexp"
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"mig/client"
|
||||
"mig.ninja/mig/client"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
|
@ -17,9 +17,9 @@ import (
|
|||
"golang.org/x/crypto/openpgp"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"mig"
|
||||
"mig/modules"
|
||||
"mig/pgp"
|
||||
"mig.ninja/mig"
|
||||
"mig.ninja/mig/modules"
|
||||
"mig.ninja/mig/pgp"
|
||||
"mime/multipart"
|
||||
"net/http"
|
||||
"net/url"
|
|
@ -0,0 +1 @@
|
|||
../../conf/available_modules.go
|
|
@ -8,9 +8,9 @@ package main
|
|||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"mig"
|
||||
"mig/client"
|
||||
"mig/modules"
|
||||
"mig.ninja/mig"
|
||||
"mig.ninja/mig/client"
|
||||
"mig.ninja/mig/modules"
|
||||
"os"
|
||||
"os/signal"
|
||||
"time"
|
|
@ -10,9 +10,9 @@ import (
|
|||
"fmt"
|
||||
"github.com/bobappleyard/readline"
|
||||
"io"
|
||||
"mig"
|
||||
"mig/client"
|
||||
"mig/modules"
|
||||
"mig.ninja/mig"
|
||||
"mig.ninja/mig/client"
|
||||
"mig.ninja/mig/modules"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
|
@ -10,8 +10,8 @@ import (
|
|||
"fmt"
|
||||
"github.com/bobappleyard/readline"
|
||||
"io"
|
||||
"mig"
|
||||
"mig/client"
|
||||
"mig.ninja/mig"
|
||||
"mig.ninja/mig/client"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
|
@ -9,7 +9,7 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"mig/client"
|
||||
"mig.ninja/mig/client"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
|
@ -0,0 +1 @@
|
|||
../../conf/available_modules.go
|
|
@ -10,7 +10,7 @@ import (
|
|||
"fmt"
|
||||
"github.com/bobappleyard/readline"
|
||||
"io"
|
||||
"mig/client"
|
||||
"mig.ninja/mig/client"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
|
@ -13,8 +13,8 @@ import (
|
|||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"mig"
|
||||
"mig/client"
|
||||
"mig.ninja/mig"
|
||||
"mig.ninja/mig/client"
|
||||
"net/http"
|
||||
"os"
|
||||
"strconv"
|
|
@ -10,8 +10,8 @@ import (
|
|||
"github.com/bobappleyard/readline"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"mig/client"
|
||||
"mig/pgp"
|
||||
"mig.ninja/mig/client"
|
||||
"mig.ninja/mig/pgp"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
|
@ -8,8 +8,8 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
"github.com/jvehent/cljs"
|
||||
"mig"
|
||||
"mig/client"
|
||||
"mig.ninja/mig"
|
||||
"mig.ninja/mig/client"
|
||||
"regexp"
|
||||
"strings"
|
||||
"time"
|
|
@ -10,8 +10,8 @@ import (
|
|||
"flag"
|
||||
"fmt"
|
||||
"log"
|
||||
"mig"
|
||||
"mig/client"
|
||||
"mig.ninja/mig"
|
||||
"mig.ninja/mig/client"
|
||||
"net/url"
|
||||
"os"
|
||||
"time"
|
|
@ -8,8 +8,8 @@ package main
|
|||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"mig"
|
||||
"mig/client"
|
||||
"mig.ninja/mig"
|
||||
"mig.ninja/mig/client"
|
||||
"os"
|
||||
)
|
||||
|
|
@ -10,7 +10,7 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"mig/modules"
|
||||
"mig.ninja/mig/modules"
|
||||
"time"
|
||||
)
|
||||
|
|
@ -6,14 +6,14 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
_ "mig/modules/agentdestroy"
|
||||
_ "mig/modules/file"
|
||||
_ "mig/modules/memory"
|
||||
_ "mig/modules/netstat"
|
||||
_ "mig/modules/ping"
|
||||
_ "mig/modules/pkg"
|
||||
_ "mig/modules/scribe"
|
||||
_ "mig/modules/timedrift"
|
||||
_ "mig.ninja/mig/modules/agentdestroy"
|
||||
_ "mig.ninja/mig/modules/file"
|
||||
_ "mig.ninja/mig/modules/memory"
|
||||
_ "mig.ninja/mig/modules/netstat"
|
||||
_ "mig.ninja/mig/modules/ping"
|
||||
_ "mig.ninja/mig/modules/pkg"
|
||||
_ "mig.ninja/mig/modules/scribe"
|
||||
_ "mig.ninja/mig/modules/timedrift"
|
||||
//_ "mig/modules/upgrade"
|
||||
//_ "mig/modules/example"
|
||||
)
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
package main
|
||||
|
||||
import(
|
||||
"mig"
|
||||
"mig.ninja/mig"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"database/sql"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"mig"
|
||||
"mig.ninja/mig"
|
||||
"time"
|
||||
|
||||
_ "github.com/lib/pq"
|
|
@ -9,7 +9,7 @@ import (
|
|||
"database/sql"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"mig"
|
||||
"mig.ninja/mig"
|
||||
"time"
|
||||
|
||||
_ "github.com/lib/pq"
|
|
@ -9,7 +9,7 @@ import (
|
|||
"database/sql"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"mig"
|
||||
"mig.ninja/mig"
|
||||
"time"
|
||||
|
||||
_ "github.com/lib/pq"
|
|
@ -9,7 +9,7 @@ import (
|
|||
"database/sql"
|
||||
"fmt"
|
||||
_ "github.com/lib/pq"
|
||||
"mig"
|
||||
"mig.ninja/mig"
|
||||
"time"
|
||||
)
|
||||
|
|
@ -9,7 +9,7 @@ import (
|
|||
"database/sql"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"mig"
|
||||
"mig.ninja/mig"
|
||||
"strconv"
|
||||
"time"
|
||||
|
|
@ -14,7 +14,7 @@ import (
|
|||
"fmt"
|
||||
"github.com/kardianos/osext"
|
||||
"io"
|
||||
"mig/modules"
|
||||
"mig.ninja/mig/modules"
|
||||
"os"
|
||||
"os/exec"
|
||||
"runtime"
|
|
@ -6,7 +6,7 @@
|
|||
package agentdestroy
|
||||
|
||||
import (
|
||||
"mig/testutil"
|
||||
"mig.ninja/mig/testutil"
|
||||
"testing"
|
||||
)
|
||||
|
|
@ -30,7 +30,7 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"mig/modules"
|
||||
"mig.ninja/mig/modules"
|
||||
"net"
|
||||
"os"
|
||||
"regexp"
|
|
@ -6,7 +6,7 @@
|
|||
package example
|
||||
|
||||
import (
|
||||
"mig/testutil"
|
||||
"mig.ninja/mig/testutil"
|
||||
"testing"
|
||||
)
|
||||
|
|
@ -22,7 +22,7 @@ import (
|
|||
"golang.org/x/crypto/sha3"
|
||||
"hash"
|
||||
"io"
|
||||
"mig/modules"
|
||||
"mig.ninja/mig/modules"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
|
@ -6,7 +6,7 @@
|
|||
package file
|
||||
|
||||
import (
|
||||
"mig/testutil"
|
||||
"mig.ninja/mig/testutil"
|
||||
"testing"
|
||||
)
|
||||
|
|
@ -16,7 +16,7 @@ import (
|
|||
"github.com/mozilla/masche/memaccess"
|
||||
"github.com/mozilla/masche/process"
|
||||
"io"
|
||||
"mig/modules"
|
||||
"mig.ninja/mig/modules"
|
||||
"regexp"
|
||||
"time"
|
||||
)
|
|
@ -8,8 +8,8 @@ package memory
|
|||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"mig/modules"
|
||||
"mig/testutil"
|
||||
"mig.ninja/mig/modules"
|
||||
"mig.ninja/mig/testutil"
|
||||
"testing"
|
||||
)
|
||||
|
|
@ -13,7 +13,7 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"mig/modules"
|
||||
"mig.ninja/mig/modules"
|
||||
"net"
|
||||
"regexp"
|
||||
"strconv"
|
|
@ -6,7 +6,7 @@
|
|||
package netstat
|
||||
|
||||
import (
|
||||
"mig/testutil"
|
||||
"mig.ninja/mig/testutil"
|
||||
"testing"
|
||||
)
|
||||
|
|
@ -18,7 +18,7 @@ import (
|
|||
"golang.org/x/net/ipv4"
|
||||
"golang.org/x/net/ipv6"
|
||||
"io"
|
||||
"mig/modules"
|
||||
"mig.ninja/mig/modules"
|
||||
"net"
|
||||
"os"
|
||||
"strings"
|
|
@ -6,7 +6,7 @@
|
|||
package ping
|
||||
|
||||
import (
|
||||
"mig/testutil"
|
||||
"mig.ninja/mig/testutil"
|
||||
"testing"
|
||||
)
|
||||
|
|
@ -10,7 +10,7 @@ import (
|
|||
"fmt"
|
||||
scribelib "github.com/mozilla/scribe/src/scribe"
|
||||
"io"
|
||||
"mig/modules"
|
||||
"mig.ninja/mig/modules"
|
||||
"regexp"
|
||||
"runtime"
|
||||
"time"
|
|
@ -6,7 +6,7 @@
|
|||
package pkg
|
||||
|
||||
import (
|
||||
"mig/testutil"
|
||||
"mig.ninja/mig/testutil"
|
||||
"testing"
|
||||
)
|
||||
|
|
@ -13,8 +13,8 @@ import (
|
|||
"fmt"
|
||||
scribelib "github.com/mozilla/scribe/src/scribe"
|
||||
"io"
|
||||
"mig/modules"
|
||||
"mig/modules/file"
|
||||
"mig.ninja/mig/modules"
|
||||
"mig.ninja/mig/modules/file"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"time"
|
|
@ -6,7 +6,7 @@
|
|||
package scribe
|
||||
|
||||
import (
|
||||
"mig/testutil"
|
||||
"mig.ninja/mig/testutil"
|
||||
"testing"
|
||||
)
|
||||
|
|
@ -11,7 +11,7 @@ import (
|
|||
"flag"
|
||||
"fmt"
|
||||
"io"
|
||||
"mig/modules"
|
||||
"mig.ninja/mig/modules"
|
||||
"net"
|
||||
"os"
|
||||
"time"
|
|
@ -6,7 +6,7 @@
|
|||
package timedrift
|
||||
|
||||
import (
|
||||
"mig/testutil"
|
||||
"mig.ninja/mig/testutil"
|
||||
"testing"
|
||||
)
|
||||
|
|
@ -23,7 +23,7 @@ import (
|
|||
"hash"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"mig/modules"
|
||||
"mig.ninja/mig/modules"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/exec"
|
|
@ -6,7 +6,7 @@
|
|||
package upgrade
|
||||
|
||||
import (
|
||||
"mig/testutil"
|
||||
"mig.ninja/mig/testutil"
|
||||
"testing"
|
||||
)
|
||||
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче