johndoe31415 / tplink-cli

Work in progress towards a TP-LINK command-line interface to configure smart switches

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tplink-cli

This is WORK IN PROGRESS. It currently does not function.

This is suppsed to be a command line interface for TP-LINK smart switches for the home market. They are managed via a proprietary UDP-based protocol that is encrypted with a hardcoded RC4 key. I've done substantial reverse engineering work back in 2017 to figure out what the datagrams do, but right now it is not implemented to actually perform any useful commands via the CLI.

TCPDump facility

To ease debugging, tplink-cli can interface directly with tcpdump PCAP files:

$ tcpdump -lnX -r tplink.pcapng 'udp and ((port 29809) or (port 29808))' | ./tplink.py tcpdump

or directly dump live traffic:

# tcpdump -lnX -i eth0 'udp and ((port 29809) or (port 29808))' | ./tplink.py tcpdump

Debugging

Creating a localized dummy interface for sniffing purposes:

ip link add dummy0 type dummy
ip addr add 192.168.123.55/24 dev dummy0
ip link set dev dummy0 up

License

GNU GPL-3

About

Work in progress towards a TP-LINK command-line interface to configure smart switches


Languages

Language:Python 100.0%