Examples/TLSFingerprinting/main.cpp
/**
 * Write data about a single ClientHello/ServerHello packet to the output file.
 * This method takes the parsed packets and the TLS fingerprint as inputs, extracts the rest of the data such as IP addresses and TCP ports,
 * and writes a single row to the output file
 */
Write data about a single ClientHello/ServerHello packet to the output file.
This method takes the parsed packets and the TLS fingerprint as inputs, extracts the rest of the data such as IP addresses and TCP ports,
and writes a single row to the output file
Write data about a single ClientHello / ServerHello packet to the output file . This method takes the parsed packets and the TLS fingerprint as inputs extracts the rest of the data such as IP addresses and TCP ports and writes a single row to the output file
void writeToOutputFile(std::ofstream* outputFile, const pcpp::Packet& parsedPacket, std::string tlsFPString, std::string tlsFP_MD5, std::string tlsFPType, std::string separator)
{
	std::pair<pcpp::IPAddress, pcpp::IPAddress> ipSrcDest = getIPs(parsedPacket);
	std::pair<uint16_t, uint16_t> tcpPorts = getTcpPorts(parsedPacket);
	*outputFile <<
		tlsFP_MD5 << separator <<
		tlsFPString << separator <<
		tlsFPType << separator <<
		ipSrcDest.first.toString() << separator <<
		tcpPorts.first << separator <<
		ipSrcDest.second.toString() << separator <<
		tcpPorts.second << std::endl;
}
void writeToOutputFile ( std :: ofstream * outputFile , const pcpp :: Packet & parsedPacket , std :: string tlsFPString , std :: string tlsFP_MD5 , std :: string tlsFPType , std :: string separator ) { std :: pair < pcpp :: IPAddress , pcpp :: IPAddress > ipSrcDest = getIPs ( parsedPacket ) ; std :: pair < uint16_t , uint16_t > tcpPorts = getTcpPorts ( parsedPacket ) ; * outputFile << tlsFP_MD5 << separator << tlsFPString << separator << tlsFPType << separator << ipSrcDest . first . toString ( ) << separator << tcpPorts . first << separator << ipSrcDest . second . toString ( ) << separator << tcpPorts . second << std :: endl ; }
Write data about a single ClientHello/ServerHello packet to the output file.
Write data about a single ClientHello / ServerHello packet to the output file .