ERROR : TypeError: ord() expected string of length 1, but int found
I get this error while compiling a program.
File "C:\Users\Administrator\Desktop\tracer1.py", line 129, in <module> get_route("www.google.com") File "C:\Users\Administrator\Desktop\tracer1.py", line 85, in get_route d = build_packet() File "C:\Users\Administrator\Desktop\tracer1.py", line 62, in build_packet myChecksum = checksum(header + data) File "C:\Users\Administrator\Desktop\tracer1.py", line 28, in checksum thisVal = ord(str[count+1]) * 256 + ord(str[count]) **TypeError: ord() expected string of length 1, but int found**
program should find traceroute using ICMP
from socket import * import socket import os import sys import struct import time import select import binascii import ctypes ICMP_ECHO_REQUEST = 8 MAX_HOPS = 30 TIMEOUT = 2.0 TRIES = 2
source share