I wrote this exploit for Linx Mint 19.1 so probably it'll not work for other distributions. If you're exploint a real environment I recommend you to use Salem Rashid's exploit version, which has the proper offsets for other sudo versions.
This is just an exploit for this specfic OS, so perhaps not a full reliable exploit for other distros.
Please check this for more info on the vulnerability: https://www.sudo.ws/alerts/pwfeedback.html