giovedì 5 gennaio 2012

No such file or directory but file exists SOLVED

At least I have resolved the problem:

:[~]$ LANGUAGE=C  ./lmgrd

-bash: ./lmgrd: No such file or directory

:[~]$ file ./lmgrd 
./lmgrd: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped

:[~]$ ls -l  ./lmgrd 
-rwxrwxrwx  ./lmgrd*

:[~]$ strace  ./lmgrd 
execve("./lmgrd", ["./lmgrd"], [/* 100 vars */]) = -1 ENOENT (No such file or directory)
dup(2)                                  = 3
fcntl(3, F_GETFL)                       = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 5), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9082bf3000
lseek(3, 0, SEEK_CUR)                   = -1 ESPIPE (Illegal seek)
write(3, "strace: exec: No such file or di"..., 40strace: exec: No such file or directory
) = 40
close(3)                                = 0
munmap(0x7f9082bf3000, 4096)            = 0
exit_group(1)                           = ?


:[~]$ ldd  ./lmgrd 
linux-gate.so.1 =>  (0xf7710000)
libpthread.so.0 => /lib32/libpthread.so.0 (0xf76be000)
libm.so.6 => /lib32/libm.so.6 (0xf7694000)
libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf7675000)
libc.so.6 => /lib32/libc.so.6 (0xf74fb000)
libdl.so.2 => /lib32/libdl.so.2 (0xf74f6000)
/lib/ld-lsb.so.3 => /lib/ld-linux.so.2 (0xf7711000)


:[~]$ LANGUAGE=C ls -l /lib/ld-lsb.so.3
ls: cannot access /lib/ld-lsb.so.3: No such file or directory

root@niels:/lib# ln -s ld-linux.so.2 ld-lsb.so.3

:[~]$ ./lmgrd 
20:53:22 (lmgrd) -----------------------------------------------
20:53:22 (lmgrd)   Please Note:
20:53:22 (lmgrd) 
20:53:22 (lmgrd)   This log is intended for debug purposes only.

IT WORKS!

But why ldd lie?

martedì 3 gennaio 2012

tcpdump

tcpdump -l -s0 -w - tcp dst port 80 | strings | egrep "(Host:|Referer:)" | tee -a website-tracing.txt

lunedì 2 gennaio 2012

Calendario 2012

pcal -S -B -p  -P a4 -o calendario-2012.ps  -M -F Monday -E -J -a IT 12 ; evince calendario-2012.ps

Deprecated Linux networking commands and their replacements


the deprecated Linux networking commands in question are: arp, ifconfigiptunnel, iwconfig, nameif, netstat, and route

http://dougvitale.wordpress.com/2011/12/21/deprecated-linux-networking-commands-and-their-replacements/