Skip to content

Commit

Permalink
v2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
noraj committed Jan 16, 2022
1 parent 8ac832e commit 869a0b0
Show file tree
Hide file tree
Showing 30 changed files with 891 additions and 237 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ updates:
interval: "daily"
labels:
- "dependency::update"
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
labels:
- "dependency::update"
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
ruby 3.0.1
nodejs 14.17.4
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Official verified image
FROM ruby:3.0.3-alpine3.15

# Remote git repository <-> Remote container registry
LABEL org.opencontainers.image.source https://github.com/noraj/ctf-party
# Other metadata
LABEL org.opencontainers.image.authors "noraj (Alexandre ZANNI)"
LABEL org.opencontainers.image.documentation https://noraj.github.io/ctf-party/
LABEL org.opencontainers.image.licenses MIT
LABEL org.opencontainers.image.description "A CLI tool & library to enhance and speed up script/exploit writing with string conversion/manipulation."

ARG CTF_PARTY_VERSION
LABEL org.opencontainers.image.version $CTF_PARTY_VERSION

## INSTALL ##
# Install the app
RUN gem install ctf-party -v $CTF_PARTY_VERSION --no-document

## BUILD ##

# drop privileges
RUN adduser -s /bin/true -u 1337 -D -H noraj
USER noraj

CMD ["/usr/local/bundle/bin/ctf-party_console"]
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
ctf-party (1.5.0)
ctf-party (2.0.0)
docopt (~> 0.6)

GEM
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ $ ctf-party 'NzQ2Zjc0NmY=' from_b64 hex2str str2bin
- rot: `rot`, `rot13`, `rot_all` and bang versions
- hex: `hex2dec`, `dec2hex`, `to_hex`, `from_hex`, `str2hex`, `hex2str`, `hex2bin`, `bin2hex`, `from_hexip`, `to_hexip` and bang versions
- case: `randomcase`, `alternatecase` and bang versions
- cgi: `urlencode`, `urldecode`, `htmlescape`, `htmlunescape` and bang versions
- cgi: `urlencode`, `urlencode_component`, `urldecode`, `urldecode_component`, `htmlescape`, `htmlunescape` and bang versions
- bin: `to_bin`, `from_bin`, `str2bin`, `bin2str`, `hex2bin`, `bin2hex` and bang versions
- leet: `leet` and bang version
- dec: `dec2str`, `str2dec`, `hex2dec`, `dec2hex` and bang versions
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion ctf_party.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Gem::Specification.new do |s|
s.version = Version::VERSION
s.platform = Gem::Platform::RUBY
s.summary = 'A CLI tool & library to enhance and speed up script/exploit '\
'writing for CTF players'
'writing with string conversion/manipulation'
s.description = 'A CLI tool & library to enhance and speed up script/exploit '\
'writing for CTF players (or security researchers, bug bounty '\
'hunters, pentesters but mostly focused on CTF) by '\
Expand Down
13 changes: 13 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Author: noraj
version: '3'
services:
ctf-party:
image: noraj/ctf-party:2.0.0
user: noraj
container_name: ctf-party
read_only: false
build:
context: .
dockerfile: Dockerfile
args:
CTF_PARTY_VERSION: 2.0.0
6 changes: 6 additions & 0 deletions docs/About.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@
## Logo

Logo made with [DesignEvo](https://www.designevo.com).

## User documentation

The user documentation is made with [docsify](https://docsify.js.org), the theme
used is [docsify-themeable](https://jhildenbiddle.github.io/docsify-themeable)
(Simple Dark scheme).
4 changes: 3 additions & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
# Changelog

## [unreleased]
## [2.0.0]

- New options:
- `dec2hex`, `to_hex`, `bin2hex`, `to_hexip`: Add a `:prefixall` option, allowing to prefix each byte
- Changes:
- `dec2hex`: Change the default value of the `:padding` option to `2`
- `urlencode`, `urldecode`: **BREAKING CHANGE** now use `URI::Parser.new.escape` to get valid URL, use `urlencode_component`, `urldecode_component` to get the old behavior
- **BREAKING CHANGE** the binary `ctf_party_console` has been renamed to `ctf-party_console`
- New methods:
- `urlencode_component`, `urldecode_component`: URL-encode URL component, have the old `urlencode`, `urldecode` behavior
- Fixes:
- `dec2hex`: Fix `:padding` option behavior
- `hex2dec`, `from_hex`, `hex2bin`, `from_hexip`: Fix `:prefix` behavior when there is one prefix per byte
- Chore:
- Fix some linting
- Documentation: Use a new dark theme + use tabs
- Dependencies:
- Update to yard [v0.9.27](https://github.com/lsegal/yard/releases/tag/v0.9.27)
- Move from Redcarpet to CommonMarker markdown provider
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ $ ctf-party 'NzQ2Zjc0NmY=' from_b64 hex2str str2bin
- rot: `rot`, `rot13`, `rot_all` and bang versions
- hex: `hex2dec`, `dec2hex`, `to_hex`, `from_hex`, `str2hex`, `hex2str`, `hex2bin`, `bin2hex`, `from_hexip`, `to_hexip` and bang versions
- case: `randomcase`, `alternatecase` and bang versions
- cgi: `urlencode`, `urldecode`, `htmlescape`, `htmlunescape` and bang versions
- cgi: `urlencode`, `urlencode_component`, `urldecode`, `urldecode_component`, `htmlescape`, `htmlunescape` and bang versions
- bin: `to_bin`, `from_bin`, `str2bin`, `bin2str`, `hex2bin`, `bin2hex` and bang versions
- leet: `leet` and bang version
- dec: `dec2str`, `str2dec`, `hex2dec`, `dec2hex` and bang versions
Expand Down
15 changes: 14 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Description">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="vendor/themes/vue.css">
<link rel="stylesheet" href="vendor/themes/theme-simple-dark.css">
</head>
<body>
<div id="app"></div>
Expand All @@ -21,11 +21,24 @@
logo: '_media/logo.png',
themeColor: '#FF6600',
search: 'auto',
themeable: {
readyTransition: true,
responsiveTables: true
},
tabs: {
persist : true,
sync : true,
theme : 'classic',
tabComments: true,
tabHeadings: true
}
}
</script>
<script src="vendor/docsify.js"></script>
<script src="vendor/plugins/search.min.js"></script>
<script src="vendor/plugins/emoji.min.js"></script>
<script src="vendor/prismjs/components/prism-ruby.min.js"></script>
<script src="vendor/plugins/docsify-themeable.min.js"></script>
<script src="vendor/plugins/docsify-tabs.min.js"></script>
</body>
</html>
94 changes: 86 additions & 8 deletions docs/pages/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@

## Production

### Install from rubygems.org
<!-- tabs:start -->

### **rubygems.org**

```
$ gem install ctf-party
```

Gem: [ctf-party](https://rubygems.org/gems/ctf-party)

### Install from BlackArch
### **BlackArch**

From the repository:

Expand All @@ -26,7 +28,7 @@ From git:

PKGBUILD: [ctf-party](https://github.com/BlackArch/blackarch/blob/master/packages/ctf-party/PKGBUILD)

### Install from ArchLinux
### **ArchLinux**

Manually:

Expand All @@ -44,17 +46,89 @@ $ pikaur -S ruby-ctf-party

AUR: [ruby-ctf-party](https://aur.archlinux.org/packages/ruby-ctf-party/)

### **Docker (git)**

Without a registry

```
$ git clone https://github.com/noraj/ctf-party.git
$ cd ctf-party
$ docker-compose build
# alternatively without docker compose
$ docker build -f Dockerfile -t ctf-party --build-arg ctf-party_VERSION=2.0.0 .
```

Usage examples:

```
$ docker-compose run ctf-party ctf-party 'security' to_hex
$ docker-compose run ctf-party ctf-party_console
# alternatively without docker compose
$ docker run -it --rm ctf-party ctf-party 'security' to_hex
$ docker run -it --rm ctf-party ctf-party_console
```

### **Docker (Docker Hub)**

host: `docker.io`

```
# latest
$ docker pull noraj/ctf-party
# specific tag
$ docker pull noraj/ctf-party:2.0.0
```

Repository: [noraj/ctf-party](https://hub.docker.com/r/noraj/ctf-party).

### **Docker (GHCR)**

GHCR = Github Container Registry

host: `ghcr.io`

```
# latest
$ docker pull ghcr.io/noraj/ctf-party
# specific tag
$ docker pull ghcr.io/noraj/ctf-party:2.0.0
```

Repository: [noraj/ctf-party](https://github.com/noraj/ctf-party/pkgs/container/ctf-party)

### **Docker (ACR)**

ACR = Alibaba Cloud Container Registry

host: `registry-intl.eu-central-1.aliyuncs.com`

```
# latest
$ docker pull registry-intl.eu-central-1.aliyuncs.com/noraj/ctf-party
# specific tag
$ docker pull registry-intl.eu-central-1.aliyuncs.com/noraj/ctf-party:2.0.0
```

Repository: [the overview page is not public](https://cr.console.aliyun.com/repository/eu-central-1/noraj/ctf-party/details)

<!-- tabs:end -->

## Development

It's better to use [rbenv](https://github.com/rbenv/rbenv) to have latests version of ruby and to avoid trashing your system ruby.
It's better to use [ASDM-VM](https://asdf-vm.com/) to have latests version of ruby and to avoid trashing your system ruby.

<!-- tabs:start -->

### Install from rubygems.org
### **rubygems.org**

```
$ gem install --development ctf-party
```

### Build from git
### **git**

Just replace `x.x.x` with the gem version you see after `gem build`.

Expand All @@ -69,7 +143,9 @@ $ gem install ctf-party-x.x.x.gem

Note: if an automatic install is needed you can get the version with `$ gem build ctf_party.gemspec | grep Version | cut -d' ' -f4`.

### Run the library in irb without installing the gem
### **No install**

Run the library in irb without installing the gem.

From local file:

Expand All @@ -80,5 +156,7 @@ $ irb -Ilib -rctf_party
From the installed gem:

```
$ ctf_party_console
$ ctf-party_console
```

<!-- tabs:end -->
Loading

0 comments on commit 869a0b0

Please sign in to comment.