Posts

Explaining About Bittorrent Encryption

I remember I downloaded a torrent with KTorrent in my Slackware-Linux box, thinking that everything is alright, but that was in the office. After I downloaded that source, which is an ISO file, I told my boss to share that I did download an updated version of that file. Then he look at me and ask me disparagingly, "Are you downloading it securely or using encryption?". I ask myself, "dang, what did I do?" and stuck in a moment, geeze! We'll he told me to download anything since our internet is faster than a DSL. Okay, cut the crap! I'm not digressing here. So I did a research about encryption and other stuffs with Bittorrent and this will be explained! I read some articles " How To Encrypt BitTorrent Traffic ", " BitTorrent Encryption Confuses the BPI, ISPs and Journalists Who Don’t Research ", and " BitTorrent Encryption Myths " and learned that encryption doesn't do anything about hiding user's end information or even ...

Removing of Multiple Files with Exception Using "rm" command in Linux

Now I get into this point. I remember I did some simple command, back then, by using " rm " command in Linux. Try searching in the net but none of it provides me the answer. The goal was that, I have a directory named, "reports" with lots of files/directories/sub-directories inside it, and try to delete all of them but with exclusion of the files that starts with the word "report-" (ex. report-2009-10-19.html). I thought the command issued in my shell $> rm -rf $(ls reports/|grep -e '[^report-*]') would enable me to delete the files but it seems it doesn't work. My expectation was the files that does not start with "reports" word will be deleted. Then I read the manual of rm ("man rm" in bash), I found that the -v would select those non-matching lines. Now, issuing the commands in my shell $> cd reports $> rm -rf $(ls .|grep -v '[report-*]') enables me to delete the files that starts with the word "r...

Connecting Samba 3 from Linux to Mac OS X Leopard

I'm so befuddled yesterday until I figured it out that it works from Mac OS X to Mac OS X Leopard with Samba 3. I thought my smb.conf doesn't work. Now, Linux to Mac OS X was hard because I thought, I must ran smbpasswd to provide password for the username I have to used. I was thinking that Mac OS X's Samba configuration directs the use to able to check on the user's of the machine with it's account information (username and password of the Mac OS X Leopard machine). It does able me to authenticate and access my folder via that Mac OS X machine. I found this article also, seems we have the same issue faced. http://discussions.apple.com/thread.jspa?threadID=2086667

delete multiple files/directory with exclusion

I have multiple files in a directory and I was logged in thru my bash shell. Then I just issue the command below. rm -rf $(ls|grep -E '[^(^ext$)|(mootools)]') grep -E will execute an extended regular expression so ext and mootools will be retain or excluded upon deletion of files in the current directory.

eavesdropping in ssh

This happens when we are switching from old server to another server and assigned a different IP address from the specific domain name. bash-3.1$ ssh myname@example.com @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: POSSIBLE DNS SPOOFING DETECTED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ The RSA host key for example.com has changed, and the key for the according IP address 198.2.1.1 is unchanged. This could either mean that DNS SPOOFING is happening or the IP address for the host and its host key have changed at the same time. Offending key for IP in /home/myname/.ssh/known_hosts:16 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that the RSA host ke...

find and perl as alternative for sed

In continuation of my migration, some directories with HTML contents their are manually inputted by strings that would let a typical user to edit manually all the HTML files for just a sake of changing a text. However, Perl as an alternative for sed is quite helpful. The command goes like this: perl -e "s/www\.hawaiifsbos\.com/test\.hawaiifsbos\.com/g;" -pi $(find . -type f) -p = will do a loop sequence. For more info, read the page in " Using the -n and -p option " -i = will modify file in-place. providing after the "i" letter with a word, will be used as a back-up suffix of a file. (Ex. -pi.bak) -e = means execute This is the same thing as find . -name "*.*" -type f -exec sed -i 's/www.mysite.com/test.mysite.com/g' {} \; The above works in my Slack, but it seems weird it doesn't do in FreeBSD, but the perl is there as my alternative.

rsync: avoid overwriting of files

I was migrating this stuffs we have from an old FreeBSD 4.0 Server to a new FreeBSD 6.0 Server hosted at Verio. I was fumbled and tumbled when I use this rsync tool by migrating the files to our new server. The situation is that, in every directories we have being assigned in a virtual host and its DocumentRoot are having different owners and group assigned. The old server we have is having a version of an old Apache . Now, in order to achieve the exact ruling or permission, rsync is a tool that enables you to preserve ownership as well as its permission of the files/directories that you're going to copy--or shall we use the term "migrate". My mistake was that, migrating with files using rsync is a little bit tricky. Ending a copy like this, for example: rsync -r -e "ssh -l ahkmed" localhost:/home/ahkmed/documents /www/documents is a different story than rsync -r -e "ssh -l ahkmed" localhost:/home/ahkmed/documents/ /www/documents Note the ending has s...