Issues with packet decoding
- Dominant language
- Go
- Stars
- 6.8k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
How would i get rid of special characters in the decode, an example is the following code when printing IPV6 base layers
```go
IP6_ := packet_to_parse.Layer(IEEE_CONSTANTS.IP_6)
// names are in another module file
ip6, _ := IP6_.(*layers.IPv6)
fmt.Printf("\033[38;5;198m| Packet (\033[4;30mIP Version 6\033[0;39m\033[38;5;198m) Base Layer |-> \033[38;5;21m %v\n", ip6.BaseLayer)
```
despite me using the %s conversion and even trying certian methods like strings, strconv, and fmt.Sprintf to a new format i still get outputs like the following
```
| Packet (IP Version 6) Base Layer |-> {`s1�����<Èqh�� �����
_oculul
�;!USERNAME!##$$$$::DESKTOP-5A4444444(1)
DEVICE2�
�8USERNAME::DESKTOP-5A972DI
_DEVICE2lUSERNAME::DESKTOP-5A972ddddddDI(1)
_oal_sp_tcplocal!x�lDESKTOP-5A972DI\USERNAME EEEEE::DESKTOP-5A972DI
_oculusal_sp_tcplocal!x�DESKTOP NAME��DESKTOP-5A972fffffffffffffffffffffffDIlocal<
��{<&������{<&�����<Èqh�{<&����`���uk�{<����<Èqh�{<
��{<&������{<&�����<Èqh�{<&����`���uk�{<����<Èqh}
| Packet (IP Version 6) Contents |-> `s1�����<Èqh��
| Packet (IP Version 6) Version |-> 6
| Packet (IP Version 6) Traffic Class |-> 0
```
some of the information is supposed to be there like the `DESKTOP` however i need to get rid of the special characters `�� �����` i dont think this is an issue with gopacket i know its an issue with my code but how would i fix this, is there a function in gopacket i am missing to convert it all to a plain text string? or is there a bug thats going on when i format and print the data to the console
thank you for your time :D
Contributor guide
Assessment
This issue has not been assessed yet.