Advertisement
Guest User

Discord Voice Server IP Sniffer

a guest
Dec 30th, 2019
1,283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. # Find Discord Voice Server IPs in Python
  2. # Based on the simple fact of:
  3. ### Discord RTC Session Auth packets have a TTL of 51 (Meaning when you join the call the packets TTL is 51)
  4. ### Discord RTC Alive (ACK) packets have a length of 305 (Blank Audio, Keeping alive conection between Client and Server)
  5. from scapy.all import *
  6. def sniffPackets(packet):
  7. if packet.haslayer(IP):
  8. pckt_src=packet[IP].src
  9. pckt_port=packet[UDP].sport
  10. pckt_ttl=packet[IP].ttl
  11. pckt_len=packet[UDP].len
  12. if pckt_ttl == 51:
  13. print 'Discord Server IP %s : Port %s' % (pckt_src,pckt_port)
  14. exit()
  15. if pckt_len == 305:
  16. print 'Discord Server IP %s : Port %s' % (pckt_src,pckt_port)
  17. exit()
  18.  
  19. def main():
  20. print 'Sniffing for Discord Voice IP'
  21. sniff(filter="udp",prn=sniffPackets)
  22.  
  23. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement