Skip to content

Commit

Permalink
Update package path
Browse files Browse the repository at this point in the history
  • Loading branch information
kulinacs committed Dec 12, 2023
1 parent bd43069 commit 0388672
Show file tree
Hide file tree
Showing 99 changed files with 835 additions and 1,750 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Test master
on:
push:
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Install build dependencies
run: sudo apt-get update -y && sudo apt-get install -y libminizip-dev ocl-icd-libopencl1 ocl-icd-opencl-dev opencl-headers pocl-opencl-icd
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 'stable'
- name: Checkout hashcat
uses: actions/checkout@v3
with:
repository: hashcat/hashcat
ref: v6.1.1
path: hashcat
- name: Install hashcat
working-directory: ./hashcat
run: sudo make install SHARED=1 ENABLE_BRAIN=0
- name: Install additional dependencies
working-directory: ./hashcat
run: |
sudo cp deps/LZMA-SDK/C/LzmaDec.h /usr/local/include/hashcat/
sudo cp deps/LZMA-SDK/C/7zTypes.h /usr/local/include/hashcat/
sudo cp deps/LZMA-SDK/C/Lzma2Dec.h /usr/local/include/hashcat/
sudo cp -r ./OpenCL/inc_types.h /usr/local/include/hashcat/
sudo cp -r ./deps/zlib/contrib /usr/local/include/hashcat
sudo ln -s /usr/local/lib/libhashcat.so.6.1.1 /usr/local/lib/libhashcat.so
- name: Run tests
run: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib go test ./...
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ endif
build:
mkdir -p builds/
go build -tags "$(WORKBUILDTAGS)" -o $(BINDIR)/gocrack_worker $(CFLAGS) -ldflags \
"-X github.com/fireeye/gocrack/worker.CompileRev=${BUILDREV} \
-X github.com/fireeye/gocrack/worker.CompileTime=${BUILDDATE} \
-X github.com/fireeye/gocrack/worker/engines/hashcat.HashcatVersion=${HASHCAT_VER}" \
"-X github.com/mandiant/gocrack/worker.CompileRev=${BUILDREV} \
-X github.com/mandiant/gocrack/worker.CompileTime=${BUILDDATE} \
-X github.com/mandiant/gocrack/worker/engines/hashcat.HashcatVersion=${HASHCAT_VER}" \
cmd/gocrack_worker/*.go
go build -tags "$(SERVBUILDTAGS)" -o $(BINDIR)/gocrack_server $(CFLAGS) -ldflags \
"-X github.com/fireeye/gocrack/server.CompileRev=${BUILDREV} \
-X github.com/fireeye/gocrack/server.CompileTime=${BUILDDATE}" \
"-X github.com/mandiant/gocrack/server.CompileRev=${BUILDREV} \
-X github.com/mandiant/gocrack/server.CompileTime=${BUILDDATE}" \
cmd/gocrack_server/*.go

static_analysis:
go vet `go list ./... | egrep -v 'gocat|vendor'`
go vet `go list ./...`

test:
go test -cover -v `go list ./... | egrep -v 'gocat|vendor'`
go test -cover -v `go list ./...`

clean:
rm -rf builds/

all: static_analysis test build
all: static_analysis test build
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# gocrack

[![Build Status](https://travis-ci.org/fireeye/gocrack.svg?branch=master)](https://travis-ci.org/fireeye/gocrack) [![codecov](https://codecov.io/gh/fireeye/gocrack/branch/master/graph/badge.svg)](https://codecov.io/gh/fireeye/gocrack) [![reportcard](https://goreportcard.com/badge/github.com/fireeye/gocrack)](https://goreportcard.com/report/github.com/fireeye/gocrack)
[![Build Status](https://travis-ci.org/mandiant/gocrack.svg?branch=master)](https://travis-ci.org/mandiant/gocrack) [![codecov](https://codecov.io/gh/mandiant/gocrack/branch/master/graph/badge.svg)](https://codecov.io/gh/mandiant/gocrack) [![reportcard](https://goreportcard.com/badge/github.com/mandiant/gocrack)](https://goreportcard.com/report/github.com/mandiant/gocrack)

![GoCrack Logo](/docs/logo.png)

GoCrack provides APIs to manage password cracking tasks across supported cracking engines.

## Supported Engines

* [hashcat 5.X+](https://github.com/hashcat/hashcat)
* [hashcat 6.X+](https://github.com/hashcat/hashcat)

## Documentation

Expand Down
4 changes: 2 additions & 2 deletions cmd/gocrack_server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"os/signal"
"syscall"

"github.com/fireeye/gocrack/server"
"github.com/fireeye/gocrack/shared"
"github.com/mandiant/gocrack/server"
"github.com/mandiant/gocrack/shared"

"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
Expand Down
8 changes: 4 additions & 4 deletions cmd/gocrack_worker/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"strings"
"syscall"

"github.com/fireeye/gocrack/shared"
"github.com/fireeye/gocrack/worker"
"github.com/fireeye/gocrack/worker/child"
"github.com/fireeye/gocrack/worker/parent"
"github.com/mandiant/gocrack/shared"
"github.com/mandiant/gocrack/worker"
"github.com/mandiant/gocrack/worker/child"
"github.com/mandiant/gocrack/worker/parent"

"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
Expand Down
4 changes: 2 additions & 2 deletions docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ROOT_PROJECT := gocrack
PKG_AUTHOR := Christopher Schmitt <[email protected]>
HASHCAT_VERSION := v5.1.0

GOCRACK_PROJ := github.com/fireeye/gocrack
GOCRACK_PROJ := github.com/mandiant/gocrack
GOCRACK_CODE_LOCAL := ${GOPATH}/src/$(GOCRACK_PROJ)
EXTERNAL_DIR := $(CURDIR)/external
HASHCAT_DIR := $(EXTERNAL_DIR)/hashcat
Expand Down Expand Up @@ -50,4 +50,4 @@ build_images: build_server_image build_worker_image
clean:
@rm -rf $(DIST_DIR)

build: hashcat gocrack build_server_image build_worker_image
build: hashcat gocrack build_server_image build_worker_image
2 changes: 1 addition & 1 deletion docs/administrator/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Example Configs for NGINX:
* `allowed_origins`: A list of domains (origins) in which requests will be made from (UI). This is a [CORS] (https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS) setting.
* `max_preflight_age`: Indicates how long the response of a preflight request can be cached by the browser. By default, this is set to 24 hours. It must be in the format of a [duration string](https://golang.org/pkg/time/#ParseDuration)
1. `ui`
* `static_path`: Path containing `index.html` and a folder called `static` that serve as the GoCrack User Interface. The reference user interface can be found in the [gocrack-ui repository](https://github.com/fireeye/gocrack-ui).
* `static_path`: Path containing `index.html` and a folder called `static` that serve as the GoCrack User Interface. The reference user interface can be found in the [gocrack-ui repository](https://github.com/mandiant/gocrack-ui).
* `csrf_key`: A secure key that is used to sign the CSRF cookies. This should be set to a strong, random string
* `csrf_enabled`: By default, this is true but on development instances this should be set to false.

Expand Down
77 changes: 49 additions & 28 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,44 +1,65 @@
module github.com/fireeye/gocrack
module github.com/mandiant/gocrack

go 1.12
go 1.20

require (
github.com/asdine/storm v0.0.0-20190418133842-e0f77eada154
github.com/gin-contrib/cors v1.3.1
github.com/gin-gonic/gin v1.7.7
github.com/google/uuid v1.3.0
github.com/gorilla/csrf v1.7.0
github.com/mandiant/gocat/v6 v6.1.0
github.com/nightlyone/lockfile v0.0.0-20170804114028-6a197d5ea611
github.com/prometheus/client_golang v1.8.0
github.com/prometheus/client_model v0.2.0
github.com/rs/zerolog v1.20.0
github.com/shirou/gopsutil v0.0.0-20170510024726-b6da2bd76e7d
github.com/stretchr/testify v1.7.0
github.com/tankbusta/gzip v0.0.0-20171023233440-5ea045a82e8f
github.com/tankbusta/hashvalidate v0.11.1
github.com/tchap/go-exchange v0.0.0-20141009085351-ebe3feb493da
golang.org/x/crypto v0.0.0-20211209193657-4570a0811e8b
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
gopkg.in/ldap.v2 v2.5.1
gopkg.in/square/go-jose.v2 v2.5.1
gopkg.in/yaml.v2 v2.4.0
)

require (
github.com/DataDog/zstd v1.4.0 // indirect
github.com/Sereal/Sereal v0.0.0-20190606082811-cf1bab6c7a3a // indirect
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
github.com/asdine/storm v0.0.0-20190418133842-e0f77eada154
github.com/fireeye/gocat v0.0.0-20190613212338-ce97d32213d0
github.com/gin-contrib/cors v1.3.0
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/gin-gonic/gin v1.4.0
github.com/go-ole/go-ole v1.2.4 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/go-playground/validator/v10 v10.9.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.1 // indirect
github.com/gorilla/csrf v1.5.1
github.com/kr/pty v1.1.5 // indirect
github.com/mattn/go-isatty v0.0.8 // indirect
github.com/nightlyone/lockfile v0.0.0-20170804114028-6a197d5ea611
github.com/prometheus/client_golang v0.9.4
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90
github.com/rs/zerolog v1.14.3
github.com/satori/go.uuid v0.0.0-20160713180306-0aa62d5ddceb
github.com/shirou/gopsutil v0.0.0-20170510024726-b6da2bd76e7d
github.com/gorilla/securecookie v1.1.1 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/common v0.14.0 // indirect
github.com/prometheus/procfs v0.2.0 // indirect
github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4 // indirect
github.com/stretchr/objx v0.2.0 // indirect
github.com/stretchr/testify v1.3.0
github.com/tankbusta/gzip v0.0.0-20171023233440-5ea045a82e8f
github.com/tchap/go-exchange v0.0.0-20141009085351-ebe3feb493da
github.com/tchap/go-patricia v2.2.6+incompatible // indirect
github.com/tchap/go-patricia v2.3.0+incompatible // indirect
github.com/ugorji/go/codec v1.2.6 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
go.etcd.io/bbolt v1.3.3 // indirect
golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8
golang.org/x/net v0.0.0-20190611141213-3f473d35a33a // indirect
golang.org/x/sys v0.0.0-20190610200419-93c9922d18ae // indirect
golang.org/x/tools v0.0.0-20190611222205-d73e1c7e250b // indirect
golang.org/x/sys v0.0.0-20211213223007-03aa0b5f6827 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/appengine v1.6.1 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
gopkg.in/asn1-ber.v1 v1.0.0-20150924051756-4e86f4367175 // indirect
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
gopkg.in/ldap.v2 v2.5.1
gopkg.in/square/go-jose.v2 v2.3.1
gopkg.in/yaml.v2 v2.2.2
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)
Loading

0 comments on commit 0388672

Please sign in to comment.