mirror of
https://github.com/bryangerlach/rdgen.git
synced 2026-02-15 18:50:53 +00:00
test input hiding
This commit is contained in:
2
.github/workflows/generator-windows.yml
vendored
2
.github/workflows/generator-windows.yml
vendored
@@ -78,7 +78,7 @@ jobs:
|
||||
steps:
|
||||
- name: Download ZIP
|
||||
run: |
|
||||
curl -L -o secrets.zip "${{ github.event.inputs.zip_url }}"
|
||||
Invoke-WebRequest -Uri ${{ fromJson(env.zip_url).url }}/get_zip?filename=${{ fromJson(env.zip_url).file }} -OutFile ./secrets.zip
|
||||
unzip -P "${{ secrets.ZIP_PASSWORD }}" secrets.zip
|
||||
|
||||
- name: Decrypt json
|
||||
|
||||
@@ -259,7 +259,11 @@ def generator_view(request):
|
||||
if os.path.exists(temp_json_path):
|
||||
os.remove(temp_json_path)
|
||||
|
||||
zip_url = f"{_settings.PROTOCOL}://{request.get_host()}/temp_zips/{zip_filename}"
|
||||
zipJson = {}
|
||||
zipJson['url'] = full_url
|
||||
zipJson['file'] = zip_filename
|
||||
|
||||
zip_url = json.dumps(zipJson)
|
||||
|
||||
data = {
|
||||
"ref":_settings.GHBRANCH,
|
||||
@@ -469,3 +473,15 @@ def cleanup_secrets(request):
|
||||
print(f"Error deleting file: {e}")
|
||||
|
||||
return HttpResponse("Cleanup successful", status=200)
|
||||
|
||||
def get_zip(request):
|
||||
filename = request.GET['filename']
|
||||
#filename = filename+".exe"
|
||||
file_path = os.path.join('temp_zips',filename)
|
||||
with open(file_path, 'rb') as file:
|
||||
response = HttpResponse(file, headers={
|
||||
'Content-Type': 'application/vnd.microsoft.portable-executable',
|
||||
'Content-Disposition': f'attachment; filename="{filename}"'
|
||||
})
|
||||
|
||||
return response
|
||||
|
||||
Reference in New Issue
Block a user