ronin-listener 0.1.0.rc2 → 0.1.0

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: 180d4e9206f0a513b27c4478fdfbfb6726de048dd16a24183cc2560a6b612e8b
4
- data.tar.gz: 4778b8b7dfb5572789500ca7f0e1e3bb5fc2f7b3bb9d824447f188e57b1ad0c2
3
+ metadata.gz: b8add48e4efe85621678d887dc4abac281a6b773aed650c968aa012c7dcf482d
4
+ data.tar.gz: 31b11c3f616ba4c77efc08d7ac5c83bc73a1ec015e7cd824cf48a61f5769ecd3
5
5
  SHA512:
6
- metadata.gz: a7c2d03f88123cee3a3f4e0efa461feb38d20e3bc92395b0a501b916ae194ba2e174e25dcc37563163733504a384cd90d260e65040d0cf5b3d976358ccae5116
7
- data.tar.gz: 8f1892ab5de2e61571933b8a1309d590a1296a21179bfcd818902991b2f1e1882b34a1b361e40373f68c7954a0480c5e0bd9507a7e7322dc702c6fa7892425cd
6
+ metadata.gz: 60f82e8b52496b0492547f96f44062e561e12f5b419384426131d8d70389917a87b78cd726b07ab9a55c1291ec2629fd47b02b81a8a1c19fe21d4495281e7666
7
+ data.tar.gz: a73da44c738b54cd5d000925f1481baf8843c0a37163a21451e3cf1b0f108066ab93402ed7eee3ec56ab5f3d9f7630ab5e2d2f35524238483301743253a3f7e4
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-3.1
1
+ ruby-3.3
data/ChangeLog.md CHANGED
@@ -1,4 +1,4 @@
1
- ### 0.1.0 / 2024-XX-XX
1
+ ### 0.1.0 / 2024-07-22
2
2
 
3
3
  * Initial release:
4
4
  * Supports starting a DNS server for receiving exfiltrated data via DNS
@@ -11,7 +11,7 @@ _ronin-listener_completions_filter() {
11
11
 
12
12
  if [[ "${cur:0:1}" == "-" ]]; then
13
13
  echo "$words"
14
-
14
+
15
15
  else
16
16
  for word in $words; do
17
17
  [[ "${word:0:1}" != "-" ]] && result+=("$word")
@@ -29,75 +29,75 @@ _ronin-listener_completions() {
29
29
 
30
30
  case "$compline" in
31
31
  'new http'*'--vhost')
32
- while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A hostname -- "$cur" )
32
+ while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A hostname -- "$cur")
33
33
  ;;
34
34
 
35
35
  'new http'*'--root')
36
- while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" )
36
+ while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A directory -- "$cur")
37
37
  ;;
38
38
 
39
39
  'http'*'--output')
40
- while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" )
40
+ while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A file -- "$cur")
41
41
  ;;
42
42
 
43
43
  'dns'*'--output')
44
- while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" )
44
+ while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A file -- "$cur")
45
45
  ;;
46
46
 
47
47
  'http'*'--vhost')
48
- while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A hostname -- "$cur" )
48
+ while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A hostname -- "$cur")
49
49
  ;;
50
50
 
51
- 'http'*'--root')
52
- while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" )
51
+ 'new http'*'-R')
52
+ while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A directory -- "$cur")
53
53
  ;;
54
54
 
55
- 'new http'*'-R')
56
- while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" )
55
+ 'http'*'--root')
56
+ while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A directory -- "$cur")
57
57
  ;;
58
58
 
59
59
  'completion'*)
60
- while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-listener_completions_filter "--print --install --uninstall")" -- "$cur" )
60
+ while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ronin-listener_completions_filter "--print --install --uninstall")" -- "$cur")
61
61
  ;;
62
62
 
63
63
  'new http'*)
64
- while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-listener_completions_filter "--host -H --port -p --vhost --root -R")" -- "$cur" )
64
+ while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ronin-listener_completions_filter "--host -H --port -p --vhost --root -R")" -- "$cur")
65
65
  ;;
66
66
 
67
67
  'http'*'-o')
68
- while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" )
68
+ while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A file -- "$cur")
69
69
  ;;
70
70
 
71
71
  'http'*'-R')
72
- while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" )
72
+ while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A directory -- "$cur")
73
73
  ;;
74
74
 
75
75
  'new dns'*)
76
- while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-listener_completions_filter "--host -H --port -p --domain -d")" -- "$cur" )
76
+ while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ronin-listener_completions_filter "--host -H --port -p --domain -d")" -- "$cur")
77
77
  ;;
78
78
 
79
79
  'dns'*'-o')
80
- while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" )
80
+ while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A file -- "$cur")
81
81
  ;;
82
82
 
83
83
  'http'*)
84
- while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-listener_completions_filter "--output -o --output-format -F --host -H --port -p --vhost --root -R")" -- "$cur" )
84
+ while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ronin-listener_completions_filter "--output -o --output-format -F --host -H --port -p --vhost --root -R")" -- "$cur")
85
85
  ;;
86
86
 
87
- 'dns'*)
88
- while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-listener_completions_filter "--output -o --output-format -F --host -H --port -p")" -- "$cur" )
87
+ 'new'*)
88
+ while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ronin-listener_completions_filter "help dns http")" -- "$cur")
89
89
  ;;
90
90
 
91
- 'new'*)
92
- while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-listener_completions_filter "help dns http")" -- "$cur" )
91
+ 'dns'*)
92
+ while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ronin-listener_completions_filter "--output -o --output-format -F --host -H --port -p")" -- "$cur")
93
93
  ;;
94
94
 
95
95
  *)
96
- while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-listener_completions_filter "--version -V help completion dns http new")" -- "$cur" )
96
+ while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ronin-listener_completions_filter "--version -V help completion dns http new")" -- "$cur")
97
97
  ;;
98
98
 
99
99
  esac
100
100
  } &&
101
- complete -F _ronin-listener_completions ronin-listener
101
+ complete -F _ronin-listener_completions ronin-listener
102
102
 
103
103
  # ex: filetype=sh
data/gemspec.yml CHANGED
@@ -32,9 +32,9 @@ required_ruby_version: ">= 3.0.0"
32
32
 
33
33
  dependencies:
34
34
  # Ronin dependencies:
35
- ronin-listener-dns: ~> 0.1.0.rc1
36
- ronin-listener-http: ~> 0.1.0.rc2
37
- ronin-core: ~> 0.2.0.rc1
35
+ ronin-listener-dns: ~> 0.1
36
+ ronin-listener-http: ~> 0.1
37
+ ronin-core: ~> 0.2
38
38
 
39
39
  development_dependencies:
40
40
  bundler: ~> 2.0
@@ -108,13 +108,13 @@ module Ronin
108
108
  # The `DOMAIN` argument.
109
109
  #
110
110
  def run(domain)
111
- output_file = if options[:output] && options[:output_format]
111
+ output_file = if options[:output]
112
112
  options[:output_format].open(options[:output])
113
113
  end
114
114
 
115
115
  log_info "Listening on #{options[:host]}:#{options[:port]} ..."
116
116
 
117
- Ronin::Listener::DNS.listen(domain,**proxy_kwargs) do |query|
117
+ Ronin::Listener::DNS.listen(domain,**server_kwargs) do |query|
118
118
  log_info "Received DNS query: #{query.type} #{query.label} from #{query.source}"
119
119
  output_file << query if output_file
120
120
  end
@@ -125,7 +125,7 @@ module Ronin
125
125
  #
126
126
  # @return [Hash{Symbol => Object}]
127
127
  #
128
- def proxy_kwargs
128
+ def server_kwargs
129
129
  {
130
130
  host: options[:host],
131
131
  port: options[:port]
@@ -116,7 +116,7 @@ module Ronin
116
116
  # Runs the `ronin-listener http` command.
117
117
  #
118
118
  def run
119
- output_file = if options[:output] && options[:output_format]
119
+ output_file = if options[:output]
120
120
  options[:output_format].open(options[:output])
121
121
  end
122
122
 
@@ -125,7 +125,7 @@ module Ronin
125
125
  Ronin::Listener::HTTP.listen(**server_kwargs) do |request|
126
126
  log_info "Received HTTP request from #{request.remote_ip}:#{request.remote_port} ..."
127
127
 
128
- print_request(request)
128
+ puts(request)
129
129
 
130
130
  output_file << request if output_file
131
131
  end
@@ -146,22 +146,6 @@ module Ronin
146
146
  }
147
147
  end
148
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
-
165
149
  end
166
150
  end
167
151
  end
@@ -21,6 +21,6 @@
21
21
  module Ronin
22
22
  module Listener
23
23
  # ronin-listener version
24
- VERSION = '0.1.0.rc2'
24
+ VERSION = '0.1.0'
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.rc2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Postmodern
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-06 00:00:00.000000000 Z
11
+ date: 2024-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ronin-listener-dns
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.1.0.rc1
19
+ version: '0.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.1.0.rc1
26
+ version: '0.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: ronin-listener-http
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.1.0.rc2
33
+ version: '0.1'
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.rc2
40
+ version: '0.1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: ronin-core
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.2.0.rc1
47
+ version: '0.2'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.2.0.rc1
54
+ version: '0.2'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
147
  - !ruby/object:Gem::Version
148
148
  version: '0'
149
149
  requirements: []
150
- rubygems_version: 3.3.27
150
+ rubygems_version: 3.5.11
151
151
  signing_key:
152
152
  specification_version: 4
153
153
  summary: A Ruby CLI utility for receiving exfiltrated data.