perlsyntax has asked for the wisdom of the Perl Monks concerning the following question:

I want to make a wireless Application that pick up mac adderss and other wireless networks.I try to think of a way of designing my wireless application.Does anyone got any point or link i can get information from? I will be useing this application from a laptop.

Replies are listed 'Best First'.
Re: Designing a wireless application
by Corion (Patriarch) on Mar 18, 2008 at 15:18 UTC

    How about starting with Perl and wireless Question?

    Other than that, you're pretty much unclear about what your application is supposed to do. The common approach to design is that you need to be clear about what the application is to do before you can decide on a framework, infrastructure, design patterns and whatnot.

    Usually, from a Perl point of view, there is little difference between an application that accesses the network through a wired connection and one that accesses the network through a wireless connection.

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: Designing a wireless application
by moritz (Cardinal) on Mar 18, 2008 at 15:29 UTC
    Picking up a mac address is something that every packet sniffer can do.

    What are you ultimately trying to do? Write a perl client that reads everything sent over the network, try to guess the parameters and then connect to such a network?

    Or something completely different?

    Describe what you want to do, and please be very verbose. Read your question again, and ask yourself if somebody could understand it without knowing your mind.

    And if it's not a project for the sake of learning perl (or some coding techniques) inform yourself if there is an application that does your job.

      Write a perl client that reads everything sent over the network, try to guess the parameters and then connect to such a network.It is a project i plan to work on so i can learn perl better.:)
        It seems that my guess work was much more solid than usual ;-)

        Since I know of no cross-platform API for wireless interfaces the first step is to define the operating system you want to use.

        The second step is to find out what kind of interfaces the wireless API offers, and decide to use one of them.

        Of course you need to know something about the protocols being used.

        The rest is mostly a matter of programming, and shouldn't be too hard. For specific questions you can always come back here ;-)

        Oh and there's a minor judicial point that you shouldn't forget: in most countries it's illegal to connect to some hotspots, especially if they are encrypted (for example in Germany it is forbidden if it's obvious that the owner doesn't want guests in his network, for example with MAC blacklists, WEP or WPA).

        This subject is discussed at some length here Perl Design Patterns War Driving and some of the techniques that can be used.

        As pointed out by moritz one needs to be aware of the legal issues that may be infringed in using them.

Re: Designing a wireless application
by Akoya (Scribe) on Mar 18, 2008 at 15:39 UTC
Re: Designing a wireless application
by starbolin (Hermit) on Mar 18, 2008 at 20:03 UTC

    Not sure how much of a perl question this really is. Perl sits on top of the OS and relies on calls to the devices drivers to perform IO. But the networking device drivers are designed specifically to abstract the MAC addresses and instead present network addresses to the user process. So you first need a driver to interface to the network stack and return MAC addresses. Sitting on top of that you need a library or module to allow perl to access the driver.

    Your question then becomes one of how to interface to the module. Usually a trivial question once you have the module and it's documentation.

    Having carefully stated the correct way to approach it; here is the wrong way:

    tcpdump -xx |perl -lne '/0000:\s+((\w{4}\s){3})/;print "$1"' - tcpdump: verbose output suppressed, use -v or -vv for full protocol de +code listening on fxp0, link-type EN10MB (Ethernet), capture size 96 bytes 0013 20bc 58b5 0013 20bc 58b5 00a0 c9cd 5db1 00a0 c9cd 5db1 00a0 c9cd 5db1 00a0 c9cd 5db1 00a0 c9cd 5db1 000d 889a 8e32 000d 889a 8e32 000d 889a 8e32 000d 889a 8e32 000d 889a 8e32 000d 889a 8e32 000d 889a 8e32 00a0 c9cd 5db1 00a0 c9cd 5db1 . . .

    s//----->\t/;$~="JAPH";s//\r<$~~/;{s|~$~-|-~$~|||s |-$~~|$~~-|||s,<$~~,<~$~,,s,~$~>,$~~>,, $|=1,select$,,$,,$,,1e-1;print;redo}