Stalker is a popular IPTV streaming solution. You can buy a preconfigured TV box or buy Stalker portal connection details which can be used with special TV Boxes or emulators such as Stbemu. Stalker portal connection details consist of username & password pair, 2 unique device IDs, signature, mac address and so on. On top of that, if you setup Stalker portal in another TV Box, the other one will get disconnected, making it possible to only watch on a single device at the same time.
Stalkerhek is a middleware/proxy/gateway application that allows watching Stalker IPTV on a simple video players, like VLC. Stalkerhek serves HLS (M3U) playlist via its integrated HTTP server, rewritting all the further links and effectively hiding original viewer's source IP from the Stalker portal.
Advantages:
- Watch Stalker IPTV on a simple media players (e.g. VLC).
- Watch on multiple devices, even from different source IP addresses, at the same time.
Disadvantages/missing features:
- Based on reverse-engineering. Expect some channels/configurations not to work at all.
- No catching (if 5 viewers are watching the same IPTV channel at the same time, then IPTV channel will receive 5x more requests).
- No VOD.
- No EPG.
You can skip this step if you have below details already and you are sure that they are working.
To extract all the authentication details, use wireshark to capture HTTP requests and analyse them by hand. I used capture filter port 80 and tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x47455420 and display filter http.request.method == GET. You will likely want to use MITM attack using arpspoof. You will also need to restart TV box when capturing requests to see your TV box logging into stalker portal with stored authentication details. If you are smart/lucky enough, you can use port mirroring on your router and wireshark on the mirrored-to port. Anyway, you must capture the traffic in any way you can.
You will need the following details extracted from the wireshark logs (see stalkerhek.example.yml file):
- model - from request headers
- sn (serial number) - from URL
- device_id - from URL
- device_id2 - from URL
- signature - from URL
- mac - from request headers
- login - from URL
- password - from URL
- timezone - from request headers
- location (URL address) - from URL
- token - from request headers, next to "Bearer ". Does not matter that much since stalker server should issue new token if provided is in use.
Regarding URL address/location: If your tv box connets to http://domain.example.com/stalker_portal/server/load.php?... then it's going to be http://domain.example.com/stalker_portal/server/load.php. If it connects to http://domain.example.com/portal.php?..., then it's going to be http://domain.example.com/portal.php. Wireshark will tell you where it connects. :)
All this info will be visible in the URLs or request headers (everything should exist in wireshark capture).
cp stalkerhek.example.yml stalkerhek.yml
vim stalkerhek.ymlFirst, you have to download & install Golang from here. DO NOT install Golang from the official repositories because they contain outdated version which is not working with this project.
To ensure Golang is installed successfully, test it with go version command. Example:
$ go version
go version go1.16.2 linux/amd64Then build the application and test it:
go build -ldflags="-s -w" -o "stalkerhek" ./cmd/stalkerhek/main.go
./stalkerhek -help
./stalkerhek -config stalkerhek.yml -bind 0.0.0.0:9999If you decide to edit the code, you can quickly test if it works without compiling it:
go run ./cmd/stalkerhek/main.go -help
go run ./cmd/stalkerhek/main.go -bind 0.0.0.0:9999I suggest first testing with CURL:
curl http://<ipaddr>:8987/iptvYou might see that there are no channels - in such case simply restart this application and try again.
If there are channels loaded, you can use above URL in VLC/Kodi. :)
- Copy/paste file
stalkerhek.serviceto/etc/systemd/system/stalkerhek.service. - Edit
/etc/systemd/system/stalkerhek.servicefile and replacemyuserwith your non-root user. Also change paths if necessary. - Perform
systemctl daemon-reload. - Use
systemctl <enable/disable/start/stop> stalkerhek.serviceto manage this service.
P.S. Sorry for those who are looking for binary releases or dockerfile - I will consider it when this project becomes more stable.