ctf-party 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.rubocop.yml +29 -0
- data/.yardopts +4 -0
- data/.yardopts-dev +6 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +52 -0
- data/LICENSE.txt +21 -0
- data/README.md +57 -0
- data/Rakefile +11 -0
- data/bin/ctf_party_console +7 -0
- data/bin/ctf_party_setup +6 -0
- data/docs/.nojekyll +0 -0
- data/docs/About.md +5 -0
- data/docs/CHANGELOG.md +5 -0
- data/docs/README.md +52 -0
- data/docs/_coverpage.md +10 -0
- data/docs/_media/logo.png +0 -0
- data/docs/_navbar.md +3 -0
- data/docs/_sidebar.md +13 -0
- data/docs/index.html +31 -0
- data/docs/pages/documentation.md +30 -0
- data/docs/pages/install.md +84 -0
- data/docs/pages/publishing.md +39 -0
- data/docs/pages/quick-start.md +23 -0
- data/docs/pages/usage.md +61 -0
- data/docs/vendor/docsify.js +1 -0
- data/docs/vendor/plugins/emoji.min.js +1 -0
- data/docs/vendor/plugins/search.min.js +1 -0
- data/docs/vendor/prismjs/components/prism-ruby.min.js +1 -0
- data/docs/vendor/themes/vue.css +1 -0
- data/docs/yard/String.html +2909 -0
- data/docs/yard/Version.html +121 -0
- data/docs/yard/_index.html +123 -0
- data/docs/yard/class_list.html +51 -0
- data/docs/yard/css/common.css +1 -0
- data/docs/yard/css/full_list.css +58 -0
- data/docs/yard/css/style.css +496 -0
- data/docs/yard/file.LICENSE.html +70 -0
- data/docs/yard/file.README.html +124 -0
- data/docs/yard/file_list.html +61 -0
- data/docs/yard/frames.html +17 -0
- data/docs/yard/index.html +124 -0
- data/docs/yard/js/app.js +303 -0
- data/docs/yard/js/full_list.js +216 -0
- data/docs/yard/js/jquery.js +4 -0
- data/docs/yard/method_list.html +275 -0
- data/docs/yard/top-level-namespace.html +112 -0
- data/lib/ctf_party.rb +7 -0
- data/lib/ctf_party/base64.rb +99 -0
- data/lib/ctf_party/digest.rb +115 -0
- data/lib/ctf_party/flag.rb +94 -0
- data/lib/ctf_party/rot.rb +47 -0
- data/lib/ctf_party/version.rb +5 -0
- data/test/test_string.rb +134 -0
- metadata +218 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1c9bbfee898723defee53d242711a127753c3bef4f6828477d4f686e4487713e
|
4
|
+
data.tar.gz: 69f0e9e1e7bb5fd27dcbd37b2c86d8ce6514307f3eb413d196e89822ad8e6e6e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 58b042d0a45a771eb5889438497c15c8126039016b70362d0dcffd58b41a35442735351a14d099744603a778a3dc9684e76a1f72334adca4b2124552205e0b2f
|
7
|
+
data.tar.gz: 35c6e42f0c33448bba0acfd9ac126221ac557cfd47f4042edf844aed7bccf0272aaba52e38ee184959dbe0c56630f10c08575b6f0be25e9eeb3bd2a21ac02537
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# Metrics
|
2
|
+
AllCops:
|
3
|
+
TargetRubyVersion: 2.4
|
4
|
+
|
5
|
+
Layout/AlignHash:
|
6
|
+
Include:
|
7
|
+
- 'lib/**/*.rb'
|
8
|
+
Metrics/AbcSize:
|
9
|
+
Enabled: false
|
10
|
+
Metrics/ClassLength:
|
11
|
+
Max: 200
|
12
|
+
Metrics/CyclomaticComplexity:
|
13
|
+
Enabled: false
|
14
|
+
Metrics/LineLength:
|
15
|
+
Include:
|
16
|
+
- 'lib/**/*.rb'
|
17
|
+
Metrics/BlockNesting:
|
18
|
+
Exclude:
|
19
|
+
- 'bin/*'
|
20
|
+
Metrics/MethodLength:
|
21
|
+
Max: 25
|
22
|
+
Metrics/PerceivedComplexity:
|
23
|
+
Max: 10
|
24
|
+
Style/ClassVars:
|
25
|
+
Enabled: false
|
26
|
+
Style/Documentation:
|
27
|
+
Enabled: false
|
28
|
+
Style/RedundantReturn:
|
29
|
+
Enabled: false
|
data/.yardopts
ADDED
data/.yardopts-dev
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
ctf-party (1.0.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
ast (2.4.0)
|
10
|
+
commonmarker (0.20.1)
|
11
|
+
ruby-enum (~> 0.5)
|
12
|
+
concurrent-ruby (1.1.5)
|
13
|
+
github-markup (3.0.4)
|
14
|
+
i18n (1.7.0)
|
15
|
+
concurrent-ruby (~> 1.0)
|
16
|
+
jaro_winkler (1.5.3)
|
17
|
+
minitest (5.12.2)
|
18
|
+
parallel (1.18.0)
|
19
|
+
parser (2.6.5.0)
|
20
|
+
ast (~> 2.4.0)
|
21
|
+
rainbow (3.0.0)
|
22
|
+
rake (12.3.3)
|
23
|
+
redcarpet (3.5.0)
|
24
|
+
rubocop (0.75.1)
|
25
|
+
jaro_winkler (~> 1.5.1)
|
26
|
+
parallel (~> 1.10)
|
27
|
+
parser (>= 2.6)
|
28
|
+
rainbow (>= 2.2.2, < 4.0)
|
29
|
+
ruby-progressbar (~> 1.7)
|
30
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
31
|
+
ruby-enum (0.7.2)
|
32
|
+
i18n
|
33
|
+
ruby-progressbar (1.10.1)
|
34
|
+
unicode-display_width (1.6.0)
|
35
|
+
yard (0.9.20)
|
36
|
+
|
37
|
+
PLATFORMS
|
38
|
+
ruby
|
39
|
+
|
40
|
+
DEPENDENCIES
|
41
|
+
bundler (~> 2.0)
|
42
|
+
commonmarker (~> 0.20)
|
43
|
+
ctf-party!
|
44
|
+
github-markup (~> 3.0)
|
45
|
+
minitest (~> 5.11)
|
46
|
+
rake (~> 12.3)
|
47
|
+
redcarpet (~> 3.4)
|
48
|
+
rubocop (~> 0.63)
|
49
|
+
yard (~> 0.9)
|
50
|
+
|
51
|
+
BUNDLED WITH
|
52
|
+
2.0.2
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019 Alexandre ZANNI
|
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
|
13
|
+
all 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
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
# ctf-party
|
2
|
+
|
3
|
+
[](https://badge.fury.io/rb/ctf-party)
|
4
|
+

|
5
|
+
[](https://github.com/Orange-Cyberdefense/ctf-party/network)
|
6
|
+
[](https://github.com/Orange-Cyberdefense/ctf-party/stargazers)
|
7
|
+
[](https://github.com/Orange-Cyberdefense/ctf-party/blob/master/LICENSE.txt)
|
8
|
+
[](https://inventory.rawsec.ml/tools.html#ctf-party)
|
9
|
+
|
10
|
+
[](https://repology.org/project/ctf-party/versions)
|
11
|
+
|
12
|
+

|
13
|
+
|
14
|
+
|
15
|
+
## What it is
|
16
|
+
|
17
|
+
A library to enhance and speed up script/exploit writting for CTF players (or
|
18
|
+
security researchers, bug bounty hunters, pentesters but mostly focused on CTF)
|
19
|
+
by patching the String class to add a short syntax of usual code patterns.
|
20
|
+
The philosophy is also to keep the library to be pure ruby (no dependencies)
|
21
|
+
and not to re-implement what another library is already doing well
|
22
|
+
(eg.[xorcist] for xor).
|
23
|
+
|
24
|
+
[xorcist]:https://github.com/fny/xorcist
|
25
|
+
|
26
|
+
For example instead of writting:
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
require 'base64'
|
30
|
+
|
31
|
+
myvar = 'string'
|
32
|
+
myvar = Base64.strict_encode64(myvar)
|
33
|
+
```
|
34
|
+
|
35
|
+
Just write (shorter and easier to remember):
|
36
|
+
|
37
|
+
```ruby
|
38
|
+
require 'ctf_library'
|
39
|
+
|
40
|
+
myvar = 'string'
|
41
|
+
myvar.to_b64!
|
42
|
+
```
|
43
|
+
|
44
|
+
## Features
|
45
|
+
|
46
|
+
- base64: `to_b64`, `to_b64!`, `from_b64`, `from_b64!`, `b64?`
|
47
|
+
- digest: `md5`, `md5!`, `sha1`, `sha1!`, etc.
|
48
|
+
- flag: `flag`, `flag!`, `flag?` (apply/check a flag format)
|
49
|
+
- rot: `rot`, `rot!`, `rot13`, `rot13!`
|
50
|
+
|
51
|
+
## References
|
52
|
+
|
53
|
+
Homepage / Documentation: https://orange-cyberdefense.github.io/ctf-party/
|
54
|
+
|
55
|
+
## Author
|
56
|
+
|
57
|
+
Made by Alexandre ZANNI ([@noraj](https://github.com/noraj)), pentester from Orange Cyberdefense.
|
data/Rakefile
ADDED
data/bin/ctf_party_setup
ADDED
data/docs/.nojekyll
ADDED
File without changes
|
data/docs/About.md
ADDED
data/docs/CHANGELOG.md
ADDED
data/docs/README.md
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# ctf-party
|
2
|
+
|
3
|
+
[](https://badge.fury.io/rb/ctf-party)
|
4
|
+

|
5
|
+
[](https://github.com/Orange-Cyberdefense/ctf-party/network)
|
6
|
+
[](https://github.com/Orange-Cyberdefense/ctf-party/stargazers)
|
7
|
+
[](https://github.com/Orange-Cyberdefense/ctf-party/blob/master/LICENSE.txt)
|
8
|
+
[](https://inventory.rawsec.ml/tools.html#ctf-party)
|
9
|
+
|
10
|
+
## What it is
|
11
|
+
|
12
|
+
A library to enhance and speed up script/exploit writting for CTF players (or
|
13
|
+
security researchers, bug bounty hunters, pentesters but mostly focused on CTF)
|
14
|
+
by patching the String class to add a short syntax of usual code patterns.
|
15
|
+
The philosophy is also to keep the library to be pure ruby (no dependencies)
|
16
|
+
and not to re-implement what another library is already doing well
|
17
|
+
(eg.[xorcist] for xor).
|
18
|
+
|
19
|
+
[xorcist]:https://github.com/fny/xorcist
|
20
|
+
|
21
|
+
For example instead of writting:
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
require 'base64'
|
25
|
+
|
26
|
+
myvar = 'string'
|
27
|
+
myvar = Base64.strict_encode64(myvar)
|
28
|
+
```
|
29
|
+
|
30
|
+
Just write (shorter and easier to remember):
|
31
|
+
|
32
|
+
```ruby
|
33
|
+
require 'ctf_party'
|
34
|
+
|
35
|
+
myvar = 'string'
|
36
|
+
myvar.to_b64!
|
37
|
+
```
|
38
|
+
|
39
|
+
## Features
|
40
|
+
|
41
|
+
- base64: `to_b64`, `to_b64!`, `from_b64`, `from_b64!`, `b64?`
|
42
|
+
- digest: `md5`, `md5!`, `sha1`, `sha1!`, etc.
|
43
|
+
- flag: `flag`, `flag!`, `flag?` (apply/check a flag format)
|
44
|
+
- rot: `rot`, `rot!`, `rot13`, `rot13!`
|
45
|
+
|
46
|
+
## References
|
47
|
+
|
48
|
+
Homepage / Documentation: https://orange-cyberdefense.github.io/ctf-party/
|
49
|
+
|
50
|
+
## Author
|
51
|
+
|
52
|
+
Made by Alexandre ZANNI ([@noraj](https://github.com/noraj)), pentester from Orange Cyberdefense.
|
data/docs/_coverpage.md
ADDED
Binary file
|
data/docs/_navbar.md
ADDED
data/docs/_sidebar.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
- Getting started
|
2
|
+
|
3
|
+
- [Quick start](pages/quick-start.md)
|
4
|
+
- [Installation](pages/install.md)
|
5
|
+
- [Usage](pages/usage.md)
|
6
|
+
|
7
|
+
- Guide
|
8
|
+
|
9
|
+
- [Documentation](pages/documentation.md)
|
10
|
+
- [Publishing](pages/publishing.md)
|
11
|
+
|
12
|
+
- [About](About.md)
|
13
|
+
- [Changelog](CHANGELOG.md)
|
data/docs/index.html
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8">
|
5
|
+
<title>Document</title>
|
6
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
7
|
+
<meta name="description" content="Description">
|
8
|
+
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
9
|
+
<link rel="stylesheet" href="vendor/themes/vue.css">
|
10
|
+
</head>
|
11
|
+
<body>
|
12
|
+
<div id="app"></div>
|
13
|
+
<script>
|
14
|
+
window.$docsify = {
|
15
|
+
name: 'ctf-party',
|
16
|
+
repo: 'https://github.com/Orange-Cyberdefense/ctf-party/',
|
17
|
+
loadSidebar: true,
|
18
|
+
subMaxLevel: 2,
|
19
|
+
loadNavbar: true,
|
20
|
+
coverpage: true,
|
21
|
+
logo: '_media/logo.png',
|
22
|
+
themeColor: '#FF6600',
|
23
|
+
search: 'auto',
|
24
|
+
}
|
25
|
+
</script>
|
26
|
+
<script src="vendor/docsify.js"></script>
|
27
|
+
<script src="vendor/plugins/search.min.js"></script>
|
28
|
+
<script src="vendor/plugins/emoji.min.js"></script>
|
29
|
+
<script src="vendor/prismjs/components/prism-ruby.min.js"></script>
|
30
|
+
</body>
|
31
|
+
</html>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# Documentation
|
2
|
+
|
3
|
+
## Server locally
|
4
|
+
|
5
|
+
```
|
6
|
+
$ npm i docsify-cli -g
|
7
|
+
$ docsify serve docs
|
8
|
+
```
|
9
|
+
|
10
|
+
## Library doc
|
11
|
+
|
12
|
+
The output directory of the library documentation will be `docs/yard`.
|
13
|
+
|
14
|
+
You can consult it online [here](https://orange-cyberdefense.github.io/ctf-party/yard/).
|
15
|
+
|
16
|
+
### Building locally: for library users
|
17
|
+
|
18
|
+
For developers who only want to use the library.
|
19
|
+
|
20
|
+
```
|
21
|
+
$ bundle exec yard doc
|
22
|
+
```
|
23
|
+
|
24
|
+
### Building locally: for developer
|
25
|
+
|
26
|
+
For developers who want to participate to the development.
|
27
|
+
|
28
|
+
```
|
29
|
+
$ bundle exec yard doc --yardopts .yardopts-dev
|
30
|
+
```
|
@@ -0,0 +1,84 @@
|
|
1
|
+
# Installation
|
2
|
+
|
3
|
+
## Production
|
4
|
+
|
5
|
+
### Install from rubygems.org
|
6
|
+
|
7
|
+
```
|
8
|
+
$ gem install ctf-party
|
9
|
+
```
|
10
|
+
|
11
|
+
Gem: [ctf-party](https://rubygems.org/gems/ctf-party)
|
12
|
+
|
13
|
+
### Install from BlackArch
|
14
|
+
|
15
|
+
From the repository:
|
16
|
+
|
17
|
+
```
|
18
|
+
# pacman -S ruby-ctf-party
|
19
|
+
```
|
20
|
+
|
21
|
+
From git:
|
22
|
+
|
23
|
+
```
|
24
|
+
# blackman -i ruby-ctf-party
|
25
|
+
```
|
26
|
+
|
27
|
+
PKGBUILD: [ruby-ctf-party](https://github.com/BlackArch/blackarch/blob/master/packages/ruby-ctf-party/PKGBUILD)
|
28
|
+
|
29
|
+
### Install from ArchLinux
|
30
|
+
|
31
|
+
Manually:
|
32
|
+
|
33
|
+
```
|
34
|
+
$ git clone https://aur.archlinux.org/ruby-ctf-party.git
|
35
|
+
$ cd ruby-ctf-rabid
|
36
|
+
$ makepkg -sic
|
37
|
+
```
|
38
|
+
|
39
|
+
With an AUR helper ([Pacman wrappers](https://wiki.archlinux.org/index.php/AUR_helpers#Pacman_wrappers)), eg. pikaur:
|
40
|
+
|
41
|
+
```
|
42
|
+
$ pikaur -S ruby-ctf-rabid
|
43
|
+
```
|
44
|
+
|
45
|
+
AUR: [ruby-ctf-rabid](https://aur.archlinux.org/packages/ruby-ctf-rabid/)
|
46
|
+
|
47
|
+
## Development
|
48
|
+
|
49
|
+
It's better to use [rbenv](https://github.com/rbenv/rbenv) to have latests version of ruby and to avoid trashing your system ruby.
|
50
|
+
|
51
|
+
### Install from rubygems.org
|
52
|
+
|
53
|
+
```
|
54
|
+
$ gem install --development ctf-party
|
55
|
+
```
|
56
|
+
|
57
|
+
### Build from git
|
58
|
+
|
59
|
+
Just replace `x.x.x` with the gem version you see after `gem build`.
|
60
|
+
|
61
|
+
```
|
62
|
+
$ git clone https://github.com/Orange-Cyberdefense/ctf-party.git rabid
|
63
|
+
$ cd ctf-party
|
64
|
+
$ gem install bundler
|
65
|
+
$ bundler install
|
66
|
+
$ gem build ctf_party.gemspec
|
67
|
+
$ gem install ctf-party-x.x.x.gem
|
68
|
+
```
|
69
|
+
|
70
|
+
Note: if an automatic install is needed you can get the version with `$ gem build ctf_party.gemspec | grep Version | cut -d' ' -f4`.
|
71
|
+
|
72
|
+
### Run the library in irb without installing the gem
|
73
|
+
|
74
|
+
From local file:
|
75
|
+
|
76
|
+
```
|
77
|
+
$ irb -Ilib -rctf_party
|
78
|
+
```
|
79
|
+
|
80
|
+
From the installed gem:
|
81
|
+
|
82
|
+
```
|
83
|
+
$ ctf_party_console
|
84
|
+
```
|