@jpm I dunno if there's a smarter way but you can use match exec, so presumably you could have netcat/socat make a connection, pick up the banner, and return immediately, piped into a grep for those versions (alternatively write a small binary to do the covering and return a 0 if it's old or 1 if not).

Note that it's a bit of a disaster for security doing any of this though, depending on your threat model - anyone who could MitM the connection could trick your current into downgrading.