Skip to content

Commit

Permalink
pull upstream/2.X branch, add workflow, sliver support, and remove up…
Browse files Browse the repository at this point in the history
…stream workflows
  • Loading branch information
c2biz committed Apr 2, 2024
1 parent 75a792a commit 45bbf24
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 124 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/autorelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Release

on:
push:
tags: ["v[0-9]+.[0-9]+.[0-9]+"]
branches: ["main"]

jobs:

linux-windows-build:
name: CSharp Build
if: startsWith( github.ref, 'refs/tags/v')
runs-on: windows-latest
timeout-minutes: 45
steps:

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1

- name: Check out code
uses: actions/checkout@v3

- uses: actions/setup-dotnet@v3
with:
dotnet-version: '5.0.x'

- name: Git Fetch Tags
run: git fetch --prune --unshallow --tags -f

- name: Download Tools
run: |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri https://github.com/stedolan/jq/releases/download/jq-1.6/jq-win64.exe -OutFile jq.exe
Invoke-WebRequest -Uri https://github.com/moloch--/minisign/releases/download/v0.2.1/minisign.exe -OutFile minisign.exe
- name: dotnet build
run: |
dotnet restore
dotnet build -c Release
mkdir compiled
cp .\bin\Release\net462\SharpHound.exe .\compiled
- name: Build Package
# Powershell is utter fucking trash.
run: |
$Version = git.exe describe --tags --abbrev=0
Get-Content -Path alias.json | .\jq.exe --arg ver "$Version" '.version |= $ver' > .\compiled\alias.json
cd .\compiled
tar.exe -czvf ..\sharp-hound-4.tar.gz .\alias.json .\SharpHound.exe
- name: Sign Package
run: |
Write-Output "${{ secrets.MINISIGN_PRIVATE_KEY }}" > minisign.key
$Content1 = Get-Content -Path .\compiled\alias.json
$Bytes = [System.Text.Encoding]::UTF8.GetBytes($Content1)
$Encoded = [System.Convert]::ToBase64String($Bytes)
.\minisign.exe -s minisign.key -S -m sharp-hound-4.tar.gz -t "$Encoded" -x sharp-hound-4.minisig
- name: "Publish Release"
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
sharp-hound-4.minisig
sharp-hound-4.tar.gz
54 changes: 0 additions & 54 deletions .github/workflows/build.yml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/cla.yml

This file was deleted.

47 changes: 0 additions & 47 deletions .github/workflows/publish.yml

This file was deleted.

26 changes: 26 additions & 0 deletions alias.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "SharpHound v4",
"version": "0.0.0",
"command_name": "sharp-hound-4",
"original_author": "@BloodHoundAD",
"repo_url": "https://github.com/sliverarmory/SharpHound4",
"help": "C# based BloodHound Ingestor",

"entrypoint": "Main",
"allow_args": true,
"default_args": "-h",
"is_reflective": false,
"is_assembly": true,
"files": [
{
"os": "windows",
"arch": "amd64",
"path": "SharpHound.exe"
},
{
"os": "windows",
"arch": "386",
"path": "SharpHound.exe"
}
]
}

0 comments on commit 45bbf24

Please sign in to comment.