Make msfbase actually do something useful

Signed-off-by: Tod Beardsley <todb@hugesuccess.org>
This commit is contained in:
Tod Beardsley
2025-06-20 13:05:11 -05:00
parent 21e093a41f
commit 81cb85eef0
+2
View File
@@ -21,9 +21,11 @@ class CommitHistory < Struct.new(:fname, :total, :authors)
end
msfbase = __FILE__
while File.symlink?(msfbase)
msfbase = File.expand_path(File.readlink(msfbase), File.dirname(msfbase))
end
msfbase = File.expand_path(File.join(File.dirname(msfbase), '..', '..'))
dir = ARGV[0] || File.join(msfbase, "modules", "exploits")
raise ArgumentError, "Need a filename or directory" unless (dir and File.readable? dir)