-
-
Notifications
You must be signed in to change notification settings - Fork 588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CDK #4167
Open
sawntoe
wants to merge
1
commit into
BlackArch:master
Choose a base branch
from
sawntoe:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add CDK #4167
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ). | ||
# See COPYING for license details. | ||
|
||
pkgname=cdk | ||
pkgver=v1.5.3 | ||
_pkgver=v1.5.3 | ||
pkgrel=1 | ||
pkgdesc='Zero Dependency Container Penetration Toolkit' | ||
arch=('any') | ||
groups=('blackarch' 'blackarch-scanner') | ||
url='https://github.com/cdk-team/CDK' | ||
depends=('bash') | ||
makedepends=() | ||
optdepends=() | ||
options=(!strip) | ||
source=( | ||
'https://github.com/cdk-team/CDK/releases/download/v1.5.3/cdk_darwin_amd64' | ||
'https://github.com/cdk-team/CDK/releases/download/v1.5.3/cdk_linux_386' | ||
'https://github.com/cdk-team/CDK/releases/download/v1.5.3/cdk_linux_386_thin' | ||
'https://github.com/cdk-team/CDK/releases/download/v1.5.3/cdk_linux_386_thin_upx' | ||
'https://github.com/cdk-team/CDK/releases/download/v1.5.3/cdk_linux_386_upx' | ||
'https://github.com/cdk-team/CDK/releases/download/v1.5.3/cdk_linux_amd64' | ||
'https://github.com/cdk-team/CDK/releases/download/v1.5.3/cdk_linux_amd64_thin' | ||
'https://github.com/cdk-team/CDK/releases/download/v1.5.3/cdk_linux_amd64_thin_upx' | ||
'https://github.com/cdk-team/CDK/releases/download/v1.5.3/cdk_linux_amd64_upx' | ||
'https://github.com/cdk-team/CDK/releases/download/v1.5.3/cdk_linux_arm' | ||
'https://github.com/cdk-team/CDK/releases/download/v1.5.3/cdk_linux_arm64' | ||
'https://github.com/cdk-team/CDK/releases/download/v1.5.3/cdk_linux_arm64_thin' | ||
) | ||
sha256sums=( | ||
'64b40a70b232b7e23a187a11c52ef8d8b7f3e16a5b869af16b390cbbe4aab935' | ||
'4c7260ac051907d12896054145fe103f9ea06de3bb2f04f0aab953dff32028de' | ||
'2c757f0065c167e633318ff8d43cb85cf936eae2db224f4e066098f4a8cb324a' | ||
'197c42343c75fbbb7d77f3aaa92e04e43ddec927887e889197db72fcff5e9df4' | ||
'17b096ff5df1b612abc12887e65fae97280533bfe058ce6becb9c0920f4d4c42' | ||
'd7f0690e41786270f345ff4851fd4b239631d4c1e7a6b9f74ad139565cbdb2ed' | ||
'13f42e004a25be9ba99aee3396a1d810026d7750d1e199774c5ba8410b15ae30' | ||
'cdac5cd3d0ff424315da3e233a79f72663c26e53fc4ac2e5031ea08154630514' | ||
'ccbc5c84af4045835e6b001cdf845d63802e081cbb97d9625c12d8d0f9b6f852' | ||
'896b8d804debd233200375a5b7c1218d5b8bf5f53aaaa685b9d411c0770e27d4' | ||
'381448682cb5ea5ff1bc8bfd3462e637da0445fc74fdb60e0de5e11d8c2dc90d' | ||
'2b92652d4909d39e12fc9320188f9e834b82f80d3aba92dea4267608f3543861' | ||
) | ||
|
||
|
||
package() { | ||
install -dm 755 "$pkgdir/usr/share/$pkgname/binaries" | ||
|
||
install -Dm 644 "$srcdir/cdk_"* "$pkgdir/usr/share/$pkgname/binaries" | ||
|
||
} | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't distribute pre-built binaries, we build from source.
Use this PKGBUILD template: https://github.com/BlackArch/blackarch-pkgbuilds/blob/master/PKGBUILD-go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! Under any other situation, I would definitely agree with you. However, I took https://github.com/BlackArch/blackarch/blob/ab15c1a1607ff7a6f245f55be1033eceef86d52b/packages/peass/PKGBUILD as a template, and it does also seem to download pre-built binaries. In cases such as these where these binaries are not meant to be run on the host machine but distributed, it does seem to make more sense to use pre-distributed and trusted binaries, and not have to download cross-compile toolchains and packers for every architecture out there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you can read in the command for peass, it's because it was impossible to do so: sh2bin is not available for linpeas build (so it's a temporary measure intil we package sh2bin), and that winpeas build requires visual studio which is not available on linux so we have no choice. In your case it's different as it's a go binary, cross-compilation is way easier, there is no issue with gox dependency and upx is available as an official package.