There has been a leaked code going around online that is said to be leaked by a Samsung insider. The code is believed to be the unlocked code for the Samsung Galaxy Note 4, Note 3, S4 and the S3.
If you still own one of those older Samsung smartphones and wish to unlock them, here is how you can do it with the leaked code.
To unlocked your Samsung Galaxy smartphone, start by sliding in a new SIM card. Restart your device and key in the code *#197328640#. Next, choose  UMTS >  Debug Screen >  Phone Control >  Network Lock > Options  Perso SHA256 OFF.
Wait for 30 seconds and select Back to enter the Main menu where you will see “Network Lock”. From there, select  NW Lock NV Data INITIALLIZ. Your Samsung Galaxy smartphone should be unlocked now.
There were reports about the code working on some of the other older Samsung smartphones as well so you might want to give it a try.