Posted on 03-11-2011
Filed Under (Linux) by admin

/dev/null
Vikipedia, özgür ansiklopedi

/dev/null Unix benzeri işletim sistemlerinin aygıtlar dizininde (/dev) bulunan özel bir belgedir. Bu belgeye yazılan her tür ve her hangi miktarda olan veriyi sistem yok sayar ve yazan işleme EOF gönderilir. Bu açıdan /dev/null bir kara deliğe benzetilir.

Yaygın kullanımlarından biri uygulamaların istenmeyen çıktılarını, yönlendirme aracılığı ile, devre dışı bırakmaktır.

# çıktısını görmek istemediğimiz bir betik (script)için
./betik.sh > /dev/null 2>&1

Üstteki örnekte, önce > aracılığı ile olağan çıktı (1) /dev/nulla yönlendirilir. Sonra da 2>&1 ile hata çıktıları (2) olağan çıktı ile aynı yöne gönderilir.

Aynı görevi yerine getiren aygıtlar diğer işletim sistemlerinde de mevcuttur. Örneğin, DOS’da NUL, Amiga’da NIL, Windows NT ve türevlerinde \Device\Null ve Open VMS’de NL diye adlandırılmışlardır.

(0) Comments    Read More   
Posted on 26-10-2011
Filed Under (Linux) by admin
Solution:
$ php --version
PHP 5.3.3 (cli) (built: Jan 20 2011 06:13:52)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

$ mysql -u admin -p

mysql> select * from Components;

mysql> update Components set version=’5.3.3‘ where name=’php’;

 

 

 

(0) Comments    Read More   
Posted on 21-10-2011
Filed Under (Linux) by admin
(0) Comments    Read More   
Posted on 17-10-2011
Filed Under (Uncategorized) by admin
#!/bin/sh
# This is some secure program that uses security.

VALID_PASSWORD="secret" #this is our password.

echo "Please enter the password:"
read PASSWORD

if [ "$PASSWORD" == "$VALID_PASSWORD" ]; then
	echo "You have access!"
else
	echo "ACCESS DENIED!"

 

Karşılaştırma:

-eq equal to
-ne not equal to
-lt less than
-le less than or equal to
-gt greater than
-ge greater than or equal to

Dosya işlemleri:

-s file exists and is not empty
-f file exists and is not a directory
-d directory exists
-x file is executable
-w file is writable
-r file is readable
(0) Comments    Read More   
solution:
access to *
        by self write
        by users read
        by anonymous auth
(0) Comments    Read More   
Posted on 11-10-2011
Filed Under (Linux) by admin
vnc ile bağlanmak istediğim kullanıcı adı oracle, 
aşağıdaki komutları kendi kullanıcıza göre düzelemelisiniz,
[root@ares log]# cat /etc/redhat-release
CentOS release 5.7 (Final)
[root@ares ~]# yum install vnc-server
[root@ares ~]# echo 'VNCSERVERS="1:oracle"' >> /etc/sysconfig/vncservers
[root@ares ~]# echo 'VNCSERVERARGS[1]="-geometry 1024x768"' >> /etc/sysconfig/vncservers
[root@ares ~]# mkdir /home/oracle/.vnc
[root@ares ~]# echo '#!/bin/sh' >> /home/oracle/.vnc/xstartup
[root@ares ~]# echo exec /etc/X11/xinit/xinitrc >> /home/oracle/.vnc/xstartup
[root@ares ~]# chmod +x /home/oracle/.vnc/xstartup
[root@ares ~]# chown -R oracle /home/oracle/.vnc
[root@ares ~]# su - oracle
[root@ares ~]$ vncpasswd
[root@ares ~]# su -
[root@ares ~]# service vncserver start




					
(0) Comments    Read More   
Posted on 10-10-2011
Filed Under (Linux, Security) by admin
openldap konfigurasyonu için ihtiyaç duydum, konfigurasyon dosyasında açık halde şifre tutmak yerine crypt ile saklamak daha doğru olacaktır.
$ perl -e 'print("userPassword: {CRYPT}".crypt("secret","salt")."\n");'
(0) Comments    Read More   
Posted on 08-10-2011
Filed Under (Security) by admin

scrapy
Scrapy is a fast high-level screen scraping and web crawling framework, used to crawl websites and extract structured data from their pages. It can be used for a wide range of purposes, from data mining to monitoring and automated testing. http://scrapy.org/
jsoup
jsoup is a Java library for working with real-world HTML. It provides a very convenient API for extracting and manipulating data, using the best of DOM, CSS, and jquery-like methods.jsoup implements the WHATWG HTML5 specification, and parses HTML to the same DOM as modern browsers do.

Beautiful Soup
Beautiful Soup is an HTML/XML parser for Python that can turn even invalid markup into a parse tree. It provides simple, idiomatic ways of navigating, searching, and modifying the parse tree. It commonly saves programmers hours or days of work. There’s also a Ruby port called Rubyful Soup.

http://www.crummy.com/software/BeautifulSoup/documentation.html

(0) Comments    Read More   
Posted on 23-09-2011
Filed Under (Linux) by admin

http://ftp.novell.com/pub/mono/download-stable/RHEL_5/x86_64/ adresinden rhel5 rpm lerini indirebilirsiniz,

rpm kurulum işleminden sonra binary dosyalar /opt/novel/mono/bin dizini altına yükleniyor, son olarak /bin altına istediğiniz binary dosyaları linkleyerek kurulumu tamamlıyorsunuz.  Bağımlılıkları nediyle sistemime kurduğum paketler;

[root@appsrv mono]# cat /etc/redhat-release
CentOS release 5.6 (Final)
[root@appsrv mono]# ls
mod_mono-addon-2.10-6.9.x86_64.rpm
mono-addon-core-2.10.2-5.1.x86_64.rpm
mono-addon-data-2.10.2-5.1.x86_64.rpm
mono-addon-data-sqlite-2.10.2-5.1.x86_64.rpm
mono-addon-devel-2.10.2-5.1.x86_64.rpm
mono-addon-extras-2.10.2-5.1.x86_64.rpm
mono-addon-web-2.10.2-5.1.x86_64.rpm
mono-addon-winforms-2.10.2-5.1.x86_64.rpm
monodoc-addon-core-2.10.2-5.1.x86_64.rpm
[root@appsrv mono]# rpm -qa |grep mono
mono-addon-data-2.10.2-5.1
mono-addon-winforms-2.10.2-5.1
mono-addon-web-2.10.2-5.1
mono-addon-data-sqlite-2.10.2-5.1
mono-addon-extras-2.10.2-5.1
mono-addon-core-2.10.2-5.1
[root@appsrv mono]# ls -al /bin/mono
lrwxrwxrwx 1 root root 25 Sep 23 16:52 /bin/mono -> /opt/novell/mono/bin/mono

 

(0) Comments    Read More   
Posted on 21-09-2011
Filed Under (Windows) by admin

start-> run -> cmd.exe

tasklist /m /fi “imagename eq rundll32.exe” >C:\rundll32test.txt

notepad C:\rundll32test.txt

rundll32.exe hangi dosyalar rundll32.exe ile ilişkili dosyaların listesi

(0) Comments    Read More