rapid7/metasploit-framework

View on GitHub
modules/post/windows/manage/sdel.rb

Summary

Maintainability
A
2 hrs
Test Coverage

Method initialize has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def initialize(info = {})
    super(
      update_info(
        info,
        'Name'    => 'Windows Manage Safe Delete',
Severity: Minor
Found in modules/post/windows/manage/sdel.rb - About 1 hr to fix

    Method file_overwrite has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    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)
    Severity: Minor
    Found in modules/post/windows/manage/sdel.rb - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status