renamed directory from web to app.

This commit is contained in:
NotoriousRebel 2020-06-06 12:48:28 -04:00
parent 30cd8d238a
commit aac9fa3ac8
8 changed files with 6 additions and 6 deletions

View file

@ -1,6 +1,6 @@
#!/usr/bin/env python3
import uvicorn
import theHarvester.lib.web.api as api
import theHarvester.lib.app.api as api
import argparse
parser = argparse.ArgumentParser()

View file

@ -688,8 +688,8 @@ async def handler(lst):
try:
import aiofiles
async with aiofiles.open(
f'theHarvester/lib/web/static/{rest_filename}.html' if '.html' not in rest_filename
else f'theHarvester/lib/web/static/{rest_filename}', 'w+') as Html_file:
f'theHarvester/lib/app/static/{rest_filename}.html' if '.html' not in rest_filename
else f'theHarvester/lib/app/static/{rest_filename}', 'w+') as Html_file:
await Html_file.write(HTMLcode)
except Exception as ex:
print(f"An excpetion has occurred: {ex}")
@ -708,7 +708,7 @@ async def handler(lst):
if len(rest_filename) == 0:
filename = filename.rsplit('.', 1)[0] + '.xml'
else:
filename = 'theHarvester/lib/web/static/' \
filename = 'theHarvester/lib/app/static/' \
+ rest_filename.rsplit('.', 1)[0] + '.xml'
# TODO use aiofiles if user is using rest api
with open(filename, 'w+') as file:

View file

@ -22,7 +22,7 @@
# This is where we will host files that arise if the user specifies a filename
# app.mount('/static', StaticFiles(directory='static/'), name='static')
app.mount('/static', StaticFiles(directory='theHarvester/lib/web/static/'), name='static')
app.mount('/static', StaticFiles(directory='theHarvester/lib/app/static/'), name='static')
@app.get('/')

View file

@ -0,0 +1 @@
hello world

View file

@ -1 +0,0 @@
hello world