modules/post/windows/manage/sdel.rb
Method initialize
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize(info = {})
super(
update_info(
info,
'Name' => 'Windows Manage Safe Delete',
Method file_overwrite
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def file_overwrite(file, type, n)
# FILE_FLAG_WRITE_THROUGH: Write operations will go directly to disk
r = session.railgun.kernel32.CreateFileA(file, 'GENERIC_WRITE', 'FILE_SHARE_READ|FILE_SHARE_WRITE', nil, 'OPEN_EXISTING', 'FILE_FLAG_WRITE_THROUGH', 0)
handle = r['return']
real_size = size_on_disk(file)