[Droid Ultra General] tmittelstaedt:
There is an even easier explanation for all of this. Being a follower of Occam's Razor I have to subscribe to it.

It is possible the web developers who created the unlock site at Motorola had left behind some test php script. When the OP stumbled over his trick, it worked for him a few times. Then he posted about it on the forum here. And someone tipped off the web developer at Motorola "Uh dudes, they are saying they can get unlock codes off that site your working on" The developers read the post - looked at the site - **** a few bricks and quickly deleted the test scripts and such.

Let's look at this thing logically. According to jcase here

http://xdaforums.com/showthread.php?t=2631686&page=20

"Ok, so first off, its not a generator, token is hashed with other data then compared to a stored value I believe."

If you think about it Motorola is going to have to have a COMPLETE database of all phone ID's and keys. Why? Because they make the phones in production run batches that are optimized for their production equipment - and the carriers order phones in batches that have nothing to do with that. There is no way to tell if, while your manufacturing a phone, what carrier it is going to end up at. You also don't know if a batch is going to fail testing. That is why there's no differences in the Qfuses between carrier produced phones and development phones. (this has been noted elsewhere in analysis of this setup)

When a phone rolls off the assembly line it goes to a warehouse. When it's purchased it goes to programming where it's unique MEID, MAC address, and all the other unique bits are configured into it - and the rom is flashed and all of that, and at the same time the robot is doing that, it prints out a couple paper stickers to the phone with all this data on them. Then, some minimum wage goober puts the phone in the box and puts the stickers on the outside of the box, and the boxes go out the door to ATT or Verizon or whoever bought them. This lets the assembly line produce a hundred thousand phones one month then shut down for refreshing for another month. Meanwhile the phones are metered out of the warehouse in dribs and drabs.

So, that master database exists and it is real, and it is going to have fields in it that as Motorola sells phones, they are going to mark this phone is OK to unlock, that phone is not according to who bought them.

Now, the assumption seems to be that the database the website is using is a different database than the database that Motorola is using internally to track all this. I do not think that is correct. Based on my experience in corporations, the effort of trying to keep multiple databases synchronized is far higher than just using a single database and feeding everything from it. So I think it's quite reasonable that the webserver the unlock site is running on does indeed have a direct line to the "internal" unlock code database.

I think that it is quite possible the "Chinese code unlock supplier" who was operating sporadically in 2014 had figured out a way to break into the Motorola webserver and had access to the actual database. Maybe for example the programmers are doing something like:

"SELECT UNLOCK_CODE FROM PHONES WHERE ID = XXXX EXCEPT IF NO_UNLOCK=YES:

And the cracker discovered he could do a

"SELECT UNLOCK_CODE FROM PHONES WHERE ID = XXXX;

And get the unlock key.

Whatever it was, I think it's a mistake to believe that Motorola isn't reading the forums here and when they see a new unlock then they don't move to close the hole.