-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
63 lines (50 loc) · 1.57 KB
/
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
from src import artwork
from src.steam import Steam
import argparse
import sys
def print_logo():
print(artwork.ascii_art)
print("Created by xriskon || Chris Konstantopoulos")
print("https://github.com/xriskon\n")
def command_list():
print("[target]\tchange target user")
print("[info]\t\tdisplay summary of user")
print("[friends]\tdisplay all friends")
print("[games]\t\tdisplay all owned games")
print("[list]\t\tshow command list")
print("[quit]\t\texit program")
print("[FILE=y]\tenable saving to file")
print("[FILE=n]\tdisable saving to file")
def _quit():
print("Bye!")
sys.exit(1)
parser = argparse.ArgumentParser(description='Steam OSINT is a tool for gathering information about steam users')
parser.add_argument('id', type=str, help='username')
parser.add_argument('-o', '--output', help='output to file', action="store_true", required=False)
args = vars(parser.parse_args())
api = Steam(args.get("id"), args.get("output"))
commands = {
'TARGET': api.change_target,
'LIST': command_list,
'HELP': command_list,
'QUIT': _quit,
'EXIT': _quit,
'INFO': api.get_info,
'FRIENDS': api.get_friends_list,
'GAMES': api.get_owned_games
}
print_logo()
api.print_banner()
while True:
cmd = input("New command:").upper()
_cmd = commands.get(cmd)
if _cmd:
_cmd()
elif cmd == "FILE=Y":
api.set_write_file(True)
elif cmd == "FILE=N":
api.set_write_file(False)
elif cmd == "":
print("")
else:
print("Unknown command\n")