Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Parsing string from Capture File

$
0
0
I'm extracting the payload header hex values from a capture file and then the parse the mutation string into another method. Is this possible?

PcapPacketHandler<String> jpacketHandler = new PcapPacketHandler<String>() {
        public void nextPacket(PcapPacket packet, String user) {

            Payload payload = new Payload();
            
            if (packet.hasHeader(payload)){
                String mutation = payload.toHexdump();
                mutation = mutation.replaceAll("[a-f0-9]{4}", "");
                mutation = mutation.replaceAll("\\D", "");
            }
            
        }
    };

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>