ctf-party 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cc518fdaca11359e723f1a25e93f159a791efb951098c6ddaf0dde1af2226476
4
- data.tar.gz: b18d37b97167e931c5e5a82303fda9ece61d8c3e460b57c8b280d80f1007be8d
3
+ metadata.gz: 3320dd66b3b305ed07cce2d8e9059f83f5c6c65b763401223af57d157bcbffb4
4
+ data.tar.gz: 4ae59e35eb39beb3641cfa9e5d22609f93e18b9540884876d3982ab4ab7cc97e
5
5
  SHA512:
6
- metadata.gz: 9faca804bb4b67d01553d11516ba50eecfceff4d2ffad6c2a38c1db072b31e90b7740226637f45fca2b431d342be21457a4bc4ffd5f25fea9d015ff93ed89625
7
- data.tar.gz: fd5d70b588e54e6c863532ea2b11955d551242331b0e8c68f611ff6287bbb1259e6ebaf824b73310026c3ff93e4234c606abe0e118f3dba2d774d4d9a66a3d1a
6
+ metadata.gz: 72c0b492360e7a52af7e3abe000c275accc183f28ea3ca9753fdc92e43258abc45967cb0aa79448ebdcbd118d65aba33435c37354ba0595a0f3459d591b4d37b
7
+ data.tar.gz: '0907211c7da78180930cfb8243169ae4bb3f63515fa3fd1538b576fa11f34e3278796c757dd494b6f206bca0b6dd09bda2e0308b7e3f42713cf40410e279e3b2'
@@ -1,6 +1,7 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2019 Alexandre ZANNI
3
+ Copyright (c) 2020-2020 Alexandre ZANNI
4
+ Copyright (c) 2019-2020 Alexandre ZANNI at Orange Cyberdefense
4
5
 
5
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
7
  of this software and associated documentation files (the "Software"), to deal
@@ -74,14 +74,15 @@ class String
74
74
  (?:[a-zA-Z0-9+/]{2}==)|(?:[a-zA-Z0-9+/]{1}===))\Z}xn
75
75
  reg3 = /\A(?:[a-zA-Z0-9\-_]{4})*(?:|(?:[a-zA-Z0-9\-_]{3}=)|
76
76
  (?:[a-zA-Z0-9\-_]{2}==)|(?:[a-zA-Z0-9\-_]{1}===))\Z/xn
77
- if opts[:mode] == :strict || opts[:mode] == :rfc4648
77
+ case opts[:mode]
78
+ when :strict, :rfc4648
78
79
  b64 = true if reg1.match?(self)
79
- elsif opts[:mode] == :rfc2045
80
+ when :rfc2045
80
81
  b64 = true
81
82
  split("\n").each do |s|
82
83
  b64 = false unless reg1.match?(s)
83
84
  end
84
- elsif opts[:mode] == :urlsafe
85
+ when :urlsafe
85
86
  b64 = true if reg3.match?(self)
86
87
  else
87
88
  raise ArgumentError 'Wrong mode'
@@ -16,8 +16,6 @@ class String
16
16
  @@flag
17
17
  end
18
18
 
19
- # rubocop:disable Metrics/LineLength
20
-
21
19
  # Update the flag configuration.
22
20
  # @param hash [Hash] flag configuration
23
21
  # @option hash [String] :prefix prefix of the flag. Default: none.
@@ -40,8 +38,6 @@ class String
40
38
  @@flag.merge!(hash)
41
39
  end
42
40
 
43
- # rubocop:enable Metrics/LineLength
44
-
45
41
  # Format the current string into the configured flag format. See {.flag=}
46
42
  # example.
47
43
  # @return [String] the format flag.
@@ -78,9 +78,10 @@ class String
78
78
  opts[:nibble] ||= :high
79
79
  # convert
80
80
  out = ''
81
- if opts[:nibble] == :high
81
+ case opts[:nibble]
82
+ when :high
82
83
  out = unpack1('H*')
83
- elsif opts[:nibble] == :low
84
+ when :low
84
85
  out = unpack1('h*')
85
86
  end
86
87
  # char case management
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Version
4
- VERSION = '1.2.0'
4
+ VERSION = '1.2.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ctf-party
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandre ZANNI
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-03 00:00:00.000000000 Z
11
+ date: 2020-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -140,17 +140,17 @@ files:
140
140
  - lib/ctf_party/hex.rb
141
141
  - lib/ctf_party/rot.rb
142
142
  - lib/ctf_party/version.rb
143
- homepage: https://orange-cyberdefense.github.io/ctf-party/
143
+ homepage: https://noraj.github.io/ctf-party/
144
144
  licenses:
145
145
  - MIT
146
146
  metadata:
147
147
  yard.run: yard
148
- bug_tracker_uri: https://github.com/Orange-Cyberdefense/ctf-party/issues
149
- changelog_uri: https://github.com/Orange-Cyberdefense/ctf-party/blob/master/docs/CHANGELOG.md
150
- documentation_uri: https://orange-cyberdefense.github.io/ctf-party/
151
- homepage_uri: https://orange-cyberdefense.github.io/ctf-party/
152
- source_code_uri: https://github.com/Orange-Cyberdefense/ctf-party/
153
- post_install_message:
148
+ bug_tracker_uri: https://github.com/noraj/ctf-party/issues
149
+ changelog_uri: https://github.com/noraj/ctf-party/blob/master/docs/CHANGELOG.md
150
+ documentation_uri: https://noraj.github.io/ctf-party/
151
+ homepage_uri: https://noraj.github.io/ctf-party/
152
+ source_code_uri: https://github.com/noraj/ctf-party/
153
+ post_install_message:
154
154
  rdoc_options: []
155
155
  require_paths:
156
156
  - lib
@@ -158,7 +158,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
158
158
  requirements:
159
159
  - - "~>"
160
160
  - !ruby/object:Gem::Version
161
- version: '2.4'
161
+ version: '2.7'
162
162
  required_rubygems_version: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - ">="
@@ -166,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
166
166
  version: '0'
167
167
  requirements: []
168
168
  rubygems_version: 3.1.2
169
- signing_key:
169
+ signing_key:
170
170
  specification_version: 4
171
171
  summary: A library to enhance and speed up script/exploit writing for CTF players
172
172
  test_files: []