-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcccaminfo.py
More file actions
53 lines (45 loc) · 1.15 KB
/
cccaminfo.py
File metadata and controls
53 lines (45 loc) · 1.15 KB
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
import sys
import telnetlib
def usage():
print("""
cccaminfo - by Jay Turla @shipcod3
*********
Usage:
*********
python cccaminfo.py <host>
example -> cccaminfo.py localhost
""")
"""
Supported Commands:
- info
- activeclients
- clients
- servers
- shares
- providers
- entitlements
"""
def main(argv):
if len(argv) < 2:
return usage()
host = sys.argv[1]
commands = [
("info", "Getting information on the receiver"),
("activeclients", "Active clients"),
("clients", "Clients"),
("servers", "Servers"),
("shares", "Shares"),
("providers", "Providers"),
("entitlements", "Entitlements")
]
for command, description in commands:
try:
tn = telnetlib.Telnet(host, 16000)
tn.read_until(b"Welcome to the CCcam information client.")
print(f"[+] {description}\n")
tn.write(command.encode() + b"\r")
print(tn.read_all().decode())
except Exception as e:
print(f"[-] Error executing {command}: {e}")
if __name__ == "__main__":
main(sys.argv)