

I can at least tell you what it does because I tested it:
It override your /usr/bin/su so that it now let you run as root with no password.
My guess is that the payload is an su command that was modified to run without requiring password but it’s also possible - though unlikely - that it just patch your existing su.
either way if you will run the script, you need to backup your existing su command first.
Correction: The script doesn’t permanently modify the su file instead it modifies a cached copy of the file in memory. restarting your device or doing echo 3 > /proc/sys/vm/drop_caches to flush the cache restore the su file to its original state



In order to use this exploit you need a program that has UID bit set and the file owned by the user you want to use itheir privilages.
For example su (among other commands) has that UID bit set and because the owner of the file is root then when you execute it, it always runs with root privileges
Most Android devices use SELinux (Security Enhanced Linux) which is configured in such way that you couldn’t have root access even if you could run a program owned by root and has the UID bit set.
What you could do - in theory - is finding a process already running with root privileges and happened to be executing certain command periodically. you could then override that certain program in cache using this exploit to do what you want.