How to view documents using Visual Studio

View documents in Visual Studio with an amazing tool

Xpath Axes

A very useful trick for automation

Review: Spire.DataExport for .NET

A great tool for exporting data in .NET

How to install Arch Linux, step by step, for VMware Workstation (Part I)

First part of a installation tutorial for this beloved OS

How to setup a local repository in Ubuntu

The steps to have a local repo in Ubuntu

Thursday, March 28, 2013

Develop in C# in Ubuntu


submit to reddit
Just a simple tip: How to develop in C# in Ubuntu. As most of you already know, C# is a powerful programming language, very easy to learn. Also, a lot of business nowadays use this language; so, it is convenient to know how to work with it. Although C# is developed by Microsoft, there is way to program with it in Ubuntu: MonoDevelop.

I saw a lot of tutorials in internet to install MonoDevelop, but I found it quite easy.  Just follow the instructions of the video (it only 1:16):


I hope I help some people with this! HyperSmash.com

Wednesday, March 27, 2013

Work on documents in cloud (iPad, iPhone, iPod)

submit to reddit
If you have an iDevice, it probable that you try to do everything with it. That's my case. Since I got an iPad, I tried to play, work, write, blog, take pictures and a lot of other things. Apple devices are great if you know how to make the most of them. So, I'm going to show you how to work with your documents in the cloud. By "working" I mean edit, create, erase and anything you can think of, with your documents. Let's begin.

Cloud options

I won't write about which clouding service is the best. I'll just show you my experiences using different clouding services. And I'll tell you what was the best for me.

Dropbox


Maybe one of the best clouding services. Loved by thousands of people, this is a good choice if you want to have some files stored in the cloud. If you want to try it, you can download it here.


The only problem I found with this service is the lack of the webDAV capability. Without this, you can´t sync your documents with Pages, Keynote and Numbers, excellent apps by Apple. Nevertheless, you can pay for a solution here.

Here's an example of the use of DocsToGo with Dropbox:


Get Dropbox here (App Store).
Get DocsToGo here (App Store).


Box.com

Box.com is a complete solution for clouding. Actually, this is the service I'm using now. There is a reason for this: webDAV. At first, I found a lot of wrong answers about this in internet, but after trying it myself, it's official: Box.com supports webDAV. In order to sync your documents from Pages, Keynote or Numbers, just follow these steps.

1. Open a Box.com account here.

2. Open Pages (just an example). Create a new document. Try this with Pages, Keynote or Numbers.

3. Choose a template for the document. I'll use a Blank template.


4. Write anything in the document and press on the tool icon in the upper right part of the screen.

5. Tap on Share and Print.


6. Tap on Copy to WebDAV

7.

7.1 In server address, enter: https://www.box.com/dav
7.2 In User Name enter your Box.com user name.
7.3 In Password, enter your Box.com password.
7.4 Tap on Sign in


8. Choose the document format


9. Choose a folder where to save your document.
10. Tap on Copy. With this, you have copied your document to your Box.com account.


To open documents from your account, do this:

1. Tap on the + symbol.
2. Tap on "Copy from WebDAV".
3. Select the folder and the document to open it. Just like that.

The only problem I found using Box.com is that it doesn't support Linux. I know it won't be a problem for most of you, but I always encourage people to use Linux, which I think is a great OS (specially Ubuntu).

As you can see, Box.com is currently the best option. I chose it thinking on the economy of the users and flexibility. That's why I didn't mention services like Skydrive (it is not too flexible), iCloud (it is not very useful if you don't have a Mac) or even Ubuntu One (least flexible of all). I hope this is useful for you.

Tuesday, March 26, 2013

Virtual disks for Windows 8

submit to reddit
Now we're going to see how to create virtual disks in Windows 8. Yes, it's easy!

Requirements:
  • A Windows 8 machine.
You can test this with virtual machines if you want. You can use VMware Workstation.

Steps:

1. In the Windows desktop, press Windows+R.
2. Type cmd and press Enter.
3. Type the following commands:

diskpart --> Press Enter. Press Yes in the "User Account Control" dialog.
create vdisk file= c:\[detination path] maximum [size of virtual disk in MB] type=expandable --> Press Enter. In my case, I typed:

create vdisk file= c:\testools.vhd maximum 10000 type=expandable

That command will create a virtual disk named "testools.vhd" located in the C drive, with a size of 10000 MB (almost 10 GB). 

Once you do that, you can check the virtual disk file in the destination file you selected. In my case, the Virtual disk is located in the C drive:


4. Initiate the disk. If you double clicked the created disk, you may have noticed that an error message is displayed:

This happens because the virtual disk must be initialized, just like a real disk. To do that:

4.1 Open the File Explorer:
4.2 Right click Computer>Manage
4.3 Expand Storage>Highlight Disk Management
4.4 Press OK in the "Initialize Disk" dialog.


5. Right click on the unallocated partition>New Simple Volume...

6. Complete the Wizard with Next, Next...and Finish.


Now, you can use the virtual disk. Take into account that you have to detach the disk first to erase the .vhd file (you can do it in Computer Management).

Sunday, March 24, 2013

Changing roles between Domain Controllers (Active Directory)

submit to reddit
When testing any program that works with Active Directory, sometimes it is useful to know how to transfer roles between Domain Controllers. The objective of this article is not to explain the roles themselves, but to show how to transfer them. The roles I´ll be using are:

Intersite Topology Generator (ISTG)
FSMO roles:

  • Schema Master
  • Domain naming Master
  • Infrastructure Master
  • Relative ID Master (RID Master)
  • PDC emulator

You can read about them here and here.

So, let´s see what is this all about.

Requirements (This requirements are just an example. The methods described here also apply to other environments):

A Windows Server 2008 machine holding a domain (if you don´t know how to set up an Active Directory domain, you can check this).

A Windows Server 2008 machine as a second Domain Controller.

Index:
    Transfer ISTG roles
    Transfer FSMO roles
To transfer the ISTG role:

1. Make sure that you have administrator privileges. Go to one of the Domain Controllers (DC) and go to Start>Run>Type ADSIEDIT.msc and press Enter.


2. Right click ADSI edit>Connect to...
3. In Connection Point, select "Select a well known Naming Context", and select "Configuration". Press Ok.


4. Expand "Configuration [main Domain Controller]">"CN=Configuration,DC=yourDomain,DC=com">"CN=Sites"
5. Highlight "CN=Your site´s name"


6. Righ click "CN=NTDS Site Settings">Properties


7. Go to InterSite TopologyGenerator. Select it and press Edit
8. You´ll see an String editor like this:


You can see which DC is currently holding the ISTG role in the String of the Editor. It has this format:

CN=NTDS Settings,CN=VTWK8ROLES01,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=jm,DC=com

As you can see, the second "CN" has the name of the main DC. So, to transfer the ISTG role, just change that part. As an example, I'm transferring the ISTG role to a computer named VTWk8ROLES02, so the string would go like this:

CN=NTDS Settings,CN=VTWK8ROLES02,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=jm,DC=com

Once you do it, press OK and then Apply. And that's it. You have manually transferred the ISTG role to another Domain Controller.

FSMO roles:

1. First of all, you can check which computer is holding which role with a command. Open a command line and type netdom query fsmo. Press Enter.


The result is a list of the roles with the computer that is holding them.

2. Open another command line and write:

ntdsutil --> Press Enter
roles --> Press Enter

connections --> Press Enter
connect to server [name of the server to which the role will be transfered] --> In this case, I worte: connect to server VTWK8ROLES02



quit --> Press Enter

Now, you could consult the Help command to know how to transfer roles. You have the following options:


For example, let's transfer the PDC role. Write: transfer PDC  and press Enter--> The following dialog will be displayed:


Press Yes and you have transferred the role. You can run netdom query fsmo to verify that the role has changed.


Good luck!!

Thursday, March 21, 2013

Vulnerability on WPA2 wifi networks


This tutorial shows a known vulnerability in a lot of Wifi routers. I wasn't able to secure my own Wifi network, so it's possible that you have the same problem with yours. I recommend to filter MAC addresses in order to protect your data from this.

Information presented here is for educational purposes only.
   
I highly recommend using a Virtual Machine to follow the steps presented here, because installing BackTrack just for a miserable wifi-crack is a little annoying. 

Requirements:

Backtrack installed as live CD, running.  Find the instructions for that here.

A proper wifi modem.  This is very important, because sometimes the built-in wifi receptor of some computers is not powerful enough to perform this trick.  Here’s a photo of my wifi receptor. 
I’m pretty sure you can get better hardware in your countries…and cheaper.  It's obvious, but you need to have it connected to the VM before you begin with the steps.  In the case you are using a Wifi receptor like mine, just click on the USB icon and click "Connect (Disconnect from the Host)".
A nearby WPA/WPA2 network with a good signal.  This crack doesn't work with a weak signal.  If you don’t have it, don’t waste your time.

Steps:

1. With Backtrack running, set you network interface to monitor mode.  To do this,  type the following commands:

iwconfig

This will show you the available interfaces.  The interface corresponding with your wifi receptor is generally wlan0.  I got the following result in my computer:
airmon-ng start <your interface>

This will put your device in monitor mode.  In my case, I wrote: airmon-ng start wlan0
It is very likely for you to have wlan0 as your interface as well.  After you type that, you'll get something like this:
As you can see in the picture, monitor mode is enabled on mon0.  So you'll have to use mon0 in the following steps.

2. Catch some wifi signals.  Type the following commands:

airodump-ng <monitor interface>

In my case, I typed airodump-ng mon0.  Now, wait for the list to be filled with some data from the nearby wifi networks.  In my house, I can get just some signals:
Once you see the network you want to hack, press Control+C.

3. Use reaver.  Now, let's hack this! Type:

reaver -i <monitor interface> -b <BSSID> -vv

As you can see, the BSSID is the first data corresponding to the first column you got with the last step.  In my case, I typed: reaver -i mon0 -b 54-E6-FC-F4-F1-60 -vv

4. Wait.  Now, you have to be patient and wait from 4 to 10 hours.  But don't worry.  In case you see several Timeout messages, the victim router may be off.  So, all you have to do is pressing Control+C, and your session will be saved.  The next time, you can continue by repeating all the process.  After you type the last line with reaver, you'll be asked if you want to continue from the last session.  Press Y and it will continue.  When the process reaches 100%, the screen will display something like this:
The value in WPA PSK is the password for the wifi network.  Enjoy!!!!!!!!! :D