コード例 #1
0
ファイル: VeilHandlers.py プロジェクト: DJHartley/Veil
 def post(self, *args, **kwargs):
     uuid = self.get_argument('uuid', '')
     payload = Payload.by_uuid(uuid)
     user = self.get_current_user()
     if payload is not None and payload in user.history:
         dbsession.delete(payload)
         dbsession.flush()
     self.redirect('/history')
コード例 #2
0
 def post(self, *args, **kwargs):
     uuid = self.get_argument('uuid', '')
     payload = Payload.by_uuid(uuid)
     user = self.get_current_user()
     if payload is not None and payload in user.history:
         dbsession.delete(payload)
         dbsession.flush()
     self.redirect('/history')
コード例 #3
0
 def get(self, *args, **kwargs):
     user = self.get_current_user()
     uuid = self.get_argument('uuid', None)
     if uuid is not None:
         payload = Payload.by_uuid(uuid)
         if payload is not None and payload in user.history:
             self.render('history/view_payload.html', payload=payload)
     else:
         self.render('history/view_table.html',
                     payloads=user.chronological_history)
コード例 #4
0
ファイル: VeilHandlers.py プロジェクト: DJHartley/Veil
 def get(self, *args, **kwargs):
     user = self.get_current_user()
     uuid = self.get_argument('uuid', None)
     if uuid is not None:
         payload = Payload.by_uuid(uuid)
         if payload is not None and payload in user.history:
             self.render('history/view_payload.html', payload=payload)
     else:
         self.render('history/view_table.html', 
             payloads=user.chronological_history
         )
コード例 #5
0
ファイル: VeilHandlers.py プロジェクト: DJHartley/Veil
 def download_rc(self):
     user = self.get_current_user()
     uuid = self.get_argument('uuid', '')
     payload = Payload.by_uuid(uuid)
     if payload is not None and payload in user.history:
         data = payload.get_rc_file()
         self.set_header('Content-Type', 'text/plain')
         self.set_header('Content-Length', len(data))
         self.set_header('Content-Disposition', 'attachment; filename=%s' %
             payload.rc_file_name.replace('\n', '')  # Shouldn't be any
         )
         self.write(data)
         self.finish()
     else:
         self.render('public/404.html')
コード例 #6
0
ファイル: VeilHandlers.py プロジェクト: DJHartley/Veil
 def download_exe(self):
     user = self.get_current_user()
     uuid = self.get_argument('uuid', '')
     payload = Payload.by_uuid(uuid)
     if payload is not None and payload in user.history:
         f = open(payload.file_path, 'r')
         data = f.read()
         self.set_header('Content-Type', 'application/x-msdos-program')
         self.set_header('Content-Length', len(data))
         self.set_header('Content-Disposition', 'attachment; filename=%s' %
             payload.file_name.replace('\n', '')  # Shouldn't be any
         )
         self.write(data)
         f.close()
         self.finish()
     else:
         self.render('public/404.html')
コード例 #7
0
 def download_rc(self):
     user = self.get_current_user()
     uuid = self.get_argument('uuid', '')
     payload = Payload.by_uuid(uuid)
     if payload is not None and payload in user.history:
         data = payload.get_rc_file()
         self.set_header('Content-Type', 'text/plain')
         self.set_header('Content-Length', len(data))
         self.set_header(
             'Content-Disposition',
             'attachment; filename=%s' %
             payload.rc_file_name.replace('\n', '')  # Shouldn't be any
         )
         self.write(data)
         self.finish()
     else:
         self.render('public/404.html')
コード例 #8
0
 def download_exe(self):
     user = self.get_current_user()
     uuid = self.get_argument('uuid', '')
     payload = Payload.by_uuid(uuid)
     if payload is not None and payload in user.history:
         f = open(payload.file_path, 'r')
         data = f.read()
         self.set_header('Content-Type', 'application/x-msdos-program')
         self.set_header('Content-Length', len(data))
         self.set_header(
             'Content-Disposition',
             'attachment; filename=%s' %
             payload.file_name.replace('\n', '')  # Shouldn't be any
         )
         self.write(data)
         f.close()
         self.finish()
     else:
         self.render('public/404.html')