This paper examines the flocking control issue of Cucker-Smale model in presence of denial-of-service (DoS) attacks and communication delays. In the setting of DoS attacks, the attacker only obstructs the information communication among agents during the activation phases, while concentrates on supplying its own energy during the dormancy phases. Furthermore, the communication delays are assumed to be time-varying and heterogeneous. Firstly, a general control input scheme defending against DoS network attacks and communication delays is constructed. Secondly, on the basis of the presented control input and the properties of graph theory, the flocking control issue is equivalently transformed into a products convergence issue of infinite sub-stochastic matrices. Finally, an algebraic condition is obtained to formulate all agents asymptotically achieving the flocking behavior. Moreover, the obtained theoretical results are verified by a numerical example.