Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible with Python3 #2

Open
OmriBaso opened this issue Sep 22, 2020 · 0 comments
Open

Incompatible with Python3 #2

OmriBaso opened this issue Sep 22, 2020 · 0 comments

Comments

@OmriBaso
Copy link

This part of code, basicly the struct parts and not functioning correctly, if you help me with that i will share with you also a private project of mine, i mannged to use your code to make reverse Socks5 proxy server using ICMP.

BUT i need to work in python3 since my code is in python3, im not able to figure out the logic of what you did there i port it my self, please help :)

Thanks in advance

    def create(self):
        pack_str = "!BBHHH4sH"
        pack_args = [self.type, self.code, 0, self.id, self.sequence,
                     socket.inet_aton(self.dest[0]), self.dest[1]]

        if self.length:
            pack_str += "{}s".format(self.length)
            pack_args.append(self.data)

        self.checksum = self._checksum(struct.pack(pack_str, *pack_args)) 
        pack_args[2] = self.checksum
        return struct.pack(pack_str, *pack_args)
@OmriBaso OmriBaso changed the title Incompatable with Python3 Incompatible with Python3 Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant