Exemple #1
0
/*
 * The 'NAS Config' flash partition has an ext2 filesystem which
 * contains a file that has the ethernet MAC address in plain text
 * (format "xx:xx:xx:xx:xx:xx\n".)
 */
static void __init ts209_find_mac_addr(void)
{
	unsigned long addr;

	for (addr = 0x00700000; addr < 0x00760000; addr += 1024) {
		char *nor_page;
		int ret = 0;

		nor_page = ioremap(QNAP_TS209_NOR_BOOT_BASE + addr, 1024);
		if (nor_page != NULL) {
			ret = check_mac_addr(nor_page);
			iounmap(nor_page);
		}

		if (ret == 0)
			break;
	}
}
Exemple #2
0
/*
Check VMWare NIC MAC addresses
*/
VOID vmware_mac()
{
	/* VMWre blacklisted mac adr */
	CHAR *szMac[] = {
		"\x00\x05\x69",
		"\x00\x0C\x29",
		"\x00\x1C\x14",
		"\x00\x50\x56",

	};

	WORD dwLength = sizeof(szMac) / sizeof(szMac[0]);

	/* Check one by one */
	for (int i = 0; i < dwLength; i++)
	{
		printf("[*] Checking MAC %s: ", szMac[i]);
		if (check_mac_addr(szMac[i]))
			print_detected();
		else
			print_not_detected();
	}
}
Exemple #3
0
/*
Check virtualbox NIC MAC address
*/
BOOL vbox_check_mac()
{
	/* VirtualBox mac starts with 08:00:27 */
	return check_mac_addr("\x08\x00\x27");
}