    def user_supplied_shellcode(self, CavesPicked={}):
        """
        For user supplied shellcode
        """
        if self.SUPPLIED_SHELLCODE is None:
            print "[!] User must provide shellcode for this module (-U)"
            sys.exit(0)
        else:
            supplied_shellcode = open(self.SUPPLIED_SHELLCODE, 'r+b').read()

        #FORK
        self.shellcode1 = "\x00\x40\xa0\xe1"   # mov r4, r0 
        self.shellcode1 += "\x00\x00\x40\xe0"   # sub r0, r0, r0
        self.shellcode1 += "\x02\x70\xa0\xe3"   # mov r7, #2
        self.shellcode1 += "\x00\x00\x00\xef"   # scv 0
        self.shellcode1 += "\x00\x00\x50\xe3"   # cmp r0, #
        self.shellcode1 += "\x04\x00\xa0\xe1"   # mov r0, r4
        self.shellcode1 += "\x04\x40\x44\xe0"   # sub r4, r4, r4
        self.shellcode1 += "\x00\x70\xa0\xe3"   # mov r7, #0
        self.shellcode1 += "\x00\x00\x00\x0a"   # beq to shellcode
        # JMP Address = (entrypoint - currentaddress -8)/4
        jmpAddr = 0xffffff + (self.e_entry -(self.shellcode_vaddr +len(self.shellcode1)) - 4)/4
        self.shellcode1 += (struct.pack("<I", jmpAddr)).strip("\x00")
        self.shellcode1 += "\xea"   #b entrypoint

        #SHELLCODE
        self.shellcode1 += supplied_shellcode

        self.shellcode = self.shellcode1
        return (self.shellcode1)
For user supplied shellcode
arm/LinuxARMLELF32.py