metasploit-framework

https://github.com/rapid7/metasploit-framework

Ruby

Metasploit Framework

Rex::Post::Meterpreter::Extensions::Stdapi::Fs::File.expand_path

Expands a file path, substituting all environment variables, such as
%TEMP%.

Examples:
   client.fs.file.expand_path("%appdata%")
   # => "C:\\Documents and Settings\\user\\Application Data"
   client.fs.file.expand_path("asdf")
   # => "asdf"

NOTE: This method is fairly specific to Windows. It has next to no relation
to the ::File.expand_path method! In particular, it does *not* do ~
expansion or environment variable expansion on non-Windows systems. For
these reasons, this method may be deprecated in the future. Use it with
caution.

Source | Google | Stack overflow

Edit

git clone [email protected]:rapid7/metasploit-framework.git

cd metasploit-framework

open lib/rex/post/meterpreter/extensions/stdapi/fs/file.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Rex--Post--Meterpreter--Extensions--Stdapi--Fs--File-expand_path-for-pr


# Commit to git

git add lib/rex/post/meterpreter/extensions/stdapi/fs/file.rbgit commit -m "better docs for Rex::Post::Meterpreter::Extensions::Stdapi::Fs::File.expand_path"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Rex--Post--Meterpreter--Extensions--Stdapi--Fs--File-expand_path-for-pr

hub pull-request


# Celebrate!