Skip to content

Commit c3d7b8b

Browse files
committed
Initial commit
0 parents  commit c3d7b8b

File tree

5 files changed

+151
-0
lines changed

5 files changed

+151
-0
lines changed

.circleci/config.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
jobs:
2+
build:
3+
machine: true
4+
steps:
5+
- checkout
6+
# build
7+
- run: make all
8+
9+
# cleanup
10+
- run: make clean

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) 2020 Yosuke Sano
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.

Makefile

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
OUT_ZIP=Parrot.zip
2+
LNCR_EXE=Parrot.exe
3+
4+
DLR=curl
5+
DLR_FLAGS=-L
6+
LNCR_URL=https://github.com/yuk7/wsldl/releases/download/20100500/Launcher.exe
7+
8+
all: $(OUT_ZIP)
9+
10+
zip: $(OUT_ZIP)
11+
$(OUT_ZIP): ziproot
12+
@echo -e '\e[1;31mBuilding $(OUT_ZIP)\e[m'
13+
cd ziproot; zip ../$(OUT_ZIP) *
14+
15+
ziproot: Launcher.exe rootfs.tar.gz
16+
@echo -e '\e[1;31mBuilding ziproot...\e[m'
17+
mkdir ziproot
18+
cp Launcher.exe ziproot/${LNCR_EXE}
19+
cp rootfs.tar.gz ziproot/
20+
21+
exe: Launcher.exe
22+
Launcher.exe:
23+
@echo -e '\e[1;31mExtracting Launcher.exe...\e[m'
24+
$(DLR) $(DLR_FLAGS) $(LNCR_URL) -o Launcher.exe
25+
26+
rootfs.tar.gz: rootfs
27+
@echo -e '\e[1;31mBuilding rootfs.tar.gz...\e[m'
28+
cd rootfs; sudo tar -zcpf ../rootfs.tar.gz `sudo ls`
29+
sudo chown `id -un` rootfs.tar.gz
30+
31+
rootfs: base.tar
32+
@echo -e '\e[1;31mBuilding rootfs...\e[m'
33+
mkdir rootfs
34+
sudo tar -xpf base.tar -C rootfs --exclude=dev
35+
echo "# This file was automatically generated by WSL. To stop automatic generation of this file, remove this line." | sudo tee rootfs/etc/resolv.conf
36+
sudo chmod +x rootfs
37+
38+
base.tar:
39+
@echo -e '\e[1;31mExporting base.tar using docker...\e[m'
40+
docker run --name parrotwsl parrotsec/core:latest /bin/bash -c "pwconv; grpconv; chmod 0744 /etc/shadow; chmod 0744 /etc/gshadow;"
41+
docker export --output=base.tar parrotwsl
42+
docker rm -f parrotwsl
43+
44+
clean:
45+
@echo -e '\e[1;31mCleaning files...\e[m'
46+
-rm ${OUT_ZIP}
47+
-rm -r ziproot
48+
-rm Launcher.exe
49+
-rm rootfs.tar.gz
50+
-sudo rm -r rootfs
51+
-rm base.tar
52+
-docker rmi parrotsec/core:latest

README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# ParrotWSL
2+
Parrot Security OS on WSL (Windows 10 FCU or later)
3+
based on [wsldl](https://github.com/yuk7/wsldl)
4+
5+
![screenshot](https://raw.githubusercontent.com/yosukes-dev/ParrotWSL/master/img/screenshot.png)
6+
7+
[![CircleCI](https://circleci.com/gh/yosukes-dev/ParrotWSL.svg?style=svg)](https://circleci.com/gh/yosukes-dev/ParrotWSL)
8+
[![Github All Releases](https://img.shields.io/github/downloads/yosukes-dev/ParrotWSL/total.svg?style=flat-square)](https://github.com/yosukes-dev/ParrotWSL/releases)
9+
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
10+
![License](https://img.shields.io/github/license/yosukes-dev/ParrotWSL.svg?style=flat-square)
11+
12+
### [Download](https://github.com/yosukes-dev/ParrotWSL/releases)
13+
14+
15+
## Requirements
16+
* Windows 10 Fall Creators Update x64 or later. (Testing with build 19631)
17+
* Windows Subsystem for Linux feature is enabled.
18+
19+
## Install
20+
#### 1. [Download](https://github.com/yosukes-dev/ParrotWSL/releases) installer zip
21+
22+
#### 2. Extract all files in zip file to same directory
23+
24+
#### 3.Run Parrot.exe to Extract rootfs and Register to WSL
25+
Exe filename is using to the instance name to register.
26+
If you rename it you can register with a diffrent name and have multiple installs.
27+
28+
## How-to-Use(for Installed Instance)
29+
#### exe Usage
30+
```dos
31+
Usage :
32+
<no args>
33+
- Open a new shell with your default settings.
34+
35+
run <command line>
36+
- Run the given command line in that distro. Inherit current directory.
37+
38+
runp <command line (includes windows path)>
39+
- Run the path translated command line in that distro.
40+
41+
config [setting [value]]
42+
- `--default-user <user>`: Set the default user for this distro to <user>
43+
- `--default-uid <uid>`: Set the default user uid for this distro to <uid>
44+
- `--append-path <on|off>`: Switch of Append Windows PATH to $PATH
45+
- `--mount-drive <on|off>`: Switch of Mount drives
46+
47+
get [setting]
48+
- `--default-uid`: Get the default user uid in this distro
49+
- `--append-path`: Get on/off status of Append Windows PATH to $PATH
50+
- `--mount-drive`: Get on/off status of Mount drives
51+
- `--lxguid`: Get WSL GUID key for this distro
52+
53+
backup [contents]
54+
- `--tgz`: Output backup.tar.gz to the current directory using tar command
55+
- `--reg`: Output settings registry file to the current directory
56+
57+
clean
58+
- Uninstall the distro.
59+
60+
help
61+
- Print this usage message.
62+
```
63+
64+
#### How to uninstall instance
65+
```dos
66+
>Parrot.exe clean
67+
68+
```

img/screenshot.png

480 KB
Loading

0 commit comments

Comments
 (0)