mirror of
https://github.com/laramies/theHarvester.git
synced 2024-09-21 07:46:32 +08:00
renamed directory from web to app.
This commit is contained in:
parent
30cd8d238a
commit
aac9fa3ac8
|
@ -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()
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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('/')
|
1
theHarvester/lib/app/static/test.txt
Normal file
1
theHarvester/lib/app/static/test.txt
Normal file
|
@ -0,0 +1 @@
|
|||
hello world
|
|
@ -1 +0,0 @@
|
|||
hello world
|
Loading…
Reference in a new issue