Browse Source

Removing unnecessary spaces

heitor.gouvea@ima.sp.gov.br 1 year ago
parent
commit
1c44406e94

+ 0
- 2
msfd View File

@@ -19,8 +19,6 @@ end
19 19
 $:.unshift(File.expand_path(File.join(File.dirname(msfbase), 'lib')))
20 20
 require 'msfenv'
21 21
 
22
-
23
-
24 22
 $:.unshift(ENV['MSF_LOCAL_LIB']) if ENV['MSF_LOCAL_LIB']
25 23
 
26 24
 require 'msf/base'

+ 0
- 4
msfrpc View File

@@ -17,8 +17,6 @@ end
17 17
 $:.unshift(File.expand_path(File.join(File.dirname(msfbase), 'lib')))
18 18
 require 'msfenv'
19 19
 
20
-
21
-
22 20
 $:.unshift(ENV['MSF_LOCAL_LIB']) if ENV['MSF_LOCAL_LIB']
23 21
 
24 22
 require 'rex/parser/arguments'
@@ -59,7 +57,6 @@ arguments.parse(ARGV) do |opt, idx, val|
59 57
   end
60 58
 end
61 59
 
62
-
63 60
 unless opts['ServerHost']
64 61
   $stderr.puts "[-] Error: a server IP must be specified (-a)"
65 62
   $stderr.puts arguments.usage
@@ -93,4 +90,3 @@ while(ARGV.shift)
93 90
 end
94 91
 
95 92
 Rex::Ui::Text::IrbShell.new(binding).run
96
-

+ 0
- 2
msfrpcd View File

@@ -17,8 +17,6 @@ end
17 17
 $:.unshift(File.expand_path(File.join(File.dirname(msfbase), 'lib')))
18 18
 require 'msfenv'
19 19
 
20
-
21
-
22 20
 $:.unshift(ENV['MSF_LOCAL_LIB']) if ENV['MSF_LOCAL_LIB']
23 21
 
24 22
 require 'rex/parser/arguments'

+ 0
- 1
msfvenom View File

@@ -16,7 +16,6 @@ require 'msf/ui'
16 16
 require 'msf/base'
17 17
 require 'msf/core/payload_generator'
18 18
 
19
-
20 19
 class MsfVenomError < StandardError; end
21 20
 class HelpError < StandardError; end
22 21
 class UsageError < MsfVenomError; end

+ 0
- 5
tools/password/cpassword_decrypt.rb View File

@@ -79,7 +79,6 @@ class CPassword
79 79
   end
80 80
 end
81 81
 
82
-
83 82
 #
84 83
 # Shows script usage
85 84
 #
@@ -88,7 +87,6 @@ def usage
88 87
   exit
89 88
 end
90 89
 
91
-
92 90
 #
93 91
 # Prints a status message
94 92
 #
@@ -96,7 +94,6 @@ def print_status(msg='')
96 94
   $stderr.puts "[*] #{msg}"
97 95
 end
98 96
 
99
-
100 97
 #
101 98
 # Prints an error message
102 99
 #
@@ -104,7 +101,6 @@ def print_error(msg='')
104 101
   $stderr.puts "[-] #{msg}"
105 102
 end
106 103
 
107
-
108 104
 #
109 105
 # Prints a good message
110 106
 #
@@ -112,7 +108,6 @@ def print_good(msg='')
112 108
   $stderr.puts "[+] #{msg}"
113 109
 end
114 110
 
115
-
116 111
 #
117 112
 # main
118 113
 #

+ 0
- 4
tools/password/halflm_second.rb View File

@@ -39,7 +39,6 @@ $args = Rex::Parser::Arguments.new(
39 39
   "-s" => [ true,  "The server challenge (default value 1122334455667788)"            ],
40 40
   "-h" => [ false, "Display this help information"                                      ])
41 41
 
42
-
43 42
 $args.parse(ARGV) { |opt, idx, val|
44 43
   case opt
45 44
     when "-n"
@@ -81,8 +80,6 @@ if(pass.length != 7)
81 80
   exit
82 81
 end
83 82
 
84
-
85
-
86 83
 pass = pass.upcase
87 84
 hash = hash.downcase
88 85
 
@@ -123,7 +120,6 @@ end
123 120
 end
124 121
 end
125 122
 
126
-
127 123
 puts "[*] Trying four characters (eta: #{etime * cset.length * cset.length * cset.length} seconds)..."
128 124
 0.upto(cset.length-1) do |c1|
129 125
 0.upto(cset.length-1) do |c2|

+ 6
- 8
tools/password/hmac_sha1_crack.rb View File

@@ -2,7 +2,7 @@
2 2
 #
3 3
 # $Id$
4 4
 #
5
-# This script cracks HMAC SHA1 hashes. It is strangely necessary as existing tools 
5
+# This script cracks HMAC SHA1 hashes. It is strangely necessary as existing tools
6 6
 # have issues with binary salt values and extremely large salt values. The primary
7 7
 # goal of this tool is to handle IPMI 2.0 HMAC SHA1 hashes.
8 8
 #
@@ -29,7 +29,6 @@ def usage
29 29
   exit
30 30
 end
31 31
 
32
-
33 32
 hash_inp  = ARGV.shift || usage()
34 33
 word_inp  = ARGV.shift || usage()
35 34
 
@@ -51,17 +50,16 @@ hash_fd.each_line do |line|
51 50
     $stderr.puts "[-] Invalid hash entry, missing field: #{line}"
52 51
     next
53 52
   end
54
-  unless h_salt =~ /^[a-f0-9]+$/i 
53
+  unless h_salt =~ /^[a-f0-9]+$/i
55 54
     $stderr.puts "[-] Invalid hash entry, salt must be in hex: #{line}"
56 55
     next
57 56
   end
58 57
   hashes << [h_id, [h_salt].pack("H*"), [h_hash].pack("H*") ]
59 58
 end
60
-hash_fd.close 
61
-
59
+hash_fd.close
62 60
 
63 61
 stime = Time.now.to_f
64
-count = 0 
62
+count = 0
65 63
 cracked = 0
66 64
 
67 65
 word_fd.each_line do |line|
@@ -75,10 +73,10 @@ word_fd.each_line do |line|
75 73
       cracked += 1
76 74
     end
77 75
     count += 1
78
-    
76
+
79 77
     if count % 2500000 == 0
80 78
       $stderr.puts "[*] Found #{cracked} passwords with #{hashes.length} left (#{(count / (Time.now.to_f - stime)).to_i}/s)"
81
-    end		
79
+    end
82 80
   end
83 81
   hashes.delete_if {|e| e[3] }
84 82
   break if hashes.length == 0

+ 0
- 4
tools/password/lm2ntcrack.rb View File

@@ -70,7 +70,6 @@ $args = Rex::Parser::Arguments.new(
70 70
   "-d" => [ true,  "The domain (machine) name    (NETLMv2/NETNTLMv2 type only)"     	],
71 71
   "-h" => [ false, "Display this help information"                                                   	])
72 72
 
73
-
74 73
 $args.parse(ARGV) { |opt, idx, val|
75 74
   case opt
76 75
     when "-t"
@@ -122,7 +121,6 @@ else
122 121
   end
123 122
 end
124 123
 
125
-
126 124
 if type == "HALFLM" or type == "LM" or type == "NTLM" then
127 125
   if srvchal != nil or clichal != nil or user != nil or domain != nil  then
128 126
     $stderr.puts "[*] No challenge, user or domain must be provided with this type"
@@ -872,5 +870,3 @@ else
872 870
   $stderr.puts "type must be of type : HALFLM/LM/NTLM/HALFNETLMv1/NETLMv1/NETNTLMv1/NETNTLM2_SESSION/NETLMv2/NETNTLMv2"
873 871
   exit
874 872
 end
875
-
876
-

+ 0
- 20
tools/password/md5_lookup.rb View File

@@ -37,7 +37,6 @@ require 'rex'
37 37
 require 'msf/core'
38 38
 require 'optparse'
39 39
 
40
-
41 40
 #
42 41
 # Basic prints we can't live without
43 42
 #
@@ -71,7 +70,6 @@ module Md5LookupUtility
71 70
     #  @return [String] The name of the tool
72 71
     attr_accessor :group_name
73 72
 
74
-
75 73
     def initialize
76 74
       self.config_file = Msf::Config.config_file
77 75
       self.group_name  = 'MD5Lookup'
@@ -93,7 +91,6 @@ module Md5LookupUtility
93 91
       end
94 92
     end
95 93
 
96
-
97 94
     # Saves the waiver so the warning won't show again after ack
98 95
     #
99 96
     # @return [void]
@@ -101,7 +98,6 @@ module Md5LookupUtility
101 98
       save_setting('waiver', true)
102 99
     end
103 100
 
104
-
105 101
     # Returns true if we don't have to show the warning again
106 102
     #
107 103
     # @return [Boolean]
@@ -109,7 +105,6 @@ module Md5LookupUtility
109 105
       load_setting('waiver') == 'true' ? true : false
110 106
     end
111 107
 
112
-
113 108
     private
114 109
 
115 110
     # Saves a setting to Metasploit's config file
@@ -124,7 +119,6 @@ module Md5LookupUtility
124 119
       ini.to_file(self.config_file)
125 120
     end
126 121
 
127
-
128 122
     # Returns the value of a specific setting
129 123
     #
130 124
     # @param key_name [String] The name of the setting
@@ -177,7 +171,6 @@ module Md5LookupUtility
177 171
       )
178 172
     end
179 173
 
180
-
181 174
     # Returns the found cracked MD5 hash
182 175
     #
183 176
     # @param md5_hash [String] The MD5 hash to lookup
@@ -192,10 +185,8 @@ module Md5LookupUtility
192 185
       get_json_result(res)
193 186
     end
194 187
 
195
-
196 188
     private
197 189
 
198
-
199 190
     # Parses the cracked result from a JSON input
200 191
     # @param res [Rex::Proto::Http::Response] The Rex HTTP response
201 192
     # @return [String] Found cracked MD5 hash
@@ -217,7 +208,6 @@ module Md5LookupUtility
217 208
 
218 209
   end
219 210
 
220
-
221 211
   # This class parses the user-supplied options (inputs)
222 212
   class OptsConsole
223 213
 
@@ -275,10 +265,8 @@ module Md5LookupUtility
275 265
       options
276 266
     end
277 267
 
278
-
279 268
     private
280 269
 
281
-
282 270
     # Returns the parsed options from ARGV
283 271
     #
284 272
     # raise [OptionParser::InvalidOption] Invalid option found
@@ -317,7 +305,6 @@ module Md5LookupUtility
317 305
       return parser, options
318 306
     end
319 307
 
320
-
321 308
     # Returns the actual database names based on what the user wants
322 309
     #
323 310
     # @param list [String] A list of user-supplied database names
@@ -339,7 +326,6 @@ module Md5LookupUtility
339 326
       new_db_list
340 327
     end
341 328
 
342
-
343 329
     # Returns a list of all of the supported database symbols
344 330
     #
345 331
     # @return [Array<Symbol>] Database symbols
@@ -357,7 +343,6 @@ module Md5LookupUtility
357 343
     end
358 344
   end
359 345
 
360
-
361 346
   # This class decides how this process works
362 347
   class Driver
363 348
 
@@ -379,7 +364,6 @@ module Md5LookupUtility
379 364
       end
380 365
     end
381 366
 
382
-
383 367
     # Main function
384 368
     #
385 369
     # @return [void]
@@ -403,7 +387,6 @@ module Md5LookupUtility
403 387
       end
404 388
     end
405 389
 
406
-
407 390
     # Cleans up the output file handler if exists
408 391
     #
409 392
     # @return [void]
@@ -411,10 +394,8 @@ module Md5LookupUtility
411 394
       @output_handle.close if @output_handle
412 395
     end
413 396
 
414
-
415 397
     private
416 398
 
417
-
418 399
     # Saves the MD5 result to file
419 400
     #
420 401
     # @param result [Hash] The result that contains the MD5 information
@@ -472,7 +453,6 @@ module Md5LookupUtility
472 453
 
473 454
 end
474 455
 
475
-
476 456
 #
477 457
 # main
478 458
 #

+ 0
- 2
tools/password/vxencrypt.rb View File

@@ -15,7 +15,6 @@ def hashit(inp)
15 15
   hackit(sum)
16 16
 end
17 17
 
18
-
19 18
 def hackit(sum)
20 19
   magic = 31695317
21 20
   res = ((sum * magic) & 0xffffffff).to_s
@@ -29,4 +28,3 @@ end
29 28
 
30 29
 input = ARGV.shift || "flintstone"
31 30
 $stderr.puts "[*] Hash for password '#{input}' is #{hashit(input)}"
32
-

+ 0
- 4
tools/password/vxmaster.rb View File

@@ -12,7 +12,6 @@
12 12
 # $Revision$
13 13
 #
14 14
 
15
-
16 15
 # VxWorks converts the clear-text password into single integer value. This value
17 16
 # can only be one of about 210,000 possible options. The method below emulates
18 17
 # what the vxencrypt utility does and was implemented based on publicly indexed
@@ -128,7 +127,6 @@ seeds = []
128 127
 end
129 128
 seedsets << seeds
130 129
 
131
-
132 130
 seeds = []
133 131
 8.upto(12) do |slen|
134 132
   0x23.upto(0x7c) do |cset|
@@ -165,7 +163,6 @@ seeds = []
165 163
 end
166 164
 seedsets << seeds
167 165
 
168
-
169 166
 # Calculate passwords and their hashes for all possible outputs
170 167
 1.upto(209656) do |i|
171 168
   found = false
@@ -200,4 +197,3 @@ seedsets << seeds
200 197
     exit(0)
201 198
   end
202 199
 end
203
-

+ 0
- 1
tools/recon/list_interfaces.rb View File

@@ -19,7 +19,6 @@ require 'msfenv'
19 19
 
20 20
 $:.unshift(ENV['MSF_LOCAL_LIB']) if ENV['MSF_LOCAL_LIB']
21 21
 
22
-
23 22
 if RUBY_PLATFORM == "i386-mingw32"
24 23
   begin
25 24
     require 'network_interface'

+ 1
- 5
tools/recon/makeiplist.rb View File

@@ -12,18 +12,17 @@
12 12
 # mubix
13 13
 #
14 14
 
15
-
16 15
 msfbase = __FILE__
17 16
 while File.symlink?(msfbase)
18 17
   msfbase = File.expand_path(File.readlink(msfbase), File.dirname(msfbase))
19 18
 end
20 19
 
21 20
 $:.unshift(File.expand_path(File.join(File.dirname(msfbase), '..', '..', 'lib')))
21
+
22 22
 require 'msfenv'
23 23
 require 'rex'
24 24
 require 'optparse'
25 25
 
26
-
27 26
 class OptsConsole
28 27
   def self.parse(args)
29 28
     options = {'output' => 'iplist.txt'}
@@ -78,7 +77,6 @@ Usage: #{__FILE__} [options]|
78 77
   end
79 78
 end
80 79
 
81
-
82 80
 #
83 81
 # Prints IPs
84 82
 #
@@ -91,7 +89,6 @@ def make_list(in_f, out_f)
91 89
     end
92 90
 end
93 91
 
94
-
95 92
 #
96 93
 # Returns file handles
97 94
 #
@@ -106,7 +103,6 @@ def load_files(in_f, out_f)
106 103
   return handle_in, handle_out
107 104
 end
108 105
 
109
-
110 106
 options = OptsConsole.parse(ARGV)
111 107
 in_f, out_f = load_files(options['input'], options['output'])
112 108
 

Loading…
Cancel
Save