Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion app/models/mdm/listener.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,16 @@ class Mdm::Listener < ApplicationRecord
#

# @!attribute address
# The IP address to which the listener is bound.
# The local IP address to which the listener is bound (used as the
# handler's +ReverseListenerBindAddress+).
#
# @return [String]

# @!attribute callback_address
# The IP address or hostname the payload connects back to (used as the
# handler's +LHOST+). This is the address that must be routable from the
# target and may differ from {#address} when NAT or port forwarding is in
# use.
#
# @return [String]

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AddCallbackAddressToListeners < ActiveRecord::Migration[7.0]
def change
add_column :listeners, :callback_address, :text
end
end
1 change: 1 addition & 0 deletions spec/app/models/mdm/listener_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
it { is_expected.to have_db_column(:owner).of_type(:text) }
it { is_expected.to have_db_column(:payload).of_type(:text) }
it { is_expected.to have_db_column(:address).of_type(:text) }
it { is_expected.to have_db_column(:callback_address).of_type(:text) }
it { is_expected.to have_db_column(:port).of_type(:integer) }
it { is_expected.to have_db_column(:options).of_type(:binary) }
it { is_expected.to have_db_column(:macro).of_type(:text) }
Expand Down
4 changes: 3 additions & 1 deletion spec/dummy/db/structure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,8 @@ CREATE TABLE public.listeners (
address text,
port integer,
options bytea,
macro text
macro text,
callback_address text
);


Expand Down Expand Up @@ -3605,6 +3606,7 @@ INSERT INTO "schema_migrations" (version) VALUES
('20251231162000'),
('20260130124052'),
('20260411000000'),
('20260728000000'),
('21'),
('22'),
('23'),
Expand Down
Loading