This repository has been archived by the owner on Sep 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alexandre ZANNI
committed
Nov 20, 2019
0 parents
commit 94924bf
Showing
56 changed files
with
6,207 additions
and
0 deletions.
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,21 @@ | ||
# EditorConfig: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
|
||
# ruby | ||
[*.rb] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
trim_trailing_whitespace = true | ||
|
||
# keep source format | ||
[data/prototypes.json] | ||
indent_style = space | ||
indent_size = 4 |
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,8 @@ | ||
.yardoc | ||
*.gem | ||
/pkg | ||
/doc | ||
/vendor | ||
.bundle/ | ||
/node_modules | ||
.git |
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,29 @@ | ||
# Metrics | ||
AllCops: | ||
TargetRubyVersion: 2.4 | ||
|
||
Layout/AlignHash: | ||
Include: | ||
- 'lib/**/*.rb' | ||
Metrics/AbcSize: | ||
Enabled: false | ||
Metrics/ClassLength: | ||
Max: 200 | ||
Metrics/CyclomaticComplexity: | ||
Enabled: false | ||
Metrics/LineLength: | ||
Include: | ||
- 'lib/**/*.rb' | ||
Metrics/BlockNesting: | ||
Exclude: | ||
- 'bin/*' | ||
Metrics/MethodLength: | ||
Max: 25 | ||
Metrics/PerceivedComplexity: | ||
Max: 10 | ||
Style/ClassVars: | ||
Enabled: false | ||
Style/Documentation: | ||
Enabled: false | ||
Style/RedundantReturn: | ||
Enabled: false |
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,4 @@ | ||
--output-dir docs/yard | ||
- | ||
--main README.md | ||
LICENSE.txt |
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,6 @@ | ||
--output-dir docs/yard | ||
--protected | ||
--private | ||
- | ||
--main README.md | ||
LICENSE.txt |
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,6 @@ | ||
# frozen_string_literal: true | ||
|
||
source 'https://rubygems.org' | ||
|
||
# Specify your gem's dependencies in .gemspec | ||
gemspec |
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 @@ | ||
PATH | ||
remote: . | ||
specs: | ||
ctf-party (1.0.0) | ||
|
||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
ast (2.4.0) | ||
commonmarker (0.20.1) | ||
ruby-enum (~> 0.5) | ||
concurrent-ruby (1.1.5) | ||
github-markup (3.0.4) | ||
i18n (1.7.0) | ||
concurrent-ruby (~> 1.0) | ||
jaro_winkler (1.5.3) | ||
minitest (5.12.2) | ||
parallel (1.18.0) | ||
parser (2.6.5.0) | ||
ast (~> 2.4.0) | ||
rainbow (3.0.0) | ||
rake (12.3.3) | ||
redcarpet (3.5.0) | ||
rubocop (0.75.1) | ||
jaro_winkler (~> 1.5.1) | ||
parallel (~> 1.10) | ||
parser (>= 2.6) | ||
rainbow (>= 2.2.2, < 4.0) | ||
ruby-progressbar (~> 1.7) | ||
unicode-display_width (>= 1.4.0, < 1.7) | ||
ruby-enum (0.7.2) | ||
i18n | ||
ruby-progressbar (1.10.1) | ||
unicode-display_width (1.6.0) | ||
yard (0.9.20) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
bundler (~> 2.0) | ||
commonmarker (~> 0.20) | ||
ctf-party! | ||
github-markup (~> 3.0) | ||
minitest (~> 5.11) | ||
rake (~> 12.3) | ||
redcarpet (~> 3.4) | ||
rubocop (~> 0.63) | ||
yard (~> 0.9) | ||
|
||
BUNDLED WITH | ||
2.0.2 |
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,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2019 Alexandre ZANNI | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
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,57 @@ | ||
# ctf-party | ||
|
||
[![Gem Version](https://badge.fury.io/rb/ctf-party.svg)](https://badge.fury.io/rb/ctf-party) | ||
![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/Orange-Cyberdefense/ctf-party) | ||
[![GitHub forks](https://img.shields.io/github/forks/Orange-Cyberdefense/ctf-party)](https://github.com/Orange-Cyberdefense/ctf-party/network) | ||
[![GitHub stars](https://img.shields.io/github/stars/Orange-Cyberdefense/ctf-party)](https://github.com/Orange-Cyberdefense/ctf-party/stargazers) | ||
[![GitHub license](https://img.shields.io/github/license/Orange-Cyberdefense/ctf-party)](https://github.com/Orange-Cyberdefense/ctf-party/blob/master/LICENSE.txt) | ||
[![Rawsec's CyberSecurity Inventory](https://inventory.rawsec.ml/img/badges/Rawsec-inventoried-FF5050_flat.svg)](https://inventory.rawsec.ml/tools.html#ctf-party) | ||
|
||
[![Packaging status](https://repology.org/badge/vertical-allrepos/ctf-party.svg)](https://repology.org/project/ctf-party/versions) | ||
|
||
![](https://orange-cyberdefense.github.io/ctf-party/_media/logo.png) | ||
|
||
|
||
## What it is | ||
|
||
A library to enhance and speed up script/exploit writting for CTF players (or | ||
security researchers, bug bounty hunters, pentesters but mostly focused on CTF) | ||
by patching the String class to add a short syntax of usual code patterns. | ||
The philosophy is also to keep the library to be pure ruby (no dependencies) | ||
and not to re-implement what another library is already doing well | ||
(eg.[xorcist] for xor). | ||
|
||
[xorcist]:https://github.com/fny/xorcist | ||
|
||
For example instead of writting: | ||
|
||
```ruby | ||
require 'base64' | ||
|
||
myvar = 'string' | ||
myvar = Base64.strict_encode64(myvar) | ||
``` | ||
|
||
Just write (shorter and easier to remember): | ||
|
||
```ruby | ||
require 'ctf_library' | ||
|
||
myvar = 'string' | ||
myvar.to_b64! | ||
``` | ||
|
||
## Features | ||
|
||
- base64: `to_b64`, `to_b64!`, `from_b64`, `from_b64!`, `b64?` | ||
- digest: `md5`, `md5!`, `sha1`, `sha1!`, etc. | ||
- flag: `flag`, `flag!`, `flag?` (apply/check a flag format) | ||
- rot: `rot`, `rot!`, `rot13`, `rot13!` | ||
|
||
## References | ||
|
||
Homepage / Documentation: https://orange-cyberdefense.github.io/ctf-party/ | ||
|
||
## Author | ||
|
||
Made by Alexandre ZANNI ([@noraj](https://github.com/noraj)), pentester from Orange Cyberdefense. |
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,11 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'rake/testtask' | ||
require 'bundler/gem_tasks' | ||
|
||
Rake::TestTask.new do |t| | ||
t.libs << 'test' | ||
end | ||
|
||
desc 'Run tests' | ||
task default: :test |
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,7 @@ | ||
#!/usr/bin/env ruby | ||
# frozen_string_literal: true | ||
|
||
require 'ctf_party' | ||
require 'irb' | ||
|
||
IRB.start(__FILE__) |
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,6 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
IFS=$'\n\t' | ||
set -vx | ||
|
||
bundle install |
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 @@ | ||
# frozen_string_literal: true | ||
|
||
lib = File.expand_path('lib', __dir__) | ||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | ||
require 'ctf_party/version' | ||
|
||
Gem::Specification.new do |s| | ||
s.name = 'ctf-party' | ||
s.version = Version::VERSION | ||
s.platform = Gem::Platform::RUBY | ||
s.date = '2019-11-19' | ||
s.summary = 'A library to enhance and speed up script/exploit writting'\ | ||
' for CTF players' | ||
s.description = 'A library to enhance and speed up script/exploit writting'\ | ||
'for CTF players (or security researchers, bug bounty'\ | ||
'hunters, pentesters but mostly focused on CTF) by'\ | ||
'patching the String class to add a short syntax of usual'\ | ||
' code patterns.' | ||
s.authors = ['Alexandre ZANNI'] | ||
s.email = 'alexandre.zanni@engineer.com' | ||
s.homepage = 'https://orange-cyberdefense.github.io/ctf-party/' | ||
s.license = 'MIT' | ||
|
||
s.files = Dir['docs/**/*'] + Dir['lib/**/*.rb'] + Dir['test/*.rb'] | ||
s.files += Dir['bin/*'] + ['docs/.nojekyll', 'Rakefile'] | ||
s.files += ['README.md', 'LICENSE.txt', 'Gemfile.lock', 'Gemfile'] | ||
s.files += ['.yardopts-dev', '.yardopts', '.rubocop.yml'] | ||
s.bindir = 'bin' | ||
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) } | ||
s.test_files = s.files.grep(%r{^(test)/}) | ||
s.require_paths = ['lib'] | ||
|
||
s.metadata = { | ||
'yard.run' => 'yard', | ||
'bug_tracker_uri' => 'https://github.com/Orange-Cyberdefense/ctf-party/issues', | ||
'changelog_uri' => 'https://github.com/Orange-Cyberdefense/ctf-party/blob/master/docs/CHANGELOG.md', | ||
'documentation_uri' => 'https://orange-cyberdefense.github.io/ctf-party/', | ||
'homepage_uri' => 'https://orange-cyberdefense.github.io/ctf-party/', | ||
'source_code_uri' => 'https://github.com/Orange-Cyberdefense/ctf-party/' | ||
} | ||
|
||
s.required_ruby_version = '~> 2.4' | ||
|
||
s.add_development_dependency('bundler', '~> 2.0') | ||
s.add_development_dependency('commonmarker', '~> 0.20') # for GMF support in YARD | ||
s.add_development_dependency('github-markup', '~> 3.0') # for GMF support in YARD | ||
s.add_development_dependency('minitest', '~> 5.11') | ||
s.add_development_dependency('rake', '~> 12.3') | ||
s.add_development_dependency('redcarpet', '~> 3.4') # for GMF support in YARD | ||
s.add_development_dependency('rubocop', '~> 0.63') | ||
s.add_development_dependency('yard', '~> 0.9') | ||
end |
Empty file.
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,5 @@ | ||
# About | ||
|
||
## Logo | ||
|
||
Logo made with [DesignEvo](https://www.designevo.com). |
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,5 @@ | ||
# Changelog | ||
|
||
## [1.0.0] | ||
|
||
- Initial version |
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 @@ | ||
# ctf-party | ||
|
||
[![Gem Version](https://badge.fury.io/rb/ctf-party.svg)](https://badge.fury.io/rb/ctf-party) | ||
![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/Orange-Cyberdefense/ctf-party) | ||
[![GitHub forks](https://img.shields.io/github/forks/Orange-Cyberdefense/ctf-party)](https://github.com/Orange-Cyberdefense/ctf-party/network) | ||
[![GitHub stars](https://img.shields.io/github/stars/Orange-Cyberdefense/ctf-party)](https://github.com/Orange-Cyberdefense/ctf-party/stargazers) | ||
[![GitHub license](https://img.shields.io/github/license/Orange-Cyberdefense/ctf-party)](https://github.com/Orange-Cyberdefense/ctf-party/blob/master/LICENSE.txt) | ||
[![Rawsec's CyberSecurity Inventory](https://inventory.rawsec.ml/img/badges/Rawsec-inventoried-FF5050_flat.svg)](https://inventory.rawsec.ml/tools.html#ctf-party) | ||
|
||
## What it is | ||
|
||
A library to enhance and speed up script/exploit writting for CTF players (or | ||
security researchers, bug bounty hunters, pentesters but mostly focused on CTF) | ||
by patching the String class to add a short syntax of usual code patterns. | ||
The philosophy is also to keep the library to be pure ruby (no dependencies) | ||
and not to re-implement what another library is already doing well | ||
(eg.[xorcist] for xor). | ||
|
||
[xorcist]:https://github.com/fny/xorcist | ||
|
||
For example instead of writting: | ||
|
||
```ruby | ||
require 'base64' | ||
|
||
myvar = 'string' | ||
myvar = Base64.strict_encode64(myvar) | ||
``` | ||
|
||
Just write (shorter and easier to remember): | ||
|
||
```ruby | ||
require 'ctf_party' | ||
|
||
myvar = 'string' | ||
myvar.to_b64! | ||
``` | ||
|
||
## Features | ||
|
||
- base64: `to_b64`, `to_b64!`, `from_b64`, `from_b64!`, `b64?` | ||
- digest: `md5`, `md5!`, `sha1`, `sha1!`, etc. | ||
- flag: `flag`, `flag!`, `flag?` (apply/check a flag format) | ||
- rot: `rot`, `rot!`, `rot13`, `rot13!` | ||
|
||
## References | ||
|
||
Homepage / Documentation: https://orange-cyberdefense.github.io/ctf-party/ | ||
|
||
## Author | ||
|
||
Made by Alexandre ZANNI ([@noraj](https://github.com/noraj)), pentester from Orange Cyberdefense. |
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,10 @@ | ||
![](_media/logo.png) | ||
|
||
# ctf-party | ||
|
||
A Ruby library to enhance and speed up script/exploit writting for CTF players. | ||
|
||
[GitHub](https://github.com/Orange-Cyberdefense/ctf-party/) | ||
[Get Started](pages/quick-start?id=quick-start) | ||
|
||
![color](#ffffff) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,3 @@ | ||
- [Home](/) | ||
- [Doc](https://orange-cyberdefense.github.io/ctf-party/yard/) | ||
- [Source](https://github.com/Orange-Cyberdefense/ctf-rabid/) |
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,13 @@ | ||
- Getting started | ||
|
||
- [Quick start](pages/quick-start.md) | ||
- [Installation](pages/install.md) | ||
- [Usage](pages/usage.md) | ||
|
||
- Guide | ||
|
||
- [Documentation](pages/documentation.md) | ||
- [Publishing](pages/publishing.md) | ||
|
||
- [About](About.md) | ||
- [Changelog](CHANGELOG.md) |
Oops, something went wrong.