General :: Making Packet Sniffer Using Raw Socket - Invalid Argument
Nov 16, 2010
I am actually making a packet sniffer using raw socket. Its just that when I use the command '
if((ioctl(rawsock, SIOCGIFINDEX, &ifr)) == -1)
to get the interface index...
Its gives me an error saying :invalid argument?
I have an old PC with two hard drives (40 and 60Gb) and it uses dual IGhz pIII processors. It shares screen,mouse and keyboard with another PC.Both into Netgear modem. It ran ubuntu 8.04 and XP Pro on the drives above with no problems. Then I decided to try Mint 11 (34bit CD) - result after Grub blank screen other than flashing cursor at top left.No input from keyboard. Tried Mint KDE 10 (34bit DVD) same result. Tried Kubuntu 10 (CD) same result. Reinstalled Ubuntu 8.04 no problem. Upgraded via download from 8.04 to 10LTS hoping that this would somehow prevent the problem and have screen which says:-
starting up [000000] ACPI no DMI BIOS year,ACPI =force is required to enable acpi mount: mounting none on /dev failed: No such device udevd[825]: error getting socket: Invalid argument error initialising netlink socket udevd[825] error initialising netlink socket libudev: udev_monitor_new_from_netlink:error getting socket:Invalid argument Segmentation fault Gave up waiting for root device.Common problems: Boot args (cat/proc/cmmdline) Check root delay (Did the system wait long enough) Check root (did the sytem wait for the right device) Missing modules (cat/proc/modules; 1s /dev) ALERT! dev/disc/by-uuid/"long number here" does not exist.Dropping to a shell.
Then it goes into Busybox and ends with "initramfs". I have tried altering the boot device in BIOS from HDD0 through 3 with the same result other than more bad language!
So, the NSA puts out some handy documentation on locking down a RHEL server (running centos 5.6 x64 myself) here, [url]. Under "Ensure System is Not Acting as a Network Sniļ¬er" on page 63, it says that if any numbers below the first line in /proc/net/packet, that it is acting as a network sniffer.
I get the following output:
Code:
Unless I've been pwned, I don't know exactly what could be causing this. Besides samba, nmap (compiled from source, not from yum), screen, and rtorrent, there's nothing I've installed beyond the fresh install I did a few days ago. I was not running nmap when looking at /proc/net/packet.
I've a problem when I try to run arpd program to support my honeyd software but when I try to execute it then it shows this error message ./arpd 10.0.0.0/8 arpd: intf_get: Invalid argument My arpd installation based on this tutorial [URL].
When i type 'ifconfig eth0 192.168.25.1 255.255.255.0' the outcome is 'SIOCSIFADDR : invalid argument', but when i check the ip address using /sbin/ifconfig i see the ip address is updated to 192.168.25.1 and is up. When i restart the linux box,the /sbin/ifconfig is reset to 192.168.100.1 .what should i do so that the linux box /sbin/ifconfig should not change when am rebooting.
iam having a problem while using the urlwatch utility in linux
/usr/bin/urlwatch --urls=/home/etika/Desktop/etikaa.txt file pathname is /home/etika/Desktop/etikaa.txt
when ownership is tomcat it doesnot run when ownership is etika(which is the user on the system through which iam running my script why the file which is passed to urlwatch is not accepted if that's file owner is tomcat6 it gives the following error
Traceback (most recent call last):
File "/usr/bin/urlwatch", line 221, in <module> for job in handler.parse_urls_txt(urls_txt): File "/usr/share/urlwatch/urlwatch/handler.py", line 128, in parse_urls_txt shelljob_errors.append('%s not owned by %s' % (urls_txt, os.getlogin())) OSError: [Errno 22] Invalid argument
but when the ownership of the file is changed to etika it run smoothly why urlwatch does not run when the file containing the urls is owned by tomcat with full 777 permission but run with etika (user on the system) through this iam running my shell script
I m unable to bring my wireless lan UP and getting the following error: SET failed on device wlan0 ; Invalid argument in dmesg i m getting : link not ready wlan0 Network card is : Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)
I loaded Avast anti virus into Ubuntu 10.10 this morning. It seemed to go okay and uploaded the updates. But then it stopped. Now when I try to start it I get the following error message. 'An error occurred in avast! engine: Invalid argument'
When I boot, after startup and before I log on, an error icon appears. I click - it shows a summary of the material that normally rolls by on a unix startup. One item is checked. It says:
Code: Enabling /etc/fstab swaps: swapon: /dev/mapping/vg_knox-lv_swap: read swap header failed: invalid argument I have 1 disk - it has 2 partitions - one an 83 type with a file system in it, holds the kernel, mounts at /boot.
The second partition is an 8e type contains a volume group logically split between lv_root and lv_swap and physically located on sda2. As I understand it, the system is having trouble processing the commands for lv_swap. I am tempted to mess with these commands, but don't have enough know how to do so and am short on the time required to learn enough to master this subject.
I am using an embed linux application and trying to mount a USB device. The USB worked fine in windows. I then put it on my Linux box formatted (I hope correctly) And then tried to do the following to mount it
Code:
Disk /dev/sda: 4040 MB, 4040748544 bytes 255 heads, 63 sectors/track, 491 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
I'm having trouble getting subversion working on Centos 4.7. When I try to create a repository using:
Code: svnadmin create /path/to/repo I get: Code:
svn: Berkeley DB error while creating environment for filesystem repo/db: Invalid argument svn: bdb: Berkeley DB library configured to support only DB_PRIVATE environments
I've searched the Net, with little luck. Threads seem to suggest that Centos has this flag compiled into the Berkeley DB RPM by default; whereas SVN doesn't want it. Someone, somewhere, must have got this to work and I'm sure it's something really simple I'm doing wrong.
I am running Red Hat with 2.6.18-194.8.1.el5PAE kernel version. I am trying to run encryptfs to encrypt a partition on my hard drive. One of the kernel modules necessary is the md5.ko. I noticed it wasn't loaded in when doing an lsmod. I tried running modprobe md5 and it fails to load:
i downloaded baldurs gate II shadows of amn iso's, because i lost one of the CD's to the box, but anyways, I went to mount the third .ISO for installation, and BAM! my computer froze, so i waited five minutes, came back, and still frozen. shut it down for 20 minutes, pulled it back up, and it's got this error as follows; "Mount: mounting /dev/disk/by-uuid/65b0a6a-a366-435a-a086-58428cfe2bd1 on /root Failed: invalid argument
I am trying to connect to a wireless network. I got a problem with network manager. So I try to connect manually
I found wireless network around by using "iwlist scan" command.
I want to connect to a network with ESSID "MCC(Mandalay)" and Key "mdymcctraining"
Here is my problem The output of "iwconfig" command is
Code:
What does it mean "invalid argument"? It means that my wireless pre-sharedkey is not correct? I am sure the key is valid. It is used by any others with window 7.
I am trying to get the hello world example to work on my fedora box I have all the compilers etc I have followed the example [URL]... it all goes fine untill 5 I type in the command: java HelloServer -ORBInitialPort 1050 -ORBInitialHost localhost& and it says invalid arugment helloserer
I need to write a script that will take 1 command line argument. The argument will be a username. The script will determine if the user exists on the system and will print an error if it does not. If the user does exist it will determine if the user is currently logged in, if the user is not logged in it will determine the last time the user logged in and display the file in the users home directory that was most recently modified.
This error is very difficult to solve, but also appears widespread across the Debian universe and also others like Arch and Fedora. I use a Canon LiDE 110 scanner and it has always worked very well under Linux. This same problem affects many other scanners not just the 110. Run any front end like xSane and after initially appearing to be OK it will fail with an Invalid Argument error.
But, it does not happen to everyone. I have several machines to experiment with so I did. I also used Debian Testing and Sid, Ubuntu 14.04 and 14.10 and various Mint versions and desktops.
The error is all to do with USB3. Plugging the scanner into a USB2 port does not in and of itself solve the issue. Nor does running the scanner through a hub. On my older laptop without USB3 hardware my scanner works like a charm using any modern Linux. On my very old spare desktop it also works fine despite having USB3.
But, on my shiny new Intel i5 on an ASUS H97I Plus it all falls apart. After much reading of forums and many dead ends we find the problem is modern machines with Intel xHCI Mode in the BIOS. It has to be off, not enabled, auto nor super auto. But when you turn it off you turn off USB3 support and your system falls back to USB2 only. My old spare machine has an AMD chipset and USB3 enabled does not cause this error.
So if you need to use your scanner and get this error then xHCI mode is the workaround. Fine if you have no real need for USB3, but most definitely a temporary solution.
Where in the system does this error come from? Too hard for me. Is it in Sane or in the libusb sub system or all the way up to the kernel? However if you have any USB device that has stopped working this setting in your BIOS has got to be worth a try. It is nothing to do with permissions or firmware.
sane-utils updated to 1.0.24-5 in sid (Dec 12, 2014) problem still exists.
I'm having troubles installing ubuntu on my "Acer one 522" netbook, I have made a pendrive with unetbootin and ubuntu 11.04 natty and upon booting into the usb i get the boot loader displayed properly, start to load ubuntu, then about halfway through i get some screen tearing with a really small shot of the boot loader screen in the top left hand corner followed by some command lines saying "cannot mount /dev/loop0 :invalid argument".
I have SSDs connect to my Linux machine through the LSI SAS/SATA 1068E controller. I've been trying to issue a ATA secure erase command to my SSDs, but I keep getting error. In fact even hdparm -i fails.
Initially I thought there was some kernel configuration issue, so I tried connecting a SSD to the on board SATA and I no longer get errors. The secure erase worked. It seems there is some compatibility issue with hdparm and the LSI controller/driver I'm using. Any way to make hdparm play nice with my LSI controller? Has anyone had success getting hdparm to work with drives connected to an LSI controller?
Additianal info: Linux Kernel: 2.6.30 hdparm: v9.27 LSI driver: Fusion MPT SAS Host driver 3.04.07
I am using rhel5. I am trying to implement acl's I created one partition mounted on directory /aclmount Created 3 users and group sales Created one file under mounted dir quotation I tried this command #sudo /usr/bin/setfacl -m -u:user1:rw- aclmount/quotation I am getting this out put setfacl: Option -m: Invalid argument near character 1
I am trying to duplicate our company website running from Centos 5.5 to another Fedora 13 box. The output is ok but when I tried to open 1 page which automatically search pdf files, this errors appear:
Warning: fopen(help_search/file - file.txt) [function.fopen]: failed to open stream: No such file or directory in/var/www/html/site/index.php on line 1018
Warning: Invalid argument supplied for foreach() in /var/www/html/site/index.php on line 1023
Warning: strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings.You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Manila' for 'PHT/8.0/no DST' instead in/var/www/html/site/index.php on line 1297
Warning: date()[function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Manila' for 'PHT/8.0/no DST' instead in /var/www/html/site/index.php on
I was just confused because in Centos 5.5 it works fine.