-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zeitwerk msf folder #14629
Zeitwerk msf folder #14629
Changes from all commits
319e718
b816373
d437a32
d6896da
fc4a7fe
a855a39
8cede7d
39401db
8ce8455
39b34e4
461afdb
1f679d5
0301b95
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
require 'msf/util/helper' | ||
require 'open3' | ||
|
||
module Metasploit | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
require 'rex/proto/ntlm' | ||
require 'rex/arch' | ||
include Rex::Arch | ||
|
||
NTLM_CONST ||= ::Rex::Proto::NTLM::Constants | ||
NTLM_CRYPT ||= ::Rex::Proto::NTLM::Crypt | ||
NTLM_UTILS ||= ::Rex::Proto::NTLM::Utils | ||
NTLM_BASE ||= ::Rex::Proto::NTLM::Base | ||
NTLM_MESSAGE ||= ::Rex::Proto::NTLM::Message | ||
|
||
module Msf | ||
|
||
LogSource = "core" | ||
end | ||
|
||
require 'msf/core/exception' # TODO: temporary require until we can split up the exceptions file and namespace properly | ||
require 'msf_autoload' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# -*- coding: binary -*- | ||
|
||
# Utilities | ||
require 'msf/util' | ||
|
||
# This file is only needed for compatibility with pro | ||
# Once pro removes the explicit require this file can be deleted | ||
require 'msf' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# framework-base | ||
|
||
The base library provides implementations for some of the default | ||
sessions, such as Shell, Meterpreter, DispatchNinja, and VNC. These | ||
sessions are used by modules that come pre-packaged with the default | ||
module distribution of Metasploit and are depended on by their | ||
respective payloads. | ||
|
||
Beyond providing the default sessions, framework-base also provides | ||
a wrapper interface to framework-core that makes some of the tasks, | ||
such as exploitation, into easier to manage functions. | ||
|
||
framework-base depends on framework-core |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
# -*- coding: binary -*- | ||
|
||
require 'msf/windows_error' | ||
|
||
module Msf | ||
module Sessions | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
# -*- coding: binary -*- | ||
|
||
require 'msf/windows_error' | ||
|
||
module Msf | ||
module Sessions | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
# -*- coding: binary -*- | ||
|
||
require 'msf/windows_error' | ||
|
||
module Msf | ||
module Sessions | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,3 @@ | ||
# -*- coding: binary -*- | ||
### | ||
# | ||
# framework-core | ||
# -------------- | ||
# | ||
# The core library provides all of the means by which to interact | ||
# with the framework insofar as manipulating encoders, nops, | ||
# payloads, exploits, auxiliary, and sessions. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These comments have been useful in the past, does it make sense to move it elsewhere? 🤔 Since we plan on deleting this file - I'm not sure where it would live within our code. I've seen some projects have This comment applies to the previously deleted base.rb comments too There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Personally I don't see a tonne of value in these comments but I'd definitely be down for the readme idea if we can keep it up to date |
||
# | ||
### | ||
|
||
# The framework-core depends on Rex | ||
require 'rex' | ||
require 'rex/ui' | ||
require 'rex/arch' | ||
|
||
include Rex::Arch | ||
|
||
NTLM_CONST ||= ::Rex::Proto::NTLM::Constants | ||
NTLM_CRYPT ||= ::Rex::Proto::NTLM::Crypt | ||
NTLM_UTILS ||= ::Rex::Proto::NTLM::Utils | ||
NTLM_BASE ||= ::Rex::Proto::NTLM::Base | ||
NTLM_MESSAGE ||= ::Rex::Proto::NTLM::Message | ||
|
||
module Msf | ||
autoload :Author, 'msf/core/author' | ||
autoload :Platform, 'msf/core/platform' | ||
autoload :Reference, 'msf/core/reference' | ||
autoload :SiteReference, 'msf/core/site_reference' | ||
autoload :Target, 'msf/core/target' | ||
|
||
# | ||
# Constants | ||
# | ||
|
||
LogSource = "core" | ||
end | ||
|
||
# Event subscriber interfaces | ||
require 'msf/events' | ||
# This file is only needed for compatibility with pro | ||
# Once pro removes the explicit require this file can be deleted | ||
require 'msf' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
# framework-core | ||
|
||
The core library provides all of the means by which to interact | ||
with the framework insofar as manipulating encoders, nops, | ||
payloads, exploits, auxiliary, and sessions. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
# -*- coding: binary -*- | ||
require 'pp' | ||
require 'rex' | ||
require 'msf/ui/web/driver' | ||
|
||
module Msf | ||
module RPC | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
# -*- coding: binary -*- | ||
|
||
require 'json' | ||
require 'msf/util/document_generator' | ||
|
||
module Msf | ||
module RPC | ||
|
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,3 @@ module Console | |
end | ||
end | ||
|
||
require 'msf/ui/console/driver' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
# -*- coding: binary -*- | ||
|
||
require 'rex/parser/arguments' | ||
require 'msf/util/exe' | ||
|
||
module Msf | ||
module Ui | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# -*- coding: binary -*- | ||
require 'msf/ui/console/command_dispatcher' | ||
require 'rex/parser/arguments' | ||
|
||
module Msf | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sanity question, is this needed still?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it shouldn't be, it only seems to affect any strings defined in the file and there aren't any 😄
weren't any before so it was probably a copy/paste job
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's my understanding too, just calling it out for visibility - as there seemed to be a couple of historical bulk changes to add this to every file:
d656e31
I imagine there was a solid reason for it that, but the commit doesn't have any further details. It could've just been the easiest to automate, adding any missing binary comment regardless of the file's content