ronin-listener 0.1.0.rc1 → 0.1.0.rc2

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: 7caf08ff5f57fb24edcf6a23f1297bbc1844ccfc7b1ab0ffe93bbb0c9fa51de8
4
- data.tar.gz: 7cd8e3db9038d20c459a2eeedb4457dc887219c2ba5e0cd788c7130fc4605108
3
+ metadata.gz: 180d4e9206f0a513b27c4478fdfbfb6726de048dd16a24183cc2560a6b612e8b
4
+ data.tar.gz: 4778b8b7dfb5572789500ca7f0e1e3bb5fc2f7b3bb9d824447f188e57b1ad0c2
5
5
  SHA512:
6
- metadata.gz: 32ea4d3be1b2114fe84e777d69ab5066717aad2d7f7819c9ab503f9373640c6239535640b805f138737f09e7334bab1c2b66d00e9bb1a668c7beb90d5c6272e3
7
- data.tar.gz: f93339653aa627a16b245d76af048aa6871020f1b2a54f5761ec7716ab4e10809882800ffc568d30b4ae929b0e035ed62d269e18299c413181f707098de0e7ff
6
+ metadata.gz: a7c2d03f88123cee3a3f4e0efa461feb38d20e3bc92395b0a501b916ae194ba2e174e25dcc37563163733504a384cd90d260e65040d0cf5b3d976358ccae5116
7
+ data.tar.gz: 8f1892ab5de2e61571933b8a1309d590a1296a21179bfcd818902991b2f1e1882b34a1b361e40373f68c7954a0480c5e0bd9507a7e7322dc702c6fa7892425cd
data/gemspec.yml CHANGED
@@ -2,7 +2,8 @@ name: ronin-listener
2
2
  summary: A Ruby CLI utility for receiving exfiltrated data.
3
3
  description: |
4
4
  ronin-listener is a small CLI utility for receiving exfiltrated data over DNS
5
- or HTTP.
5
+ or HTTP. Supports logging DNS queries and HTTP requests as TXT, CVS, JSON,
6
+ or NDJSON.
6
7
 
7
8
  license: LGPL-3.0
8
9
  authors: Postmodern
@@ -32,7 +33,7 @@ required_ruby_version: ">= 3.0.0"
32
33
  dependencies:
33
34
  # Ronin dependencies:
34
35
  ronin-listener-dns: ~> 0.1.0.rc1
35
- ronin-listener-http: ~> 0.1.0.rc1
36
+ ronin-listener-http: ~> 0.1.0.rc2
36
37
  ronin-core: ~> 0.2.0.rc1
37
38
 
38
39
  development_dependencies:
@@ -112,6 +112,8 @@ module Ronin
112
112
  options[:output_format].open(options[:output])
113
113
  end
114
114
 
115
+ log_info "Listening on #{options[:host]}:#{options[:port]} ..."
116
+
115
117
  Ronin::Listener::DNS.listen(domain,**proxy_kwargs) do |query|
116
118
  log_info "Received DNS query: #{query.type} #{query.label} from #{query.source}"
117
119
  output_file << query if output_file
@@ -120,26 +120,20 @@ module Ronin
120
120
  options[:output_format].open(options[:output])
121
121
  end
122
122
 
123
- Ronin::Listener::HTTP.listen(**server_kwargs) do |request|
124
- remote_addr = request.remote_address
125
-
126
- log_info "Received HTTP request from #{remote_addr.ip_address}:#{remote_addr.ip_port} ..."
127
-
128
- puts "#{request.method} #{request.path}"
123
+ log_info "Listening on #{options[:host]}:#{options[:port]} ..."
129
124
 
130
- request.headers.each do |name,value|
131
- puts "#{name}: #{value}"
132
- end
125
+ Ronin::Listener::HTTP.listen(**server_kwargs) do |request|
126
+ log_info "Received HTTP request from #{request.remote_ip}:#{request.remote_port} ..."
133
127
 
134
- puts request.body if request.body
135
- puts
128
+ print_request(request)
136
129
 
137
130
  output_file << request if output_file
138
131
  end
139
132
  end
140
133
 
141
134
  #
142
- # Maps options to keyword arguments for `Ronin::Listener::HTTP.listen`.
135
+ # Maps options to keyword arguments for
136
+ # `Ronin::Listener::HTTP.listen`.
143
137
  #
144
138
  # @return [Hash{Symbol => Object}]
145
139
  #
@@ -152,6 +146,22 @@ module Ronin
152
146
  }
153
147
  end
154
148
 
149
+ #
150
+ # Prints an HTTP request.
151
+ #
152
+ # @param [Ronin::Listener::HTTP::Request] request
153
+ #
154
+ def print_request(request)
155
+ puts "#{request.method} #{request.path}"
156
+
157
+ request.headers.each do |name,value|
158
+ puts "#{name}: #{value}"
159
+ end
160
+
161
+ puts request.body if request.body
162
+ puts
163
+ end
164
+
155
165
  end
156
166
  end
157
167
  end
@@ -21,6 +21,6 @@
21
21
  module Ronin
22
22
  module Listener
23
23
  # ronin-listener version
24
- VERSION = '0.1.0.rc1'
24
+ VERSION = '0.1.0.rc2'
25
25
  end
26
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ronin-listener
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.rc1
4
+ version: 0.1.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Postmodern
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-23 00:00:00.000000000 Z
11
+ date: 2024-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ronin-listener-dns
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.1.0.rc1
33
+ version: 0.1.0.rc2
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.1.0.rc1
40
+ version: 0.1.0.rc2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: ronin-core
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -68,7 +68,8 @@ dependencies:
68
68
  version: '2.0'
69
69
  description: |
70
70
  ronin-listener is a small CLI utility for receiving exfiltrated data over DNS
71
- or HTTP.
71
+ or HTTP. Supports logging DNS queries and HTTP requests as TXT, CVS, JSON,
72
+ or NDJSON.
72
73
  email: postmodern.mod3@gmail.com
73
74
  executables:
74
75
  - ronin-listener