Bad and hard to grok code can be created in any language. Even more-so in languages that have more syntax complexity than C.
In particular, in this case, it sounds like the offending code:
* Makes outgoing connections with sockets * Alters the flow of execution outside its scope
Both of these flaws can be mitigated if the ability to do these things is closely-held and not available to all code.
It's true that object-capability languages like E, Monte, Pony, etc. cannot stop you from writing bad code. But they can automatically prove that your code only is as bad as it appears to be, and not any worse via skulduggery.