c - how to get client machine mac address using PPAPI plugin or PNACL -


I have to get client machine MAC address so that users can not log in from other computers. I am new to PPAPI and have tried to code down in C to get MAC address. It is not included in the PPAPI lib that require conio.h header file I added externally to the file but not help any idea

  {/ * Copyright (c ) 2013 Chromium Writer All Rights Reserved. * This source code is used by BSD-style licenses which can be found in the * license file. Include * / # & lt; Stdio.h & gt; #include & lt; String.h & gt; # Include & lt; Stdlib.h & gt; #include "ppapi_simple / ps_main.h" #ifdef SEL_LDR #define example_main main #endif int example_main (int argc, char * argv []) {/ * Javascript to use ppb_messaging to send "Hello World". * / File * FP; Printf ("System First Hello. \ N"); System ("ipconfig / all> gt: //macid.txt"); Printf ("Hello. \ N" before opening the file); fp = fopen ( 'D: //macid.txt "," r "); Printf (" Greetings from first. \ N "); if (fp! = NULL) {printf (" Hello first time. \ N ") ; four line [128]; while (fgets (lines, shapes, lines, fp)! = nULL) {printf ( "Hello in time. \ N"); char * nwln = strchr (line, '\ n'); Char * ptr; if (nwln! = NULL) * nwln = '\ 0'; Ptr = strstr (line, "physical address"); If (ptr! = NULL) {printf ( "Hello iff. \ N"); Printf ( "Hello:% s \ n", ptr); break;}}} Printf ( "Hello World STDOUTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT. \ N"); Printf ( "Hello Deepesh Jan. \ N"); / * Peepibi_conos in the JavaScript console "Hello World". * / Fprintf (stderr, "Hello Word STDERR. \ N "); Return 0;} / * * After starting the instance object, register to call the function. * See: pappi_simple / ps_main.h * * When creating the sel_ldr version of this example Not required * which does not link against ppapi_simple * / #ifndef SEL_LDR PPAPI_SIMPLE_REGISTER_MAIN (example_main) #endif}  

Are you trying to do this for a web app or for an extension? Generally, PPAPI and NOOL do not provide more APIs than traditional web platforms, so if you are going to a web app, then you can not access the MAC address. You can have access to more APIs in one extension, such as hostname that was recently added.

Web platforms have other mechanisms to identify users, such as cookies, but it is in the user's control and can be ejected.


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -