I suffered a pain with Python on the MacPorts. I'd like to connect Trac with Subversion to use it efficiently. But there were always a problem when its plugins were active. Finally I fixed it and knew what was a problem. 

The Trac's guide  suggests below procedures. 
sudo port install apache2
sudo port install subversion +mod_dav_svn
sudo port install trac

After these the problem is occurred when it is linked with Subversion. Python is crashed with below error message.   
Fatal Python error: Interpreter not initialized (version mismatch?)

You have to follow below procedures after setting the MacPorts python as default to solve this problem. 
sudo port -f uninstall subversion-python25bindings
sudo port clean --all subversion-python25bindings
sudo port install subversion-python25bindings

After all, I could have my own knowledgebase system. ^^

A few years ago, I felt that it is need to take a knowledge base system to support my tired brain. It is very stressful to work as a security consultant and a penetration tester because many techniques are being out of the world. Moreover a security professional must know more information and techniques better than its local professionals such as programmers, network engineers, system engineers. So it is important to keep the past information as much as to study new information. 

I decided to build my own using the Trac. Past I tried to build my department KB using the MoniWiki. I thought the Trac is more powerful. Currently I think it was right. 
It is easy to install the Trac on Mac OS X using the MacPorts. Please refer its installation guide how to install the MacPorts on your Mac OS X. You can install the Trac using 'port' command. It is more detail to view the Trac's installation guide.  
sudo port install apache2
sudo port install subversion + mod_dav_svn
sudo port install trac

After installation it is need to create your project. My project base directory is under my home directory. 
trac-admin /Users/bar4mi/Trac/mykb initenv

To use authentication it is need to make passwd using htpasswd which is inclued in apache package.
sudo htpasswd -c /Users/bar4mi/Trac/.htpasswd bar4mi

One thing you have to know is a problem using the Trac with mod_python25. I tried to install it with the mod_python25 but to fail it. it is the problem of the MacPorts package. I think so. So I run it with standalone mode. (Additionally to know is that the Mac OS X includes it's bundle apache. It's location is /usr/sbin/apachectl, the apache on the Macports is /opt/local/apacche2/bin/apachectl. Don't forget it! )
tracd -p 8000 --basic-auth=mykb,/Users/bar4mi/Trac/.htpasswd,"" /Users/bar4mi/Trac/mykb

So I have my private knowledge base system. What to remain is to fill it up. 
Last week I failed to demonstrate the usage of Metasploit. Because it had problem with ruby 1.8.7. You can find this issue at Metasploit's blog. It's very late time in Korea. So I'd like to write this subject shortly. 

1st, We verify the ruby's version which we want to install. We can find its revision number from below site. I found the revision number(36429) what I want to install.

2nd, We have to set up a local repository(mkdir /Users/Shared/dports) and in /opt/local/etc/macports/sources.conf add below line before rsync.

3rd, install ruby port into our local repository.
svn co -r 36429 http://svn.macports.org/repository/trunk/dports/lang/ruby/ lang/ruby/
svn co -r 36429 http://svn.macports.org/repository/macports/trunk/dports/lang/ruby/ lang/ruby/

4th, run portindex. 
portindex /Users/Shared/dports

5th, verify our ruby's port number in ports list. You can see the 1.8.6-p114.
port list

6th, install our old ruby port.
port install ruby @1.8.6-p114

We can see simple lines for installing ruby ports below. 
--->  Fetching ruby
--->  Attempting to fetch ruby-1.8.6-p114.tar.gz from http://www.ibiblio.org/pub/languages/ruby/1.8
--->  Attempting to fetch ruby-1.8.6-p114.tar.gz from http://mirrors.sunsite.dk/ruby/1.8
--->  Attempting to fetch ruby-1.8.6-p114.tar.gz from ftp://xyz.lcs.mit.edu/pub/ruby/1.8
--->  Verifying checksum(s) for ruby
--->  Extracting ruby
--->  Applying patches to ruby
--->  Configuring ruby
--->  Building ruby with target all
--->  Staging ruby into destroot
--->  Installing ruby 1.8.6-p114_0+darwin_9+thread_hooks
--->  Activating ruby 1.8.6-p114_0+darwin_9+thread_hooks
--->  Cleaning ruby

Finally, we can verify our installed ruby version. 
ruby -v

Good night! and be careful cold. T.T 
이전 1 다음