PDA

View Full Version : How to test if key is being sent from XP box



doc2003
01-25-2003, 06:11 PM
Hopefully someone can point me in the right direction on this problem.

I have compiled the current SEQ, modified and compiled Maggotboy's sniffer, made appropriate changes to the code.

SEQ works fine in GPS mode, however no decodes. I installed and configured TCPDump and when I followed the thread I found under the search function to have TCPdump watch the port I had set for the sniffer to use, I am seeing no traffic at all.

If I set the TCPdump just to watch the EQ box in general and not a specific port there is plenty of traffic. But still no decodes.

Is there a way to send UDP packets similar to what the sniffer would send from within XP? I suspect there may be something wrong with my setup on the Linux side as far as letting UDP packets through but until I can test sending from XP (which I don't know how to do for UDP :) ) there is no way I can see to narrow the possible causes down.

I have searched through the forums but cannot find anything that gives me any hints as to where to look for the problem.

Mr. Suspicious
01-25-2003, 06:27 PM
Use the search (http://seq.sourceforge.net/search.php). A search for a part of the name of this thread "How to test if key is being sent" results in a list with in the top 10 of the results a post that tells you EXACTLY how you can check things. (Hint: "Some ways to test your keysniffers" by "MisterSpock")

Next time, please use search before asking. As stated on the top of this forum:



Read this (http://www.macsrule.com/~seqfaq/seq-faq.html) before asking any questions. Then use use this (http://seq.sourceforge.net/search.php). After you have read and used both options, then and ONLY then should you ask your question. If your question is answered in either of those two locations, EXPECT TO BE FLAMED for being too stupid to read. You have been warned.

FuddRucker
01-25-2003, 06:29 PM
Try this bit of Perl on your SEQ box...


#!/usr/bin/perl

use strict;
use IO::Socket;
my($sock, $oldmsg, $newmsg, $hisaddr, $sender, $MAXLEN, $PORTNO);
$MAXLEN = 1024;
$PORTNO = 666;
$sock = IO::Socket::INET->new(LocalPort => $PORTNO, Proto => 'udp')
or die "socket: $@";
print "Awaiting UDP messages on port $PORTNO\n";
$oldmsg = "This is the starting message.";
while ($sock->recv($newmsg, $MAXLEN)) {
my($port, $ipaddr) = sockaddr_in($sock->peername);
$sender = gethostbyaddr($ipaddr, AF_INET);
print "Client $sender said ``$newmsg''\n";
$sock->send($oldmsg);
$oldmsg = "[$sender] $newmsg";
}
die "recv: $!";



Change $portno to the port your using, when your sniffer sends the key it'll say "Client at <IP> said <message>"

...and in the future use search (http://seq.sourceforge.net/search.php?s=).

doc2003
01-26-2003, 03:13 AM
OK I'm blind, I read MisterSpocks's post on how to test but somehow managed to not read an entire sentence in it :)

Will print it out and follow it step for step to include the step that I oversaw the first time.

/em beats himself upside the head with a stupid stick