You can use autoban ip
You have to at least enable Autoban and Autoban Core Ban Provider modules from this package.
Then go to configuration > people > automatic ip address bans
and add a rule with this settings
type page not found
Message pattern wp-login.php|/otherURL|anotherURL
pattern (can be left blank)
Threshold 1 (after how many attempts to ban them)
IP Ban Provider Core Ban
NOTE: above I have added multiple patterns delimited with
| just to demonstrate the possibility
After setting this everytime your cron runs this module will run and it will look through the watchdog messages and ban the IPs that match the above rule.