Skip to content

Instantly share code, notes, and snippets.

@riverscn
Last active October 16, 2025 04:52
Show Gist options
  • Save riverscn/e19479e9ca02867a49fe68558762ee2c to your computer and use it in GitHub Desktop.
Save riverscn/e19479e9ca02867a49fe68558762ee2c to your computer and use it in GitHub Desktop.
中国电信IPTV抓包数据转m3u8播放列表
#!/bin/bash
# Usage: bash gen_iptv_m3u8.sh iptv.pcap
udpxy=192.168.5.1:7088
input=$1
workdir=${input%%.*}
tshark -r $1 -Y 'http.response_for.uri contains getchannellist' -T jsonraw -j data-text-lines_raw \
| awk '/"data-text-lines_raw"/{getline; print}' \
| sed -E 's/"|,//g' \
| xxd -r -p \
| tee \
>(awk -F '[,=?|:"]' '/ChannelName=/ {printf "#EXTINF:-1 tvg-name=\"%s\",%s\nrtp:%s:%s\n", $9, $9, $18, $19}' \
> ${workdir}_rtp.m3u8) \
>(awk -F '[,=?|:"]' '/ChannelName=/ {printf "#EXTINF:-1 tvg-name=\"%s\",%s\nhttp://'"$udpxy"'/udp%s:%s\n", $9, $9, $18, $19}' \
| sed -E 's/udp\/\//udp\//g' > ${workdir}_rtp_http.m3u8) \
>(awk -F '[,=?|:"]' '/ChannelName=/ {printf "#EXTINF:-1 tvg-name=\"%s\",%s\n%s:%s\n", $9, $9, $20, $21}' \
> ${workdir}_rtsp.m3u8) \
>/dev/null
@angelo492
Copy link

local player = game:GetService("Players").LocalPlayer

local screenGui = Instance.new("ScreenGui")
screenGui.Name = "Bx7_GUI"
screenGui.ResetOnSpawn = false
screenGui.Parent = player:WaitForChild("PlayerGui")

local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 220, 0, 140)
frame.Position = UDim2.new(0, 16, 0, 16)
frame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
frame.Parent = screenGui

local title = Instance.new("TextLabel")
title.Text = "Bx7 HUD (Test)"
title.Size = UDim2.new(1, 0, 0, 36)
title.BackgroundTransparency = 1
title.TextColor3 = Color3.fromRGB(255, 255, 255)
title.Font = Enum.Font.GothamBold
title.TextSize = 24
title.Parent = frame

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment