module PWN::Plugins::Github

def self.authors

def self.authors
st.pentest@0dayinc.com>

def self.download_all_gists(opts = {})

def self.download_all_gists(opts = {})
sername].to_s.scrub
:target_dir].to_s.scrub
rget_dir} Does Not Exist." unless Dir.exist?(target_dir)
}]
n.any?
page
github_rest_call(
ers/#{username}/gists",

_dir)
JSON.parse(response_body, symbolize_names: true)
ch do |gist_hash|
st_hash[:id]
st_hash[:git_pull_url]
ist?(clone_dir)
: #{clone_uri}..."
.'
 => e

def self.github_rest_call(opts = {})

def self.github_rest_call(opts = {})
ts[:http_method].nil?
t
s[:http_method].to_s.scrub.to_sym
est_call].to_s.scrub
ms]
ttp_body].to_s.scrub
 'https://api.github.com'
Plugins::TransparentBrowser.open(browser_type: :rest)
er_obj[:browser]::Request
lient.execute(
st_api_uri}/#{rest_call}",
 'application/json; charset=UTF-8',
s
se
lient.execute(
st_api_uri}/#{rest_call}",
 'application/json; charset=UTF-8',
s
ody,
se
ror("Unsupported HTTP Method #{http_method} for #{self} Plugin")
rbidden
dRequest, RestClient::NotFound, StandardError => e

def self.help

def self.help
#{self}.download_all_gists(
uired - username of gists to download',
equired - target directory to save respective gists'