Shellminator V3.0.1
Simple Terminal
|
There are situations where it might be a good idea to restrict access for unauthorized users. It doesn't mean anything bad is expected, but it's always wise to prevent any unwanted incidents that could occur if someone has free reign in the system.
The first thing you'll need is a password hash. A password hash is a series of bytes generated from the password. What's the point of this? If we wanted to check the password directly to see if it's correct, we'd have to save it in the program memory. A hacker could easily read it from there and break into the system in no time. However, if we save the hash calculated from the password instead of the password itself, it becomes much harder for anyone to reverse-engineer our system.
The library primarily calculates a CRC32 hash from the password and uses it for 'encryption'. We chose this method because we wanted to find a solution that is secure enough without requiring significant computational power. Of course, if you need a more secure method, you can always replace our implementation with your own using a hook, which we'll cover in the advanced section.
To make things easier for you, we've also created a calculator that computes the hash needed for your password.
After using the calculator to compute the hash of your password, you need to save the hash byte-by-byte into an array. We've calculated the worst possible password hash for you, which is for 'Password'. The corresponding CRC32 hash is 0xCC, 0xB4, 0x24, 0x83.
Next, all we need to do is assign the password to the shell in the setup section, which we can do using the setPassword
method. The setPassword
function will need the hash array and the size of the array in bytes.