Older blog entries for lyxmoo (starting at number 13)

6 Dec 2005 (updated 25 Dec 2006 at 09:07 UTC) »

Orz solaris strlen core dump.

such code will drop a segment fault

#include <stdio.h> #include <string.h>

int main() { char *string = NULL;

printf("\nString length = %d", strlen(string)); return (0); }

to resolve this:

ugly and fast way is :

LD_PRELOAD_32="/usr/lib/0@0.so.1" export LD_PRELOAD_32

$ ./configure --host=ppc-linux --target=ppc --build=i686-linux --with-cc=powerpc-linux-gcc --with-ld=powerpc-linux-ld --with-endianness=little --enable-mini-agent

CC=/opt/arm-cross/usr/bin/arm-linux-gcc ./configure --host=i386 --target=arm-linux --prefix=/usr/local/arm/2.95.3/arm-linux --enable-add-ons --with-endianness=little --enable-mini-agent

I've sucessed port kexec/lkcd from 2.6.10/2.6.9 to 2.6.12FC4

ln -s /usr/src/linux/include/asm asm-generic linux as libpcap +pf_ring

Memo

Linux-2.4.29 + RTAI-3.1 + PF_RING + ebridge + iptables-base & extra ... passed

Do not use PF_RING mkpatch.sh.

20 Jan 2005 (updated 20 Jan 2005 at 09:29 UTC) »
My IPMP configuration on Solaris 9/2005-01
bash-2.05# cat hosts
#
# Internet host table
#
127.0.0.1 localhost
2x2.9x.2x9.134 nspd4 loghost
2x2.9x.2x9.149 nspd-4
10.0.1.41 nspd4-1
10.0.1.42 nspd4-2
192.168.28.49 nspd4-q

bash-2.05# cat hostname.ce0
nspd-4 netmask 255.255.255.0 broadcast 10.0.1.255 group dns-grp1 up \
addif nspd4-1 deprecated -failover netmask 255.255.255.0 broadcast 10.0.1.255 up

bash-2.05# cat hostname.ce1
nspd4-2 netmask 255.255.255.0 broadcast 10.0.1.255 group dns-grp1 deprecated -failover standby up

bash-2.05# cat hostname.lo0\:1
nspd4

bash-2.05# ifconfig -a
lo0:
flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
lo0:1: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 2x2.9x.2x9.134 netmask ffffffe0
ce0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 2x2.9x.2x9.149 netmask ffffffe0 broadcast
202.96.209.159
groupname dns-grp1
ether 0:3:ba:8c:1f:b1
ce0:1: flags=9040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER> mtu 1500 index 2
inet 10.0.1.41 netmask ffffff00 broadcast 10.0.1.255
ce1: flags=69040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER,STANDBY,INACTIVE/> mtu 1500 index 3
inet 10.0.1.42 netmask ffffff00 broadcast 10.0.1.255 groupname dns-grp1
ether 0:3:ba:8c:1f:b1
qfe0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 4
inet 192.168.28.49 netmask ffffff00 broadcast 192.168.28.255
ether 0:3:ba:8c:1f:b1

bash-2.05#
</strong>

IOS dump out As:

dd if=c_ios.image.bin bs=16 skip=7 of=c_dump_out.bz2

bzip2 -d c_dump_out.bz2

ingore any warnning message.

you'll get a raw file .

7 Jan 2005 (updated 7 Jan 2005 at 06:20 UTC) »
Memo For myself..

http-2.0.52 compile options here. ./configure --prefix=/usr --sysconfdir=/etc/httpd/conf --localstatedir=/var/log --datadir=/var/www --enable-so --enable-rewrite --enable-ssl --with-ssl=/usr/local/openssl --with-z

php-5.0.2 compile options here.

./configure --prefix=/usr --sysconfdir=/etc/httpd --with-apache2=../httpd-2.0.52 --with-apxs2=/usr/bin/apxs --with-mysql --with-openssl --with-png-dir=/usr/lib --with-jpeg-dir=/usr/lib --with-snmp --with-ldap --with-openssl-dir=/usr/local/openssl --with-zlib --with-bzip2 --with-crypt --with-libxml --with-ftp --with-gd --with-freetype-dir=/usr/lib

Title::An net-snmp API example program for Redback SMS 10000

//The example do one things: send a RBN subscriber reauth snmp to SMS //comile command as: gcc -o redweb redweb.c -lkstat -lm -lsocket -ladm -lnetsnmp -lcrypto

static char snmpreauth[]=".1.3.6.1.4.1.2352.2.14.1.2.1.1."; struct snmp_session session, *ss; struct snmp_pdu *response; struct snmp_pdu *pdu;

char snmpcommunity[32]; char snmpstr[256]; char tmpstr[128]; char *endptr;

oid name[512]; int name_length; int cnt,id=0; int snmpsetvalue=1;

init_mib(); add_mibdir("/opt/weblogin/mibs"); // include Redback Mibs file

snmp_sess_init(&session); session.version=SNMP_VERSION_1; session.peername=strdup(data.nas_address); session.community=strdup(snmpcommunity); session.community_len=strlen(session.community); session.retries=0; session.timeout=12000; session.sessid=strtol(data.timeid, &endptr, 0);

SOCK_STARTUP;

/* Macro * open an SNMP session */

ss = snmp_open(&session); if (ss == NULL) { /* * diagnose snmp_open errors with the input netsnmp_session pointer */ snmp_sess_perror("snmptable", &session); SOCK_CLEANUP; }

/* * create PDU for SET request and add object names and values to request */

pdu = (struct snmp_pdu *)snmp_pdu_create(SNMP_MSG_SET); if(pdu==NULL) { printf("Unable to create the pdu"); }

sprintf(snmpstr,"%s17",snmpreauth); for(cnt=0;cnt<17;cnt++) { sprintf(tmpstr,".%d",(char *)data.session_id[cnt]); // data.session_id MAC format string strcat(snmpstr,tmpstr); }

//FIXME name_length=512;

if(!read_objid(snmpstr,name,&name_length)){ printf("Error in read_objid\n");exit(1);};

snmp_pdu_add_variable(pdu,name,name_length,ASN_INTEGER,&snmpsetvalue,sizeof(snmpsetvalue)); status = snmp_synch_response(ss, pdu, &response); // sync snmp if (status == STAT_SUCCESS) { if (response->errstat == SNMP_ERR_NOERROR) { } exitval = 2; } else if (status == STAT_TIMEOUT) { fprintf(stderr, "SNMP Timeout: No Response from %s\n", session.peername); exitval = 1; } else { snmp_sess_perror("snmpset", ss); printf("snmp session else"); exitval = 1; }

if (response) snmp_free_pdu(response);

snmp_close(ss);

SOCK_CLEANUP;

/* Macro off * final a snmp session */

9 Nov 2003 (updated 9 Nov 2003 at 12:27 UTC) »

.Running on Linux only for getopt_long()

.You must use this program for DNS system security or DNS performance test only.

.Any Modify or Reprogram for discomfort target to anyother beyond my willing

.evil means no Attach me

lyxmoo@msn.com

http://www.xfocus.net/tools/200307/dnsflood.c

4 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!