-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmagicpacket.py
More file actions
33 lines (26 loc) · 1.02 KB
/
magicpacket.py
File metadata and controls
33 lines (26 loc) · 1.02 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
import scapy.all as scapy
import sys
#Utilize Wake on Lan to turn your smartcast vizio t.v. on.
#The device expects a 6 byte broadcast address followed by the devices 6byte mac address repeated 16 times.
#replace the code below with your devices mac address and ip.
#ff:ff:ff:ff:ff:ff
#device mac: a0:6a:44:d5:63:2C
#device ip:
magic = b'\xFF\xFF\xFF\xFF\xFF\xFF'
magic += b'\xA0\x6A\x44\xD5\x63\x2C'
magic += b'\xA0\x6A\x44\xD5\x63\x2C'
magic += b'\xA0\x6A\x44\xD5\x63\x2C'
magic += b'\xA0\x6A\x44\xD5\x63\x2C'
magic += b'\xA0\x6A\x44\xD5\x63\x2C'
magic += b'\xA0\x6A\x44\xD5\x63\x2C'
magic += b'\xA0\x6A\x44\xD5\x63\x2C'
magic += b'\xA0\x6A\x44\xD5\x63\x2C'
magic += b'\xA0\x6A\x44\xD5\x63\x2C'
magic += b'\xA0\x6A\x44\xD5\x63\x2C'
magic += b'\xA0\x6A\x44\xD5\x63\x2B'
magic += b'\xA0\x6A\x44\xD5\x63\x2C'
magic += b'\xA0\x6A\x44\xD5\x63\x2C'
magic += b'\xA0\x6A\x44\xD5\x63\x2C'
magic += b'\xA0\x6A\x44\xD5\x63\x2C'
magic += b'\xA0\x6A\x44\xD5\x63\x2C'
scapy.send(scapy.IP(dst="IP Address of your smart cast TV")/scapy.UDP(dport=7)/magic)