Thursday, April 15, 2010

/libexec/ld-elf.so.1: Shared object "libidn.so.17" not found, required by "skipf ish"

/libexec/ld-elf.so.1: Shared object "libidn.so.17" not found, required by "skipf
ish"

you got this when u run skipfish...

but

$ ls /usr/local/lib
libidn.a libidn.la libidn.so libidn.so.17 pkgconfig
$

they are there!

by using numerous keywords, and finally using "/usr/lib /usr/local/lib" to google, i found this:


http://ubuntuforums.org/showthread.php?t=289848


Re: /usr/local/lib and /usr/lib

iamnafets,

Unless running `ldconfig` is part of the "make install" command for installing the library, your system doesn't know your custom-compiled libraries exist. /usr/local/lib might not be in the library search path either. Do the following as root:
Code:
# echo "/usr/local/lib" >> /etc/ld.so.conf
# ldconfig
The above command will append the directory /usr/local/lib to the /etc/ld.so.conf file, creating it if necessary. ldconfig updates the system's cache on libraries installed.

Hope this helps.



the freebsd forum search is hopeless really, but the OS is great.




it still didn't work!

the man pages of ldconfig mention /etc/ld-elf.so.conf



FINALLY


ldconfig /usr/local/lib

it works!



freebsd# ./skipfish
skipfish version 1.31b by
[-] PROGRAM ABORT : Scan target not specified (try -h for help).
Stop location : main(), skipfish.c:394
freebsd#





the man page of ldconfig reads:

SYNOPSIS
ldconfig [-32] [-aout | -elf] [-Rimrsv] [-f hints_file]
[directory | file ...]

DESCRIPTION
The ldconfig utility is used to prepare a set of ``hints'' for use by the
dynamic linker to facilitate quick lookup of shared libraries available
in multiple directories. It scans a set of built-in system directories
and any directories specified on the command line (in the given order)
looking for shared libraries and stores the results in a system file to
forestall the overhead that would otherwise result from the directory
search operations the dynamic linker would have to perform to load the
required shared libraries.

Files named on the command line are expected to contain directories to
scan for shared libraries.....

FreeBSD ports

for example, if i want to install bash shell

become root
cd /usr/ports/shells/bash
make install



OR

make HTTP_PORT=192.168.0.100:8080 install if you are behind a proxy. Of course, in this case, the proxy is 192.168.0.100.

Thursday, March 25, 2010

vbscript

username

Set WshNetwork = WScript.CreateObject("WScript.Network")
WScript.Echo "Username :" & WshNetwork.UserName

concatenation

use & to concatenate strings, for example,

FilePath = strPath & WshNetwork.UserName & ".V2\ntuser.dat"

check for existence of a file

Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FileExists(FilePath)) Then
WScript.Echo FilePath & " exists"
End If


check for a value in a registry key
Unlike other programming languages, you need to read the "Err". I wonder why MS don't implement return value. funny.

strValueName = "HKCU\abc\def"

Set WshShell = WScript.CreateObject("WScript.Shell")
On Error Resume Next

WshShell.RegRead(strValueName)

If Err = -2147024894 Then
'The key "HKCU\abc\def" does not exist
End If

If Err = 0 Then
'The key exist
End If

Executing a command
Set WshShell = CreateObject("WScript.Shell")
'encrypt Z: drive using EFS
Set oExec = WshShell.Exec("cipher /e /s:z:")