Python implementation of pattern_create and pattern_offset from Metasploit Framework