Skip to content

Commit

Permalink
Update start.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Al-Azif authored Jan 2, 2018
1 parent c391750 commit d201433
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions start.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,19 @@ def payload_launcher(self):
thread.start()

def inject_exploit_html(self, html):
inject = b'<li><a href="/exploits/{EXP}/">{EXP}</a></li>\n'

inject = b'<a href="{URL}"><button class="btn btn-main">{EXP}</button></a>'
data = b''
try:
i = 0
for exploit in os.listdir(EXPLOIT_LOC):
if exploit != 'index.html':
data += inject.replace(b'{EXP}', bytes(exploit, 'utf-8'))
if i >= 3:
data += b'<br/>'
i = 0
url = '/exploits/{}/'.format(exploit)
temp = inject.replace(b'{EXP}', bytes(exploit, 'utf-8'))
data += temp.replace(b'{URL}', bytes(url, 'utf-8'))
i += 1
except IOError:
pass

Expand Down

0 comments on commit d201433

Please sign in to comment.