Skip to content

Commit 5ec4f25

Browse files
authored
Class variable changed back to an instance variable
1 parent 03a1aee commit 5ec4f25

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

modules/auxiliary/scanner/dcerpc/nrpc_enumusers.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class MetasploitModule < Msf::Auxiliary
88
include Msf::Auxiliary::Scanner
99
include Msf::Exploit::Remote::DCERPC
1010
Netlogon = RubySMB::Dcerpc::Netlogon
11-
@@dport = nil
11+
@dport = nil
1212

1313
def initialize(info = {})
1414
super(
@@ -44,12 +44,12 @@ def initialize(info = {})
4444
end
4545

4646
def bind_to_netlogon_service
47-
@@dport = datastore['RPORT']
48-
if @@dport.nil? || @@dport == 0
49-
@@dport = dcerpc_endpoint_find_tcp(datastore['RHOST'], Netlogon::UUID, '1.0', 'ncacn_ip_tcp')
50-
fail_with(Failure::NotFound, 'Could not determine the RPC port used by the Microsoft Netlogon Server') unless @@dport
47+
@dport = datastore['RPORT']
48+
if @dport.nil? || @dport == 0
49+
@dport = dcerpc_endpoint_find_tcp(datastore['RHOST'], Netlogon::UUID, '1.0', 'ncacn_ip_tcp')
50+
fail_with(Failure::NotFound, 'Could not determine the RPC port used by the Microsoft Netlogon Server') unless @dport
5151
end
52-
handle = dcerpc_handle(Netlogon::UUID, '1.0', 'ncacn_ip_tcp', [@@dport])
52+
handle = dcerpc_handle(Netlogon::UUID, '1.0', 'ncacn_ip_tcp', [@dport])
5353
print_status("Binding to #{handle}...")
5454
dcerpc_bind(handle)
5555
end
@@ -75,7 +75,7 @@ def dsr_get_dc_name_ex2(username)
7575
def report_username(domain, username)
7676
service_data = {
7777
address: datastore['RHOST'],
78-
port: @@dport,
78+
port: @dport,
7979
service_name: 'netlogon',
8080
protocol: 'tcp',
8181
workspace_id: myworkspace_id

0 commit comments

Comments
 (0)