by banning SegWit2x nodes you will gain nothing, by not banning them you will also lose nothing. and this is not a Sybil Attack either since the SegWit2x nodes are the same as any other node until mid November where the fork comes.
as @cellard said if you are running the bitcoin core versions 0.15 and above, your node will automatically disconnect (NOT BAN) from nodes that are advertising service bits 6 and 8 which shows as NODE_SEGWIT2X
but it won't ignore them if they don't have that service bit. which some of them don't like this one:
https://bitnodes.21.co/nodes/59.110.152.134-8333/ but as i said they are perfectly good nodes until the fork in November.
that script you posted is using bitnodes.21.co to ban the IPs and only works for linux and you have to keep running it every time a new node comes on and 21.co may not even see everything either.