Wednesday, April 19, 2017



Read the book "the google way"


Monday, April 10, 2017

Dionaea on Raspberry pi

Installing dionaea
echo "deb http://packages.s7t.de/raspbian wheezy main" >> /etc/apt/sources.list

apt-get update

apt-get install libglib2.0-dev
apt-get install libssl-dev
apt-get install libcurl4-openssl-dev
apt-get install libreadline-dev
apt-get install libsqlite3-dev
apt-get install libtool
apt-get install automake
apt-get install autoconf
apt-get install build-essential
apt-get install subversion
apt-get install git-core
apt-get install flex
apt-get install bison
apt-get install pkg-config
apt-get install libnl-3-dev
apt-get install libnl-genl-3-dev
apt-get install libnl-nf-3-dev
apt-get install libnl-route-3-dev
apt-get install liblcfg
apt-get install libemu
apt-get install libev
apt-get install dionaea-python
apt-get install dionaea-cython
apt-get install libpcap
apt-get install udns
apt-get install dionaea
apt-get install liblcfg


Configurating dionaea
cp /opt/dionaea/etc/dionaea/dionaea.conf.dist /opt/dionaea/etc/dionaea/dionaea.conf
chown nobody:nogroup /opt/dionaea/var/dionaea -R

Starting dionaea
export PATH=$PATH:/opt/dionaea/bindionaea -u nobody -g nogroup -r /opt/dionaea -w /opt/dionaea -p /opt/dionaea/var/dionaea.pid

Addtional packages   apt-get install snort
apt-get install sqlite3

apt-get install p0f
p0f -i any -u root -Q /tmp/p0f.sock -q -l -d -o /dev/null -c 1024

sudo chown nobody:nogroup /tmp/p0f.sock
Black and White raspberry pi

Raspberry PI

Resource: http://maniactwister.de/b/aazlvr/en

Thursday, May 09, 2013

Automatically login on raspberry PI


A -> B automatically


Step 1:

ON machine A



$ ssh-keygen -t rsa



Step 2:



cd .ssh/

mv id_rsa.pub id_rsa_xxx.pub



Step 3:

scp id_rsa_xxx.pub root@B:





ON machine B



cat id_rsa.pub >> .ssh/authorized_keys

rm id_rsa_xxx.pub



ON machine A

ssh -l root B

Wednesday, October 26, 2011

fastboot
press power + back button .
flash recovery image
fastboot recovery-RA-dream-v1.7.0-cyan.img
Recovery Mode
press power + home button 

Saturday, June 12, 2010

To show CPU on router

show proc cpu | excl 0.00%__0.00%__0.00%

Monday, May 17, 2010

The problem can be observed on a GRE over IPSec tunnel end point router with two common symptoms:
High CPU usage in the IP Input process, as shown below:

R2#show process cpu include CPUIP Input
CPU utilization for five seconds: 63%/0%; one minute: 45%; five minutes: 38%
31 8140 6934 1173 52.69% 42.05% 32.41% 0 IP Input

Large amount of IP reassembly, as reported by show ip traffic shown below:
R2#show ip traffic in reassemblefragment
Frags: 7499 reassembled, 12 timeouts, 0 couldn't reassemble
0 fragmented, 0 fragments, 0 couldn't fragment

Note: Fragmentation counts are likely okay, but the reassemble counts should be checked on the other end of the tunnel.

Saturday, May 15, 2010

debug on secure remote client

Please use the following to debug:
==============================================
debug instructions on the SecureRemote:
==============================================
srfw ctl debug 0
srfw ctl debug -buf 32000
srfw ctl debug -m fw all
srfw ctl debug -m VPN all
srfw monitor -e "accept;" -o srfw_mon.cap

1) Stop the kernel debug for FW and SecureRemote.
# fw ctl debug 0

2) Stop FW Monitor for FW and SecureRemote.
CTRL + C

Sunday, May 02, 2010

hub is a broadcast domain and collision domain

switch is a broadcast domain and each interface is a collision domain
tips 1 - Do not lookup domain
Switch#config t
Switch(config)#no ip domain-lookup
Switch(config)#end

Tips 2 - wrapping of console text
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#line con 0
Switch(config-line)#logging synchronous
Switch(config-line)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Tutorial 1 - Wipe out configuration

Switch#erase startup-config
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]y[OK]
Erase of nvram: complete
%SYS-7-NV_BLOCK_INIT: Initialized the geometry of nvram
Switch#reload
Proceed with reload? [confirm]
C2950 Boot Loader (C2950-HBOOT-M) Version 12.1(11r)EA1, RELEASE SOFTWARE (fc1)
Compiled Mon 22-Jul-02 18:57 by miwang
Cisco WS-C2950-24 (RC32300) processor (revision C0) with 21039K bytes of memory.
2950-24 starting...
Base ethernet MAC Address: 0002.1724.EAD7
Xmodem file system is available.
Initializing Flash...
flashfs[0]: 2 files, 0 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 64016384
flashfs[0]: Bytes used: 3058664
flashfs[0]: Bytes available: 60957720
flashfs[0]: flashfs fsck took 1 seconds.
...done Initializing Flash.

Boot Sector Filesystem (bs:) installed, fsid: 3
Parameter Block Filesystem (pb:) installed, fsid: 4


Loading "flash:/c2950-i6q4l2-mz.121-22.EA4.bin"...
########################################################################## [OK]
Restricted Rights Legend

Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.

cisco Systems, Inc.
170 West Tasman Drive
San Jose, California 95134-1706



Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(22)EA4, RELEASE SOFTWARE(fc1)
Copyright (c) 1986-2005 by cisco Systems, Inc.
Compiled Wed 18-May-05 22:31 by jharirba

Cisco WS-C2950-24 (RC32300) processor (revision C0) with 21039K bytes of memory.
Processor board ID FHK0610Z0WC
Running Standard Image
24 FastEthernet/IEEE 802.3 interface(s)

63488K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address: 0002.1724.EAD7
Motherboard assembly number: 73-5781-09
Power supply part number: 34-0965-01
Motherboard serial number: FOC061004SZ
Power supply serial number: DAB0609127D
Model revision number: C0
Motherboard revision number: A0
Model number: WS-C2950-24
System serial number: FHK0610Z0WC

Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(22)EA4, RELEASE SOFTWARE(fc1)
Copyright (c) 1986-2005 by cisco Systems, Inc.
Compiled Wed 18-May-05 22:31 by jharirba

Press RETURN to get started!


%LINK-5-CHANGED: Interface FastEthernet0/10, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/10, changed state to up
%LINK-5-CHANGED: Interface FastEthernet0/21, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/21, changed state to up

Switch>
To assign portfast to a range

Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface range fastEthernet 0/1 -24 (To note, -24 but not - 24)
Switch(config-if-range)#spanning-tree portfast
%Warning: portfast should only be enabled on ports connected to a single
host. Connecting hubs, concentrators, switches, bridges, etc... to this
interface when portfast is enabled, can cause temporary bridging loops.
Use with CAUTION

%Portfast will be configured in 24 interfaces due to the range command
but will only have effect when the interfaces are in a non-trunking mode.
Switch(config-if-range)#end
Assigning the port 1 to vlan 128

Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface fastEthernet 0/1
Switch(config-if)#switchport access vlan 128
Switch(config-if)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#sh vlan

VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/5
Fa0/6, Fa0/7, Fa0/8, Fa0/9
Fa0/10, Fa0/11, Fa0/12, Fa0/13
Fa0/14, Fa0/15, Fa0/16, Fa0/17
Fa0/18, Fa0/19, Fa0/20, Fa0/21
Fa0/22, Fa0/23, Fa0/24
128 management_vlan active Fa0/1
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
128 enet 100128 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - - 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005 1500 - - - ibm - 0 0

Remote SPAN VLANs
------------------------------------------------------------------------------


Primary Secondary Type Ports
------- --------- ----------------- ------------------------------------------
Switch#
How to create a vlan

Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 128
Switch(config-vlan)#name management_vlan
Switch(config-vlan)#end

%SYS-5-CONFIG_I: Configured from console by console
Switch#sh vlan

VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
128 management_vlan active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
128 enet 100128 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - - 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005 1500 - - - ibm - 0 0

Remote SPAN VLANs
------------------------------------------------------------------------------


Primary Secondary Type Ports
------- --------- ----------------- ------------------------------------------
Switch#

Saturday, November 21, 2009

Downgrading from donut to cupcake

After few weeks with donut, i decided to downgrade to cupcake with the following difficulties:

1) the browser often hangs
2) Cannot run pdf viewer
3) Nothing new on donut

I took the pain of resetting the phone to factory default by the following command

boot into recovery mode by pressing "home" key during boot up
Press Alt-L for verbose mode
Press Alt-W for resetting to factory default

I need to input the access point information as follows:

For StarHub 3G APN setting:

Name : StarHub Internet
APN : shwapint
APN Type : default

For StarHub MMS APN setting:

Name : StarHub MMS
APN : shmms
MMSC : http://mms.starhubgee.com.sg:8002/
MMS proxy : 10.12.1.80
MMS port : 80
APN Type : mms

Have to re-login to gmail

Tuesday, November 03, 2009

To install pdf viewer on android 1.5

adb shell
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system

dd if=/sdcard/download/libpdfreader.so of=/system/lib/libpdfreader.so
dd if=/sdcard/download/FilePicker.apk of=/system/app/FilePicker.apk

Sunday, November 01, 2009

boot android in safe mode
1) power down by pressing power off button
2) power up by pressing menu button
3) boot in safe mode

Friday, September 11, 2009

configuring snmp on router
snmp-server community public ro
snmp-server community ro
snmp-server community rw 60


access-list 60 permit

Thursday, September 10, 2009

command to erase cisco switch
Login
Enable
#write erase
#del flash:vlan.dat

Friday, September 04, 2009

command to mount usb thumb drive on solaris 10

For more than 1 type of filesystem
#/sbin/mount -f pcfs /dev/dsk/c5t0d0s0:c /mnt/usb

Wednesday, June 17, 2009











Android 1.5 aka Cupcake









Back cover Design













Android Virtual Keyboard