649 / Memcrashed-DDoS-Exploit

DDoS attack tool for sending forged UDP packets to vulnerable Memcached servers obtained using Shodan API
1.33k stars 465 forks source link

Simplify `ip_array` creation #14

Closed delirious-lettuce closed 6 years ago

delirious-lettuce commented 6 years ago

ip_arrayn seems to only exist to store the unmodified lines from my_file. ip_array is then created by iterating over each line stored in ip_arrayn and then calling str.rstrip on them.

This PR skips that step and creates ip_array by iterating over the lines from my_file directly and immediately running str.rstrip on each one.