PacketLogger
packet logger.
Table of Contents
Properties
PathToString
PacketLogger.PathToStringDictionary[PacketPath, String]StringToPath
PacketLogger.StringToPathDictionary[String, PacketPath]Methods
AddBlacklist
PacketLogger.AddBlacklist(packetID)Add the packetID to the blacklist. Packets in the backlist will not be logged. (See PacketLogger.DiscardAll() )
packetID(Int32): PacketID to blacklist
VoidAddTemplate
PacketLogger.AddTemplate(packetTemplate)Add a custom template for packet logger. Example of "Damage" (0x0B) packet: { 'packetID': 0x0B, 'name': 'Damage 0x0B', 'showHexDump': true, 'fields':[ { 'name':'packetID', 'length':1, 'type':'packetID'}, { 'name':'Serial', 'length':4, 'type':'serial'}, { 'name':'Damage', 'length': 2, 'type':'int'}, ] }
packetTemplate(String): Add a PacketTemplate, check ./Persistence/packets/ folder.
VoidAddWhitelist
PacketLogger.AddWhitelist(packetID)Add the packetID to the whitelist. Packets in the whitelist are always. (See PacketLogger.DiscardAll() )
packetID(Int32): PacketID to whitelist
VoidDiscardAll
PacketLogger.DiscardAll(discardAll)Packet logger will discard all packets, except the one in the whitelist. (See PacketLogger.AddWhitelist() )
discardAll(Boolean): True: Log only the packet in the whitelist - False: Log everything, but the packets in the blacklist
VoidDiscardShowHeader
PacketLogger.DiscardShowHeader(showHeader)Packet logger will show the headers of discarded packets.
showHeader(Boolean): True: Always show headers - False: Hide everything.
VoidListenPacketPath
PacketLogger.ListenPacketPath(packetPath, active)Packet logger will discard all packets, except the one in the whitelist. (See PacketLogger.AddWhitelist() ) If the packetPath is not set or not resognized, the function simply returns the current active paths.
packetPath(String): Possible values: ClientToServer ServerToClient RazorToServer (TODO) RazorToClient (TODO) PacketVideo (TODO)active(Boolean)
String[]RemoveTemplate
PacketLogger.RemoveTemplate(packetID)Remove a PacketTemplate for packet logger.
packetID(Int32): Remove a spacific packetID. (Default: -1 Remove All)
VoidReset
PacketLogger.Reset()Reset the packet logger to defaults.
VoidSendToClient
PacketLogger.SendToClient(packetData)Send a packet to the client.
packetData(Byte[])
VoidSendToServer
PacketLogger.SendToServer(packetData)Send a packet to the server.
packetData(Byte[])
VoidSetOutputPath
PacketLogger.SetOutputPath(outputpath)Set the packet logger. Calling it without a path it rester it to the default path.
outputpath(String): (Optional) Custom output path (Default: reset to ./Desktop/Razor_Packets.log)
StringStart
PacketLogger.Start(outputpath, appendLogs)Start the packet logger.
outputpath(String): Custom output path (Default: ./Desktop/Razor_Packets.log)appendLogs(Boolean): True: Append - False: Overwrite (Default: False)
StringStop
PacketLogger.Stop()Stop the packet logger.
String