Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion lib/listeners/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import json
import sys
from pydispatch import dispatcher
from flask import Flask, request, make_response, send_from_directory
from flask import Flask, request, make_response, send_from_directory, send_file
# Empire imports
from lib.common import helpers
from lib.common import agents
Expand Down Expand Up @@ -934,6 +934,26 @@ def send_stager(stager):
else:
return make_response(self.default_response(), 404)

@app.route('/download/importer')
def send_importer():
return send_file('../../data/misc/IronPython/httpimport.py')

@app.route('/download/45/<filename>')
def send_assemblies45(filename):
return send_from_directory('../../data/misc/IronPython/net45/',filename)

@app.route('/download/40/<filename>')
def send_assemblies40(filename):
return send_from_directory('../../data/misc/IronPython/net40/',filename)

@app.route('/download/stdlib/<filename>')
def send_ipy(filename):
return send_from_directory('../../data/misc/IronPython/Lib/', filename)

@app.route('/download/stdlib/<folder>/<filename>')
def send_ipy_sub(folder,filename):
return send_from_directory('../../data/misc/IronPython/Lib/'+folder, filename)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently these do not require a routing packet. I think it makes sense that they should, but it looks like this isn't the only thing on the listener that doesn't require it.

@app.before_request
def check_ip():
"""
Expand Down