Skip to content

Commit

Permalink
Fixed bugs preventing Linux from building
Browse files Browse the repository at this point in the history
  • Loading branch information
unclesp1d3r committed Apr 9, 2024
1 parent d82f988 commit 8692702
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/go
{
"name": "Go",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/go:1-1.22-bookworm",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {},
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/joshuanianji/devcontainer-features/github-cli-persistence:1": {},
"ghcr.io/marcozac/devcontainer-features/goreleaser:1": {}
},
"customizations": {
"vscode": {
"extensions": [
"golang.go",
"usernamehw.errorlens",
"mikestead.dotenv"
]
}
}
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "go version",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for more information:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://containers.dev/guide/dependabot

version: 2
updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly
Binary file added cipherswarmagent
Binary file not shown.
13 changes: 13 additions & 0 deletions lib/arch/linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,23 @@ func GetDevices() ([]string, error) {
return newArray, nil
}

func GetHashcatVersion(hashcatPath string) (string, error) {
out, err := exec.Command(hashcatPath, "--version", "--quiet").Output()
if err != nil {
return "0.0.0", err
}
return strings.TrimSpace(string(out)), nil
}

func GetPlatform() string {
return "linux"
}

func Extract7z(srcFile string, destDir string) error {
_, err := exec.Command("7z", "x", srcFile, "-o"+destDir).Output()
return err
}

func GetDefaultHashcatBinaryName() string {
return "hashcat.bin"
}
Expand Down

0 comments on commit 8692702

Please sign in to comment.