def callback(payload):
    print(payload)
    try:
        data = payload.get_payload()
        pkt = IP(data)
        if isinstance(pkt.payload, TCP):
            if isinstance(pkt[TCP].payload, Raw):
                raw_payload = pkt[TCP].load
                if (raw_payload.startswith(b'GET ') or raw_payload.startswith(b'POST ')):
                    if (b'Windows NT 6.1' in raw_payload):
                        wrap_payload = {'diff': 0, 'data': raw_payload}
                        if (b'; WOW64; Trident/' not in raw_payload):
                            wrap_payload = slack_chars(wrap_payload, b'; Trident/', b'; WOW64; Trident/')
                        wrap_payload = slack_chars(wrap_payload, b'Accept-Language: ja-JP\r\n', b'Accept-Language: ko-KR\r\n')
                        wrap_payload = slack_chars(wrap_payload, b'Accept-Language: en-US\r\n', b'Accept-Language: ko-KR\r\n', finalize=True)
                        raw_payload = wrap_payload['data']
                        new_pkt = change_payload(pkt, raw_payload)
                        payload.set_payload(new_pkt)
    except Exception as e:
        print(e)
    finally:
        payload.accept()
def callback(payload):
    print(payload)
    try:
        data = payload.get_payload()
        pkt = IP(data)
        if isinstance(pkt.payload, TCP):
            if isinstance(pkt[TCP].payload, Raw):
                raw_payload = pkt[TCP].load
                if (raw_payload.startswith(b'GET ') or raw_payload.startswith(b'POST ')):
                    if (b'Windows NT 6.1' in raw_payload):
                        wrap_payload = {'diff': 0, 'data': raw_payload}
                        if (b'; WOW64; Trident/' not in raw_payload):
                            wrap_payload = slack_chars(wrap_payload, b'; Trident/', b'; WOW64; Trident/')
                        wrap_payload = slack_chars(wrap_payload, b'Accept-Language: ja-JP\r\n', b'Accept-Language: ko-KR\r\n')
                        wrap_payload = slack_chars(wrap_payload, b'Accept-Language: en-US\r\n', b'Accept-Language: ko-KR\r\n', finalize=True)
                        raw_payload = wrap_payload['data']
                        new_pkt = change_payload(pkt, raw_payload)
                        payload.set_payload(new_pkt)
    except Exception as e:
        print(e)
    finally:
        payload.accept()