Skip to content

Commit cb8bc05

Browse files
committed
Initial commit
0 parents  commit cb8bc05

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+579
-0
lines changed

.circleci/config.yml

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# Python CircleCI 2.0 configuration file
2+
#
3+
# Check https://circleci.com/docs/2.0/language-python/ for more details
4+
#
5+
version: 2
6+
7+
jobs:
8+
build_arm:
9+
machine: true
10+
11+
working_directory: ~/UserLAnd-Assets-Kali
12+
13+
steps:
14+
- checkout
15+
- run:
16+
name: update packages
17+
command: sudo apt-get update
18+
- run:
19+
name: install binfmt-support
20+
command: sudo apt-get install binfmt-support qemu qemu-user-static
21+
- run:
22+
name: build arm assets
23+
command: ./buildArch.sh arm
24+
- persist_to_workspace:
25+
root: .
26+
paths:
27+
- release/*
28+
29+
build_arm64:
30+
machine: true
31+
32+
working_directory: ~/UserLAnd-Assets-Kali
33+
34+
steps:
35+
- checkout
36+
- run:
37+
name: update packages
38+
command: sudo apt-get update
39+
- run:
40+
name: install binfmt-support
41+
command: sudo apt-get install binfmt-support qemu qemu-user-static
42+
- run:
43+
name: build arm64 assets
44+
command: ./buildArch.sh arm64
45+
- persist_to_workspace:
46+
root: .
47+
paths:
48+
- release/*
49+
50+
build_x86:
51+
machine: true
52+
53+
working_directory: ~/UserLAnd-Assets-Kali
54+
55+
steps:
56+
- checkout
57+
- run:
58+
name: build x86 assets
59+
command: ./buildArch.sh x86
60+
- persist_to_workspace:
61+
root: .
62+
paths:
63+
- release/*
64+
65+
build_x86_64:
66+
machine: true
67+
68+
working_directory: ~/UserLAnd-Assets-Kali
69+
70+
steps:
71+
- checkout
72+
- run:
73+
name: build x86_64 assets
74+
command: ./buildArch.sh x86_64
75+
- persist_to_workspace:
76+
root: .
77+
paths:
78+
- release/*
79+
80+
publish-github-release:
81+
docker:
82+
- image: circleci/golang:1.17
83+
84+
steps:
85+
- attach_workspace:
86+
at: .
87+
88+
- run:
89+
name: "Publish Release on GitHub"
90+
command: |
91+
go get github.com/tcnksm/ghr
92+
VERSION=$CIRCLE_TAG
93+
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -n ${VERSION} -delete -prerelease ${VERSION} release/
94+
95+
workflows:
96+
version: 2
97+
build_and_test:
98+
jobs:
99+
- build_arm:
100+
filters:
101+
tags:
102+
only: /.*/
103+
- build_arm64:
104+
filters:
105+
tags:
106+
only: /.*/
107+
- build_x86:
108+
filters:
109+
tags:
110+
only: /.*/
111+
- build_x86_64:
112+
filters:
113+
tags:
114+
only: /.*/
115+
- publish-github-release:
116+
requires:
117+
- build_arm
118+
- build_arm64
119+
- build_x86
120+
- build_x86_64
121+
filters:
122+
branches:
123+
ignore: /.*/
124+
tags:
125+
only: /^v\d+\.\d+\.\d+$/

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/output
2+
/release

Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ARG IMAGE_ARCH
2+
ARG IMAGE_DISTRO
3+
ARG IMAGE_VERSION
4+
FROM ${IMAGE_DISTRO}:${IMAGE_ARCH}
5+
6+
ARG QEMU_FILE
7+
ADD ${QEMU_FILE} /usr/bin
8+
9+
ARG RUN_CMD
10+
ENV RUN_CMD ${RUN_CMD}
11+
CMD ${RUN_CMD}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 CypherpunkArmory
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# UserLAnd-Assets-Kali
2+
A repository for holding Kali specific assets for UserLAnd
3+
4+
After cloning this repo, you simply do the following...
5+
6+
`sudo ./scripts/buildArch.sh $desiredArch`
7+
8+
where `desiredArch` can be `arm`, `arm64`, `x86`, `x86_64`
9+
`all` does not mean all of the previous. It just relates to the files under assets/all

arm.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: '3.2'
2+
3+
services:
4+
imagebuild:
5+
build:
6+
args:
7+
IMAGE_ARCH: armhf
8+
QEMU_FILE: qemu-arm-static
9+
RUN_CMD: /input/main.sh arm

arm64.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: '3.2'
2+
3+
services:
4+
imagebuild:
5+
build:
6+
args:
7+
IMAGE_ARCH: arm64
8+
QEMU_FILE: qemu-aarch64-static
9+
RUN_CMD: /input/main.sh arm64

assets/all/addNonRootUser.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#! /bin/bash
2+
3+
if [[ -z "${INITIAL_USERNAME}" ]]; then
4+
INITIAL_USERNAME="user"
5+
fi
6+
if [[ -z "${INITIAL_PASSWORD}" ]]; then
7+
INITIAL_PASSWORD="userland"
8+
fi
9+
if [[ -z "${INITIAL_VNC_PASSWORD}" ]]; then
10+
INITIAL_VNC_PASSWORD="userland"
11+
fi
12+
13+
if [ ! -d "/home/$INITIAL_USERNAME" ]; then
14+
useradd $INITIAL_USERNAME -s /bin/bash -m -u 2000
15+
echo $INITIAL_USERNAME:$INITIAL_PASSWORD | chpasswd
16+
chsh -s /bin/bash $INITIAL_USERNAME
17+
fi

assets/all/assets.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
addNonRootUser.sh 1549996495 734f0d0a122c8b283f7dbad94a94f49c
2+
extractFilesystem.sh 1549996495 8997eb9d73ba810becd2dd6c8f38b037
3+
ld.so.preload 1532022179 43618bdfa97456206c3f21bd8fc2a9cb
4+
nosudo 1549996495 6c77f57a4be314c57682240754d85327
5+
startSSHServer.sh 1549996495 1455ac210cfa0966e3921d68bd4957d7
6+
startVNCServer.sh 1549996495 a52afb25bd9b9ef7ea87c6de3d88b3ad
7+
startVNCServerStep2.sh 1549996495 c30b0a63f1073c601e1fef1fc4503c8e
8+
startXSDLServer.sh 1549996495 e044b2cddb0074da74b983fc94ca0c8c
9+
userland_profile.sh 1549996495 8c185e7210b2af78d1f6135636737cde

assets/all/extractFilesystem.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/support/busybox sh
2+
3+
if [ ! -f /support/rootfs.tar.gz ]; then
4+
cat /support/rootfs.tar.gz.part* > /support/rootfs.tar.gz
5+
rm -f /support/rootfs.tar.gz.part*
6+
fi
7+
8+
/support/busybox tar -xzvf /support/rootfs.tar.gz -C /
9+
10+
if [[ $? == 0 ]]; then
11+
/support/addNonRootUser.sh
12+
touch /support/.success_filesystem_extraction
13+
rm -f /support/rootfs.tar.gz
14+
else
15+
touch /support/.failure_filesystem_extraction
16+
fi

0 commit comments

Comments
 (0)