LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Blogs > rainbowsally
User Name
Password

Notices

Rate this Entry

Sockets - A Packet Snooper With A QT4 GUI (Req's libLQ-qt/mc2 dload) Part 2

Posted 01-19-2013 at 06:58 AM by rainbowsally
Updated 09-04-2013 at 08:52 PM by rainbowsally (an afterthought)

Continuing from here.
http://www.linuxquestions.org/questi...-part-1-35273/

[screenshot]
http://rainbowsally.net/rainbowsally...et-snooper.png

Note: Corrected commandline for launching the server Jan 20, 2013 -rs

An afterthought:
While poking around in this stuff I found this warning in the linux/if_ether.h header.
Code:
  #define ETH_P_ALL 0x0003    /* Every packet (be careful!!!) */
And that is the 'type' flag we selected.

If you find your snoopers are overwhelmed, try some of the other 'types' listed in /usr/include/linux/if_ether.h.

I have not had a problem with it, but you other Computer Mad Scientists might.

GOOD LUCK! :-)


An after-after thought... Boy this socket stuff is a mess.

The little utilities in this self extractor have a couple of bugs. They don't appear to affect the function but they certainly affect the status display when server_v4 connects.

One problem is that the port number needs to be RE-reversed with 'ntohs(value) for the display. But that's not enough, because something is clobbering the port number in the addr struct.

You are welcome to see if the original files at the linked web page do you any better, but my guess is they'll be significantly worse. ;-)

Debugging that stuff is left as an exercise for the student. ;-) That's you (this time). But here's your secret decoder ring for the htons() ntohs() pton() stuff. P means Presentation, such as the string "127.0.0.1". H means host and N means network, and 's' stands for short so that htons(number) will change the byte order from host to net compatible if it's the wrong endian-ness.

I'm currently reworking the server to be a bit more netcat-like and to run in a gui and this bug is not present. For starters you might want to make those structs 'static' and see what, if anything changes.

Good luck with your "good luck" here.

Continuing with the original post.....

--------------------

Here's how to generate all the files and the executables. And I'm sorry but this WILL absolutely require the libLQ-qt download, available here at the blog -- at least for the gui version of the app shown in the screenshot.

[Note: The makefiles are set up to include debug info, so these can be stepped through in a good debugger.]

Code:
./snooper-gui-files.sfxz  # extract the files
# cd into snooper-gui-files and...
make ui # to generate the ui stuff
make    # to create snooper (old terminal version) and snooper-gui (qt4 version)

file: snooper-gui-files.sfxz
purpose: utility (executable) to generate all files needed to build the app
Code:
#!/bin/sh
# base64 self extractor
# file: snooper-gui-files

filename=snooper-gui-files

# don't allow user to click on the file
if ! tty >/dev/null; then
  xmessage -center "
  $(basename $0)
  must be run in a terminal 
  "
  exit
fi

# create and/or clear out tmp dir
mkdir -p $HOME/tmp/sfxz
rm -rf $HOME/tmp/sfxz/*
base64 -d << _BEOF >$HOME/tmp/sfxz/$filename.xz
/Td6WFoAAATm1rRGAgAhARYAAAB0L+Wj4O//KkNdABcLyudJ+Y0csPibCs1IVZjI065FfOHdLXOO
kF9bfvZJ9xOGNC9THFFsAA+CpXGzDqKZnXya36ssj6WPyRe+TZgJmJToX6u2cB206cZfQlxUWIhD
hCyIYcBEe3zkjF9BmI11zMXWfw728CbNMlh2dvohpWtN/clCLSF8/xK6mF5xs8zc3OtcDDvUkfnk
ps5cqQTmpGaWGACuQQyx60RBqiZ64klxi5spToObPEP4E0OJ/Rgo47OqCpMmrSJN2zGHAFntS1QQ
RDMC/IdaULrRNjoaDpuI/RIBCtJQxL9v7Y51EEw7Ulw5J81muIGEw4UF7KMovXX6Td7Ot2DlCe9M
QAiLIl3fIYOAd3fTerJemz7pweL/dFw64z0TcHy0+9zmYV8BaJgY5WZcBFTxNugBjfGsx2THx/M2
8NAH+vKUABFGVvzUXPmWjJ43QHaVBExrbsKVEExBOlTnDS/XVzcKvKD8dv047W3Z6ZSn+SQuqnxW
jhOKFTsS3fvIoM6HpBJ7/G07pvuXPRB7k/Lo1NWY+LFC4gOk5We3gNSF7pOMc8nALrUYfdP9PJGa
75psjuU/oBf0t4O9wl4LlDrylUGyGuJAjcJcS5AIWwxh8b4sPHLFR0Q/qJqu4avz53Q1mpe18ETP
e8/dqRvf1nNe+xFB64qQdWfNVzFuZVvcnRmavudS7O1bMLLs1mi9o5ua9mgPHtkhwlORO6F/K1ME
u46jskJ8Cm10bb7BD61aRfKkAKLoHtvklw633kf0Ntvqtgu4Ch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ract
#!/bin/sh

is_yes() # returns OK if first char is Y or y
{
  local key=`echo $1 | cut -b1 | sed 's/y/Y/; /Y/!d'`
  [ "$key" == 'Y' ] && return 0 # true
  return 1 # false
}

if [ -e snooper-gui-files ]; then
  printf "
  Overwrite existing file(s)? [N/y]:"
  read key
  if ! is_yes $key ;then
  echo "Aborting.."
    exit 0
  fi
fi

mv $HOME/tmp/sfxz/snooper-gui-files .
_BEOF

sh $HOME/tmp/sfxz/post-extract
rm -rf $HOME/tmp/sfxz/*
rmdir $HOME/tmp/sfxz 2>/dev/null || true
rmdir $HOME/tmp 2>/dev/null || true
Note: if you need something to toss packets around, use
Code:
# corrected commandline below -rs
xterm -e bash -exec server_v4 & # with the ampersand and
client_v4            # and start typing in some text
Those two apps are included in the fileset and do not have libLQ dependecies.

Yet. ;-)

- The Computer Mad Science Team

:-)
Posted in Uncategorized
Views 482 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 03:46 AM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration