Results 1 to 3 of 3

Thread: How to convert exploits from python2 to python3

  1. #1
    Join Date
    2019-Sep
    Posts
    6

    How to convert exploits from python2 to python3

    Hi all,

    I really hope it's not a stupid question, however I'm finding this problem a bit more recurrent these days.
    Looks like the database of python exploits are written in the outdated python2, and obviously not updated on Kali, exploit-db and searchsploit.

    My question is, if there is a way to convert somehow painless the file from python2 to python3 without manual intervention.

    I am using 2to3 which is good in regards of converting the input of outdated modules, but still requires a lot of manual fix as for example wont add any parenthesis to open and close the print function correctly, regardless the fact that I am not the quickest in reviewing and fxing python scripts, but also the fix would be relative to the pretty much single use script, and wouldn't be saved in the database.

    Thank you

  2. #2
    Join Date
    2021-Dec
    Posts
    4
    Not really.
    an exploit is typically any thing from 50 - 200 lines of code. It takes an hour or so so convert.
    Alternatively, yes you can have multiple versions of python on a system.

  3. #3
    Join Date
    2022-Jan
    Location
    Denmark
    Posts
    3
    Sorry dude, there's only the long way around, and reading through python2 version, figuring out what doesn't work. and figuring out how to do it in python3

Similar Threads

  1. New Kali build cannot install pip for python2.7
    By keyzer in forum TroubleShooting Archive
    Replies: 2
    Last Post: 2020-05-05, 17:42
  2. Replies: 1
    Last Post: 2020-01-22, 08:57
  3. .TXT convert to .LST
    By black_box in forum General Archive
    Replies: 3
    Last Post: 2014-10-30, 19:07
  4. Convert GPT commands to gdisk...
    By roadrunnerTX in forum Installing Archive
    Replies: 0
    Last Post: 2014-07-22, 00:59

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •