-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
26 lines (18 loc) · 850 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from os import write
from scrape_helpers import *
from check_auth_needed import *
import argparse
def main():
parser = argparse.ArgumentParser(description='Scrape Common CTF Platforms to format for an easy writeup document')
parser.add_argument('--url', help="The url for the ctf website e.g. http://ctf.testing.io")
args = parser.parse_args()
URL = args.url
if check(URL):
names, pointsList, categoryList, solvesList, solved, tags,title = parseChallenges(URL)
else:
username = input("Enter CTF username: ")
password = input("Enter CTF password: ")
names, pointsList, categoryList, solvesList, solved, tags,title = parseChallenges(URL, username, password)
writeMarkdown(names, pointsList, categoryList, solvesList, solved, tags,title,getDesc())
if __name__ == "__main__":
main()