Results 1 to 5 of 5
  1. #1
    Dieter's Avatar
    Dieter is offline Member
    Join Date
    Sep 2009
    Posts
    91
    Rep Power
    0

    Default Reading MAC Adresses. [SOLVED]

    Hi guys,

    I need to be able to read Mac addresses from a website as soon a user has logged in. Wich classes can i use for that? Or maybe a better question... Wich one is the best?

    Thanks in advance,

    Dieter
    Last edited by Dieter; 04-19-2010 at 05:07 PM.
    Programming today is a race between software engineers striving to build bigger and better idiot proof programs,and the Universe trying to produce bigger and better idiots...

  2. #2
    gcalvin is offline Senior Member
    Join Date
    Mar 2010
    Posts
    952
    Rep Power
    5

    Default

    Which version? In Java SE 6, there is java.net.NetworkInterface.

    Be careful of your assumptions here. MAC addresses are easily spoofed, and Internet connections are often shared, so a MAC address does not guarantee a unique host, let alone a unique session.

    -Gary-

  3. #3
    Dieter's Avatar
    Dieter is offline Member
    Join Date
    Sep 2009
    Posts
    91
    Rep Power
    0

    Default

    Thanks for the reply Gary.

    The point of the mac registration is that users can only use 1 computer for using the website. So they need to register another computer to use the same account. I will also have a look at the java.net.NetworkInterface.

    PS: The registerd mac adres will be saved in an SQL DB.

    Best regards,

    Dieter
    Programming today is a race between software engineers striving to build bigger and better idiot proof programs,and the Universe trying to produce bigger and better idiots...

  4. #4
    gcalvin is offline Senior Member
    Join Date
    Mar 2010
    Posts
    952
    Rep Power
    5

    Default

    MAC address will not do that for you. One MAC address is not equivalent to one computer. For instance, there could be twenty, fifty, a hundred PCs behind a firewall, and you'll see them all as the same MAC address -- the MAC address of the firewall. Also, one computer often has more than one network adapter (wired and Wi-Fi, for instance) and therefore more than one MAC address. And as I said, it is trivially easy to change the MAC address that a web site will see. Therefore, checking the MAC address will not enable you to enforce the restriction you want. You will frustrate your legitimate users, and you will not even slow down people who want to break your rules.

    There is really no simple way to do what you want to do, and even if you could do it, the workarounds are numerous and well-known. Don't waste your time trying.

    -Gary-

  5. #5
    Dieter's Avatar
    Dieter is offline Member
    Join Date
    Sep 2009
    Posts
    91
    Rep Power
    0

    Default

    Alright Gary. Thank you for the information and the tips. I will have to find another way to do this then.

    Again thank you for your time.

    Best Regards,

    Dieter
    Programming today is a race between software engineers striving to build bigger and better idiot proof programs,and the Universe trying to produce bigger and better idiots...

Similar Threads

  1. Reading .txt files
    By cvcs1 in forum New To Java
    Replies: 3
    Last Post: 01-20-2010, 10:07 AM
  2. Reading and Writing to XML - Help Please!
    By JonnySnip3r in forum New To Java
    Replies: 4
    Last Post: 01-17-2010, 11:55 PM
  3. reading from a .txt
    By Flamespewer in forum New To Java
    Replies: 1
    Last Post: 09-14-2009, 09:35 AM
  4. Replies: 5
    Last Post: 08-21-2009, 12:03 PM
  5. Ip adresses comparison
    By ModestUrgell in forum New To Java
    Replies: 0
    Last Post: 05-30-2008, 01:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •