Tuesday, January 22, 2008

Console for networking and internet

Перетаскивая ноутбук дом-работа приходиться менять конфиги:
Можете использовать gedit вместо vi.

1.1. ip command to set a default router to 192.168.0.1
sudo ip route add default via 192.168.0.1

1.2. route command to set a default router to 192.168.0.1
sudo route add default gw 192.168.0.1

1.3. Save routing information to a configuration file /etc/network/interfaces
sudo vi /etc/network/interfaces
gateway 192.168.0.1

2.
Save nameserver information to a configuration file /etc/resolv.conf
sudo vi /etc/resolv.conf
nameserver 192.168.0.1

3. Restart networking
sudo /etc/init.d/networking restart

ip a change 192.168.0.12/24 dev eth0

ip r list
ip a list
cat /etc/network/interfaces
ifconfig
sudo mtr ya.ru
telnet svn.exoplatform.org 80
ping www.exoplatform.org
cat /etc/resolv.conf

Ping
ping HOST_OR_IP
ex.1:
$ ping google.ru
------------------------------
PING google.ru (72.14.221.104) 56(84) bytes of data.
64 bytes from fg-in-f104.google.com (72.14.221.104): icmp_seq=1 ttl=248 time=1106 ms
...
------------------------------
ex.2:
$ ping ya.ru
------------------------------
PING ya.ru (213.180.204.8) 56(84) bytes of data.
64 bytes from ya.ru (213.180.204.8): icmp_seq=2 ttl=56 time=99.3 ms
...
------------------------------



Nmap
sudo nmap -sS -PI -PT -O -F 192.168.0.1
sudo nmap -sS --open -p T:80,8080 192.168.0.1-255
ex.1:
alexey@wtf:~$ sudo nmap -sS --open -p T:80,8080 72.14.221.104
------------------------------
Starting Nmap 4.20 ( http://insecure.org ) at 2008-01-22 09:11 EET
Interesting ports on fg-in-f104.google.com (72.14.221.104):
Not shown: 1 filtered port
PORT STATE SERVICE
80/tcp open http

Nmap finished: 1 IP address (1 host up) scanned in 5.444 seconds
------------------------------


ex.2:
alexey@wtf:~$ sudo nmap -sS -PI -PT -O -F 72.14.221.104
------------------------------
Starting Nmap 4.20 ( http://insecure.org ) at 2008-01-22 09:12 EET
Interesting ports on fg-in-f104.google.com (72.14.221.104):
Not shown: 1252 filtered ports
PORT STATE SERVICE
80/tcp open http
113/tcp closed auth
179/tcp closed bgp
443/tcp open https
Device type: general purpose
Running (JUST GUESSING) : Microsoft Windows 95/98/ME|NT/2K/XP|3.X (85%), Linux 1.X (85%), NetBSD (85%)
Aggressive OS guesses: Microsoft Windows NT 3.51 SP5, NT 4.0 or 95/98/98SE (85%), Linux 1.3.20 (x86) (85%), NetBSD 1.6.2 (alpha) (85%), Microsoft Windows 3.1 with Trumpet Winsock 2.0 revision B (84%)
No exact OS matches for host (test conditions non-ideal).

OS detection performed. Please report any incorrect results at http://insecure.org/nmap/submit/ .
Nmap finished: 1 IP address (1 host up) scanned in 97.809 seconds

------------------------------


Telnet
telnet 192.168.0.1 80
GET . HTTP/1.0
ex.1:
alexey@wtf:~$ telnet 72.14.221.104 80
------------------------------
Trying 72.14.221.104...
Connected to 72.14.221.104.
Escape character is '^]'.
------------------------------

GET http://www.google.ru HTTP/1.0
------------------------------
HTTP/1.0 200 OK
Cache-Control: private
Content-Type: text/html; charset=windows-1251
Set-Cookie: PREF=ID=940ca0c052b49a6a:NW=1:TM=1200985708:LM=1200985708:S=xE0rP3DhbLa0U2SU; expires=Thu, 21-Jan-2010 07:08:28 GMT; path=/; domain=.google.ru
Server: gws
Date: Tue, 22 Jan 2008 07:08:28 GMT
Connection: Close

...
meta equiv="content-type" content="text/html; charset=windows-1251" .. title .. Google ./title..
...
...
------------------------------


ex.2:
POST /portal/portal HTTP/1.0
Host: localhost
Content-Length: 26

fis=yes&listCollapsed=true


Wget
r - рекурсивно
c - дописать
l - глубина
ex.
wget -r -c -l 2 http://docs.oasis-open.org/wsrp/v2/
wget -r -c -l 1 -nd -P wsrpSpecFiles http://docs.oasis-open.org/wsrp/v2/
wget -r -k -с -l 0 -np http://example.com/
- выкачка сайта целиком (рекурсивно, изменяя ссылки на относительные, докачивая, с неограниченной глубиной, без вышестоящего домена)

wget - wiki
Wget - насос для Интернета

Iptables

добавьте 127.0.0.1 link.altova.com в hosts
> sudo gedit /etc/hosts

запретить всем программам TCP подключения к 443 и 2799 портам на IP адресах 84.53.166.97, 88.221.170.97, 88.221.2.97
> sudo iptables -A INPUT -p tcp --dport 443:2799 -d 84.53.166.97 -j DROP
> sudo iptables -A INPUT -p tcp --dport 443:2799 -d 88.221.170.97 -j DROP
> sudo iptables -A INPUT -p tcp --dport 443:2799 -d 88.221.2.97 -j DROP
> sudo iptables --list


Links
http://www.xml.com/pub/a/2004/12/15/telnet-REST.html
http://ipesin.linux.kiev.ua/translations/rhm/love_cl1.htm
http://ipesin.linux.kiev.ua/translations/rhm/love_cl2.htm

Thursday, January 10, 2008

Deploy eXo WebOS on Unix

It is not official documentation. It is howto I do. As is.

Preamble

As Unix system I am using Ubuntu 7.10.
I have installed
  • Java 1.5 (1.5.0_11)
  • Maven 2 (2.0.7)
  • Tomcat 6 (6.0.14)
  • eXo Platform sources
To configure this all you should read two chapters 'Create the base structure' and 'Check out the source code' within article "Builing from sources" in eXo wiki.
Be sure that you configured valid maven repositories and tomcat version within settings.xml.

Main

Modify eXoProjects/tools/trunk/build/src/main/resources/linux/exoenv.sh
1. uncomment line 2 and replace option with you home dir, e.g.: "PORTABLE_DIR=/home/alexey"
2. commented lines 39-43
Than copy all content of resulted exoenv.sh to begin eXoProjects/tools/trunk/build/src/main/resources/linux/js.sh source.

Copy eXoProjects/tools/trunk/build/src/main/resources/linux/js.sh to $EXO_BASE_DIRECTORY ( known also as "java" within home dir )

Run there to deploy:
"./js.sh exobuild --product=ecm --build --deploy=tomcat"

Tomcat deployed to exo-working/exo-tomcat
Run within bin/ "eXo.sh run"
Browser url "http://localhost:8080/portal/"

Links
My Blog Java
My Blog Maven
My Blog Tomcat

vnserver exoplatform developer Ubuntu SetupExoWorkingEnvironment

Wednesday, January 9, 2008

Live view - camera

Axis Communications - Network cameras, IP cameras

Cherkassy live view

Google search - "zoom intitle:Live view - AXIS PTZ Network Camera" here
PTZ - pan, tilt and zoom

Live view - Livecam zur Seebrücke Ostseebad Sellin
Live view - Norway Mosjoen sentrum
Live view - AXIS 214 PTZ Network Camera
Live view - Capital Printing Company
Live view - School of Law Renovation and Addition
Live view - Webcam-leman.ch
Live view - Koudum.nl Webcam GalamaDammen
Live view - Switzerland Chur
Live view - Finland Kuusankosken
Live view - Live View of Lawton's Proposed New City Hall
Live view - Gift Shop Gallery
Live view - Weather Camera courtesy of E-Z Boat Storage


Поисковые запросы:
inurl:MultiCameraFrame?Mode=
inurl:"ViewerFrame?Mode="
inurl:netw_tcp.shtml
intitle:"supervisioncam protocol"
inurl:CgiStart?page=Single
inurl:indexFrame.shtml?newstyle=Quad
intitle:liveapplet inurl:LvAppl
inurl:/showcam.php?camid
inurl:video.cgi?resolution=
inurl:image?cachebust=
intitle:"Live View / - AXIS"
inurl:view/view.shtml
intext:"MOBOTIX M1"
intext:"Open Menu"
intitle:snc-rz30
inurl:home/
inurl:"MultiCameraFrame?Mode="
intitle:"EvoCam" inurl:"webcam.html?quot;
intitle:"Live NetSnap Cam-Server feed"
intitle:"Live View / - AXIS 206M"
intitle:"Live View / - AXIS 206W"
intitle:"Live View / - AXIS 210"
inurl:indexFrame.shtml Axis
inurl:"ViewerFrame?Mode="
inurl:"MultiCameraFrame?Mode=Motion"
intitle:start inurl:cgistart
intitle:"WJ-NT104 Main Page"
intext:"MOBOTIX M1" intext:"Open Menu"
intext:"MOBOTIX M10" intext:"Open Menu"
intext:"MOBOTIX D10" intext:"Open Menu"
intitle:snc-z20 inurl:home/
intitle:snc-cs3 inurl:home/
intitle:snc-rz30 inurl:home/
intitle:"sony network camera snc-p1"
intitle:"sony network camera snc-m1"
site:.viewnetcam.com -www.viewnetcam.com
intitle:"Toshiba Network Camera" user login
intitle:"netcam live image"
intitle:"i-Catcher Console - Web Monitor"
inurl:/home/home
intitle:flexwatch intext:"Copyright by Seyeon TECH Co"
intitle:"snc-rz30 home"
intitle: Network camera

Monday, January 7, 2008

File managers

Требования
1. Поиск
1.1. Быстрый поиск
1.2. Открытие документов при незавершенном поиске
1.3. Результат поиска в лист
1.4. Поиск по результатам поиска
2. Открыть текстовый файл в нормальном редакторе (скопировать и вставить строку из разных файлов)
3. Синхронизировать каталоги, сравнить текстовые файлы.
4. Переименовать файл/папку.
5. Создать текстовый файл.
6. Запустить .sh в консоли.
7. Закладки и навигация.
8. Редактирование текстового файла в одном архиве и в двух вложенных архивах. В варе (war) есть джар (jar) и в нем файл.

Претенденты (twin-panel file managers)
1. Krusader
2. MC
3. Total Commander
4. GNOME Commander
5. Tux Commander

Пример оформления
===============
Имя файлового менеджера
home and wiki
Картинка
direct download link
Краткое описание и по пунктам требований
===============

Result.
1. Krusader

2. MC

3. Total Commander
4. GNOME Commander
5. Tux Commander



Links
http://en.wikipedia.org/wiki/Comparison_of_file_managers