Tag Archives: macos

Configure Cisco switch from Mac OS X through console port

Recently, I was searching for rollover cable that use to connect your PC/laptop to your switch via console port. It took me for a while searching this kind of cable in Low Yat Plaza, KL. Here, you can find variety of electronics stuff from PC hardware to servers stuffs.

But, it was hard for me to find this cable. After several visit to Low Yat, I managed to find the cable together with DB9 to USB converter. As you know, the rollover cable is using serial to ethernet cable. So, this post will guide you on how to install the driver and connect your rollover cable to your switch from Mac OS X.

So, for the first step, you should have rollover cable that looks like this:

Rollover to DB9/serial cable

Rollover to DB9/serial cable

And the DB9 to USB 2.0 converter. The one that I’m using is like this:

For my Mac OS X version, I’m using Mac OS X Yosemite 10.10.5 on MacBook Pro (13-inch, Early 2011). You’ll need the driver for the cables that you can download at here:

After you’ve done downloading and extracting the driver, just click at .pkg file and proceed to install the driver. Reminder, make sure you restarted you machine after installing the driver in order for system to take effect:

DB9 to USB Converter driver

DB9 to USB Converter driver

Then, connect/plug-in the rollover cable to DB9 to USB converter. Then connect the converter USB to you Mac. After all has been connected, click on Apple logo on top left menu bar, click About This Mac, on Overview tabs, click System Report. Ensure that you DB9 converter is connected:

Mac OS X System Info

Mac OS X System Info

After restart, you can verify if the driver has successfully installed and loaded to the system by using this command:


Now finally, you need an application which will talk to the serial port. We’ll using Terminal app on Mac OS X. On Mac, the file which maps to the port is /dev/cu.usbserial. Once all the cable has been connected, run this command to start connecting to you switch:

Flatten a Nested Directory & File Hierarchy from Command Line of OS X

Lets say you have this kind of file/folder structure:

You can take all the *.jpg file or any file type, and move it into one folder.
Here are the command to use:

Installing bulk_extractor on Mac OS X

All reference is taken at here: https://github.com/simsong/bulk_extractor/wiki/Installing-bulk_extractor

bulk_extractor is a computer forensics tool that scans a disk image, a file, or a directory of files and extracts useful information without parsing the file system or file system structures. The results can be easily inspected, parsed, or processed with automated tools.

To install bulk_extractor, first install required library via Macports:

All install dev library:

Download libewf source code:

Then install libewf from source (because libewf via ports too old):

Setting locale failed on Mac OS X Mavericks

If you using Mac OS X (in my case, I’m using Mavericks), during SSH session, you may see this kind of error in your terminal:

To solve this, edit .bash_profile file in your host/local machine

and add this line:

CREDIT TO : Agile Faqs

Maltrieve on Mac OS X

Maltrieve originated as a fork of mwcrawler. It retrieves malware directly from the sources as listed at a number of sites, including:

  • Malc0de
  • Malware Black List
  • Malware Domain List
  • VX Vault
  • URLqery
  • CleanMX
  • .

    If you want to install maltrieve on your Mac OS X, below is the steps to install it.

    • First, install beautifulsoup4 via pip

    • Install required dependencies via apt-get

    • Download maltrieve from github

    Done. Now you can use the Maltrieve on your Mac OS X.

    How to install Volatility on Mac OS X Mavericks (10.9.2)


    Install Xcode
    Command Line Tools in the ‘Components’ tab.

    Installing Homebrew

    Installing XQuartz:
    Download installer from http://xquartz.macosforge.org/landing/
    Install using the installer.

    Installing Wine with Homebrew

    Note: Keeping Wine up-to-date:

    Installing Wget with Homebrew

    Installing pcre with Homebrew

    Installing pip

    Recommended packages

    Note: Change ownership of ‘opt’ directory to your user account:

    Installing Distorm3

    Installing Yara

    Installing Yara-Python

    Test by running python shell:

    Installing PyCrypto

    Installing PIL – Python Imaging Library

    Installing OpenPyxl

    Installing Graphviz

    Download: www.graphviz.org/pub/graphviz/stable/macos/mountainlion/graphviz-2.32.0.pkg
    Install Graphviz using the installer.

    Optional packages

    Installing pytz

    Installing Anaconda:

    Installing IPython:

    Installing pyxpress:

    Installing libforensic1394:

    Download: www.cmake.org/files/v2.8/cmake-

    Install CMake:

    Installing Sysinternals Strings:


    Installing Volatility 2.3_beta

    How to install Volatility on Mac OS X (Version 10.8.4)

    Remove .svn folder from Github repo

    For those who are using Github services, and pushing their code via terminal, you may encounter this problem where you will see a folder named .svn on each folder of your code.

    So if you want to delete this folder, follow this step below:

    First, pull your code from Github to your computer:

    Then, use this command to find folder .svn and delete it:

    Last, push your code back to Github server:

    ODROID U2 – Flashing Images on Mac OS X

    1. Download the image of the OS you want to boot on your ODROID to the local disk of your Mac

    2. If the Image is compressed, unpack it (if it is in ‘.xz’ format you need a tool like The Unarchiver to be able to unpack it)

    3. Insert your SD card and check the currently mounted filesystems

    *Note the name of the filesystem that Mac OS X assigned to the mounted SD card (in my case /dev/disk2s1)

    1. Unmount that filesystem so that you will be allowed to overwrite the disk:

    1. Using the device name of the filesystem work out the raw device name for the entire SD card, by omitting the final “s1” and replacing “disk” with “rdisk” (Important: you will lose all data on the hard drive on your computer if you get the wrong device name). Make sure the device name is the name of the whole SD card as described above, not just a partition of it (for example, rdisk3, not rdisk3s1. Similarly you might have another SD drive name/number like rdisk2 or rdisk4, etc. — recheck by using the df -h command both before & after you insert your SD card reader into your Mac if you have any doubts!):
      In my case, since the device name of the mounted filesystem is /dev/disk2s1 the entire SD card has the device name /dev/rdisk2

    2. Write the image to the card with the dd command, using the raw disk device name from above (read carefully the above step, to be sure you use the correct rdisk# here!)

    *(note that dd will not output any information until there is an error or it is finished)

    1. When dd finished successfully it will display some information and the SD card will be re-mounted. You can now eject the card:

    1. Remove the SD card from the card reader and put it in the ODROID to boot your new OS image

    Mac OS X – Can’t locate Switch.pm

    Recently, I want to run some script using Perl. But I encountered this:

    Can’t locate Switch.pm in @INC (@INC contains: /Library/Perl/5.16/darwin-thread-multi-2level /Library/Perl/5.16 /Network/Library/Perl/5.16/darwin-thread-multi-2level /Network/Library/Perl/5.16 /Library/Perl/Updates/5.16.2 /System/Library/Perl/5.16/darwin-thread-multi-2level /System/Library/Perl/5.16 /System/Library/Perl/Extras/5.16/darwin-thread-multi-2level /System/Library/Perl/Extras/5.16 .)

    So, the solution is:

    evasi0n7 can’t be opened because it is from an unidentified developer

    Maybe you have heard about the new iOS 7.x jailbreak that has been released to public recently. Some people maybe are getting an error on their Mac OS X saying that: “evasi0n 7” can’t be opened because it is from an unidentified developer

    evasion 7 problem

    evasion 7 problem

    Well, that’s pretty bad. But, we have the solution! 🙂

    You can fix the error by navigating to System Preferences. Then go to Security and Privacy. On tab General, check on Anywhere from the “Allow apps downloaded from”.

    Please ensure that you click on the lock symbol below before making any changes so that you’re allow to do the changes. You’re required to enter your password to allow changes.