rex-text 0.2.39 → 0.2.42

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: 6bffdfea7c55e2707e258f7d6dd3dc9afbfe55d798c2c61aa85765d069a98121
4
- data.tar.gz: '09908c92febd56164687e8c472bc6aa8e3f4059a5ea28fcb847e48fe89b712ba'
3
+ metadata.gz: 5316dd362fddbaf996e0a087a07d597caf1161d863dd0db11b21cdeabe6f46ed
4
+ data.tar.gz: 57a82d23c177b15a6f8f74a2ed6e248a9af0a0c781d173d5bf2f0116f6cd4422
5
5
  SHA512:
6
- metadata.gz: b3b7064a20270a251ae0a1f86581c42f9fa9ba96ca231e790545713cf34420492a975c84279b5da7f3f01c20a0889cbad4940b16e2442d0145a3838189d7504c
7
- data.tar.gz: 7629d0abf3b69bab460a9d3063d347155a36d2c50ea2b9e9e1baa27db189419e330c3de7de5ef8a00d4e2c743bffc9b4f2b99f508c527ce67f7bb29f17f70ce7
6
+ metadata.gz: 1e88f3f3a165d96e27437bc9ccf237bd2d00c7324f4de1a7ba968ef6dda2faa74923fcdf53d4d8f656d6676d083c7cd40228c5cfcbbe3de81de4821984bfdfbb
7
+ data.tar.gz: c2d1b0e804f3fcb61cbda3cb2340dacc3a9f80d4ba02d531adf9c0f5748d481d9288caf1f6cb63cd6427b3dcb0f6bcb7663444eea6f5644d373c79caaa5c7b95
checksums.yaml.gz.sig CHANGED
Binary file
@@ -37,11 +37,11 @@ jobs:
37
37
  - 3.0
38
38
  - 3.1
39
39
  os:
40
- - ubuntu-18.04
41
- - ubuntu-22.04
40
+ - ubuntu-20.04
41
+ - ubuntu-latest
42
42
  exclude:
43
- - { os: ubuntu-22.04, ruby: 2.7 }
44
- - { os: ubuntu-22.04, ruby: 3.0 }
43
+ - { os: ubuntu-latest, ruby: 2.7 }
44
+ - { os: ubuntu-latest, ruby: 3.0 }
45
45
  test_cmd:
46
46
  - bundle exec rspec
47
47
 
data/lib/rex/text/lang.rb CHANGED
@@ -38,6 +38,28 @@ module Rex
38
38
  ret << " };\n"
39
39
  end
40
40
 
41
+ #
42
+ # Converts to a golang style array of bytes
43
+ #
44
+ def self.to_golang(str, wrap = DefaultWrap, name = "buf")
45
+ ret = "#{name} := []byte{"
46
+ i = -1;
47
+ while (i += 1) < str.length
48
+ ret << "\n" if i%(wrap/4) == 0
49
+ ret << "0x" << str[i].unpack("H*")[0] << ", "
50
+ end
51
+ ret = ret[0..ret.length-3] #cut off last comma
52
+ ret << " }\n"
53
+
54
+ end
55
+
56
+ #
57
+ # Creates a golang style comment
58
+ #
59
+ def self.to_golang_comment(str, wrap = DefaultWrap)
60
+ return "/*\n" + wordwrap(str, 0, wrap, '', '') + "*/\n"
61
+ end
62
+
41
63
  #
42
64
  # Creates a c-style comment
43
65
  #
@@ -1,5 +1,5 @@
1
1
  module Rex
2
2
  module Text
3
- VERSION = "0.2.39"
3
+ VERSION = "0.2.42"
4
4
  end
5
5
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rex-text
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.39
4
+ version: 0.2.42
5
5
  platform: ruby
6
6
  authors:
7
7
  - Metasploit Hackers
@@ -93,7 +93,7 @@ cert_chain:
93
93
  EknWpNgVhohbot1lfVAMmIhdtOVaRVcQQixWPwprDj/ydB8ryDMDosIMcw+fkoXU
94
94
  9GJsSaSRRYQ9UUkVL27b64okU8D48m8=
95
95
  -----END CERTIFICATE-----
96
- date: 2022-08-08 00:00:00.000000000 Z
96
+ date: 2022-09-01 00:00:00.000000000 Z
97
97
  dependencies:
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: rake
metadata.gz.sig CHANGED
Binary file