displaying and checking psp's mac address
displaying and checking psp's mac address
ok, using a sample i found in the latest toolchain, i managed to get the mac address displayed on my psp...
what i wanted to know is how to check that mac address against a specified one...
i know its possible, its just that my programming skills arent very much 1337...
can someone write a sample code for me or tell me where i can find it ?
thanks for your time,
cyanide
what i wanted to know is how to check that mac address against a specified one...
i know its possible, its just that my programming skills arent very much 1337...
can someone write a sample code for me or tell me where i can find it ?
thanks for your time,
cyanide
-
- Posts: 171
- Joined: Mon Nov 14, 2005 1:32 am
- Location: Boston, Massachusetts
- Contact:
By the way, you can easily view the MAC address using the firmware. At the main menu level, scroll to the far left, then down to System Settings and hit enter. Scroll down to System Information and hit enter again. The unit will display the MAC address, firmware version, and user nickname. This works on both 1.50 and 2.00, presumably other versions as well.
I haven't verified that the firmware reports the same MAC address that is laser-engraved into the RF shield on the WiFi module, but it's probably a safe assumption.
EDIT:
I'm kinda surprised that you have managed to retrieve the MAC address and display it on the screen without also being able to figure out how to compare it against another one. It makes me curious why you want to do this... If you provide a bit more information about what you are doing, you are more likely to get a helpful answer. (Unlike my original response, above, which completely missed your point.)
I haven't verified that the firmware reports the same MAC address that is laser-engraved into the RF shield on the WiFi module, but it's probably a safe assumption.
EDIT:
I'm kinda surprised that you have managed to retrieve the MAC address and display it on the screen without also being able to figure out how to compare it against another one. It makes me curious why you want to do this... If you provide a bit more information about what you are doing, you are more likely to get a helpful answer. (Unlike my original response, above, which completely missed your point.)
lol, i know how to check the mac address directly...
its just that im making an application and right now, i wanted to release betas which were locked to a particular mac address, so that even if they got leaked, they wouldnt be useful to anyone...
heres the code i used to retrieve my mac address:
the problem is that i dont know how to compare them with another specified one...call it noobishness if you will...
can someone write a sample code to compare it with one of my own ?
thanks
its just that im making an application and right now, i wanted to release betas which were locked to a particular mac address, so that even if they got leaked, they wouldnt be useful to anyone...
heres the code i used to retrieve my mac address:
Code: Select all
char sVal[7];
int retVal;
memset(sVal, 0, 7);
retVal = sceWlanGetEtherAddr(sVal);
if (retVal == 0)
printf("MAC Address: %02X:%02X:%02X:%02X:%02X:%02X\n", sVal[0], sVal[1], sVal[2], sVal[3], sVal[4], sVal[5]);
else
printf("Error getting Wlan Ethernet Address (0x%08X)\n", retVal);
can someone write a sample code to compare it with one of my own ?
thanks
-
- Posts: 171
- Joined: Mon Nov 14, 2005 1:32 am
- Location: Boston, Massachusetts
- Contact:
If you have the MAC address in the first six bytes of sVal, then you simply need to compare that against the six bytes of the particualr address:
This is completely uncompiled & untested. Hope this helps. Looking forward to seing the final release!
Code: Select all
char sVal[7];
int retVal;
memset(sVal, 0, 7);
retVal = sceWlanGetEtherAddr(sVal);
if (retVal == 0)
{
printf("MAC Address: %02X:%02X:%02X:%02X:%02X:%02X\n", sVal[0], sVal[1], sVal[2], sVal[3], sVal[4], sVal[5]);
// Compare against a specific address:
char myMac[6] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB}; // <-- Your MAC here
int n = 0;
while ((n<6) && (sVal[n] == myMac[n]))
n++;
if (n == 6)
printf("MAC Address is valid, access granted.\n");
else
printf("Unauthorized MAC Address!!!\n");
}
else
printf("Error getting Wlan Ethernet Address (0x%08X)\n", retVal);
Not exactly hard to crack though :)
http://www.dtek.chalmers.se/~tronic/PSPTexTool.zip Free texture converter for PSP with source. More to come.
EVEN if it is encrypted...
remember, your encryption routine is ALSO hard coded into your app. It would just make it more fun, and hence more of a target.
do you really need to go to all that trouble? Why not make it Open Source, then when you have trouble with simple things others can help you.
And if you cant trust your beta testers, you shouldnt be giving it to them!
remember, your encryption routine is ALSO hard coded into your app. It would just make it more fun, and hence more of a target.
do you really need to go to all that trouble? Why not make it Open Source, then when you have trouble with simple things others can help you.
And if you cant trust your beta testers, you shouldnt be giving it to them!
-
- Posts: 171
- Joined: Mon Nov 14, 2005 1:32 am
- Location: Boston, Massachusetts
- Contact:
I think this could be a relatively secure way of preventing unauthorized access to your beta versions, if you use proper encryption techniques. But even a mega-corporation like Sony has trouble doing this, apparently.
Your success will depend on three factors:
1. How well you encrypt
2. Whether your program falls into the wrong hands
3. Whether it is "interesting enough" for someone to expend the effort of cracking it.
Judging from the nature of your original question, I would advise you to do some studying before you assume that you have written secure software, though. :)
But if you plan to eventually release it, I wouldn't worry too much about all of this anyway. Either don't release it to anyone you can't trust, or announce what you are doing on a forum so that there is a historical public record that it is your project.
Your success will depend on three factors:
1. How well you encrypt
2. Whether your program falls into the wrong hands
3. Whether it is "interesting enough" for someone to expend the effort of cracking it.
Judging from the nature of your original question, I would advise you to do some studying before you assume that you have written secure software, though. :)
But if you plan to eventually release it, I wouldn't worry too much about all of this anyway. Either don't release it to anyone you can't trust, or announce what you are doing on a forum so that there is a historical public record that it is your project.
Then just add up different parts of the address at different locations in the app. it would be alot harder to find it if you, say, put the first 2 chars into the variable at the beginning of he code, then 50 lines later put the next 2, then 20 lines later put the next 2, ect.HaQue wrote:EVEN if it is encrypted...
remember, your encryption routine is ALSO hard coded into your app. It would just make it more fun, and hence more of a target.