The application relates to the technical field of
network security, and provides a traffic sample generation method and device, a program product, a medium and equipment. The method comprises the following steps: generating
sql injection payloads by using a
sql injection tool; and encapsulating the
sql injection payloads to generate http traffic samples. The method combines the advantages of two types of traffic sample generation methods, namely, packet generation and packet capture. On one hand, a large number of
sql injection payloads are automatically generated by directly using the
sql injection tool, thereby avoiding the process of manually collecting the payloads. On the other hand, the http traffic samples are generated by directly encapsulating the
sql injection payloads, without the need to build a
target range and perform sql injection in the
target range. The sample generation is not constrained by target machines and
network performance, thereby significantly simplifying the
generation process of the http traffic samples, improving the sample generation efficiency, being beneficial to generating a large number of samples in a short time, and thereby better training a
deep learning model for sql injection detection.