Install mongoDB on a Mac!

mongoDB on a Mac

MongoDB is a NoSQL database, free of charge. The beauty of mongo relies on its schema-less design… you can add and remove fields, without doing ‘alter table’.

Your information gets stored in JSON, which is  seriously interesting, specially if you work with iOS / Android Apps, and the communications layer works in json.

So.. fire up a browser, and head to this urls. Assuming you’re running OSX (like me!), you’d need the mac binary, which is about 60 megabytes.

Preferrably, you’ll need to download the 64 bits executable. The 32 bits version can address only databases up to 2 gigabytes.

Once you’ve got the file, simply double click on it, to get it uncompressed. Assuming that the file is in the downloads folder, let’s move it to a more suitable location.

Launch terminal, and type the following:

[cc lang=”bash”]
sudo
cd ~/Downloads/
sudo mv mongodb /usr/local/mongodb
[/cc]

Mongo stores its databases in the “/data/db” directory, so… we’d need to create them:

[cc lang=”bash”]
mkdir /data
mkdir /data/db
chmod 777 /data/db
[/cc]

Now, let’s add a couple symbolic links, so you can launch mongo from anywhere in the system:

[cc lang=”bash”]
cd /usr/local/bin
ln /usr/local/mongodb/bin/mongod
[/cc]

That’s it! you’ve just installed mongo!. In order to launch the database, you simply need to type the ‘mongodb’ command.

If you wanna launch a command-line client, type ‘mongo’, which should connect to the server, right away.

Top 5 iPhone Games

Do you usually spend time waiting for a bus… without anything to do?. And how about when there is nothing on TV? what do you do?. Or… say… you’ve just finished that book you’ve been reading for months, and you have no clue what to do with your spare time!.

If you answer ‘yes’ to any of the above questions, then this short list of Top 5 iPhone Games is just for you!.

Fix It Felix Junior, the game!
Fix-It Felix Jr.
I fell in love with this title. It’s a simple old-shool videogame, in which you need to fix the building, while Wreck-It Ralph breaks everything. It took me about 5 minutes to get used to the onscreen controls… you should give it a shot!.

 

 

Grand Theft Auto for iPhone
Grand Theft Auto, Vice CIty
Ahhh… who didn’t get to play GTA 1 on an old Pentium PC?. And how about GTA 2?. Well… guess what… GTA has reincarnated as an iOS videogame. It’s about 4.99 dollars, but it’s worth every penny. Most definitely!

 

 

Talking Carl for iOS
Talking Carl
What can i say about this…. Red, as i call it, is my friend. He’s not smart as Siri, so.. he will just repeat whatever you say. But it’s really fun… and kids do love him. Download it, and tickle him. It’s worth it!

 

 

Tesla Toy iPhone Game
Tesla Toy
Do you own a Tesla Coil?. Me neither. But i do have an app that looks the same way, so to speak. This app emulates the behavior of a Tesla Coil. You should see it running on an iPad, it’s pure eye candy.

 

 

Talking Ted iOS Game
Talking Ted (Lite!)
This app doesn’t compete with Talking Carl, since Ted doesn’t repeat whatever you say. However, since Ted is a talking bear, this app has a couple recordings of the toy, doing several things (such as drinking alcohol). The lite version is free.. so… give it a shot!

 

 

Do Macs need Antivirus?. Yeah, they do!

MacbookProSo… you own an iMac.. maybe a Macbook Pro, or maybe you’re one of the lucky owners of a Mac Pro. You’ve been watching ads for the last ten years… you bought it all, and you feel safe just because it’s not a windows… right?.

Well… things are not the way they were a couple years ago. As Apple gained more and more marketshare, virus developers turned their eyes on our belived OSX system. Since Java virtual machine has been found to be buggy… several viruses that affected Mac have been caught in the wild.

What can we do?. Well.. there are a couple things you could do….

1. Enable Mac Gatekeeper

What is the Mac Gatekeeper?. Well, the concept is simple. We just close the door to malicious software, by only installing software from trusted sources. Ever wondered why there are no viruses for iPhone?. Well… it’s because iOS ecosystem is a walled garden. By enabling the Gatekeeper, you’d be replicating the same safe environment as iOS has.

In order to enable the GateKeeper, you need to go to “System Preferences >> Security & Privacy” (in Mountain Lion). You will get this screen:

Screen Shot 2013-01-23 at 11.36.08 PM

See where it says ‘Allow applications downloaded from’?. Make sure you check ‘Mac App Store’ (or Mac App Store + identified devs). ‘Anywhere’ is not recommended.

That way you’re computer will install software ONLY from trusted sources.

2. Install Mac Antivirus Software

Yes… installing an antivirus will impact, slightly, on your performance. But at the very least, you’ll get to feel safe again. It’s just a feeling, bear that in mind, always!.

What antivirus software can you use?. Well, you could try AVG for Mac (which is free!), ESET for Mac (paid, but one of the best), and Norton Antivirus for Mac.

3. Install a Firewall

One of the things that make me freak out the most… is not knowing what applications are openning connections with remote servers. So… if you’re paranoid like me, you could simply install a firewall, and validate, process by process, if they really need to access internet.

Hopefully, with this extra software you’ll be able to stay away from trouble. Again… hopefully!.

Bruteforcing Http Auth on OSX

password-cracking

Suppose you forgot the password of your router. What can you do?…. should you just reset the device?.
Nahhhh…. that’s boring. That’s why we’re gonna try to bruteforce http basic authentication.

We’re assuming that you run some incarnation of OSX, and you have Mac Ports installed. Right?.
We’ll need to download hydra… a bruteforce tool… so… fire up a terminal, and type the following:

[cc lang=”bash”]sudo port install hydra[/cc]

So far so good. Now, we’re gonna need to create our own password list. In order to do so, we’ll rely on crunch. It’s a nice shell tool, that builds on OSX as well. Download it here first. If you get any troubles building it, try typing:

[cc lang=”bash”]gcc crunch.c -o crunch[/cc]

For some reason, the makefile isn’t working… so i just built it right away with gcc.

Allright! we’ve got all what we need. Now, let’s suppose we wanna generate passwords with 5 characters length, including lowercase, uppercase and numbers. So… we should fire up our terminal, and type this:

[code]./crunch 5 5 -f charset.lst mixalpha-numeric -o wordlist.txt[/code]

Beware. That will take about 5 GB of space of your storage. Okay, okay. We’re almost there. Now, it’s time to try hydra. Try the following syntax:

[cc lang=”bash”]hydra -l admin -P wordlist.txt -vV -s 80 HOSTNAME http-get /[/cc]

Of course. We need the username, in this example we assume it’s ‘admin’. And we also assume that we’re hitting port 80.
Good luck!

Running airmon-ng in mountain lion!

aircrack-ngFor those of you who have no clue what is all of this about, Aircrack-ng is a command line tool that allows you to bruteforce WEP and WPA wi-fi password protections.

WEP being the easiest protection to break, and WPA the hardest. The difference?. WEP can be broken in… two days, give or take (probably less than that), while WPA could take months… without results!. Personally, everytime i needed to break a WEP protection, i had to boot a linux system. If you’re like me, and you’d rather staying in OSX, this is juuuuust for you.

I don’t wanna forget about this, so i’m writing this short guide, right here!

  1. Install Macports.
  2. Install aircrack-ng:[cc lang=”bash”]sudo port install aircrack-ng[/cc]
  3. Install the latest Xcode, with the Command Line Tools.
  4. Create the following symlink:[cc lang=”bash”]sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport[/cc]
  5. Figure out which channel you need to sniff:[cc lang=”bash”]sudo airport -s[/cc]
  6. Open up a terminal and type:[cc lang=”bash”]sudo airport en1 sniff [CHANNEL][/cc]
  7. Open up a seecond terminal and type:[cc lang=”bash”]aircrack-ng -1 -a 1 -b [TARGET_MAC_ADDRESS] [CAP_FILE][/cc]

Notes: the cap_file will be located in the /tmp/airportSniff*.cap.
Nice, right?

===========================
Update:

I’ve been having issues while trying to crack a WEP key. I had over 100k IV’s… without luck. So i’ve attepted to crack the key with the KoreK algorithm (coded in aircrack-ng). And guess what!! i got the key!!. If you ever have the same problem, try this:

[cc lang=”bash”]aircrack-ng -K -a 1 -b [TARGET_MAC_ADDRESS] [CAP_FILE][/cc]