Archive for the ‘Windows’ Category

h1

Fixing OpenCV and Dev-C++ linking problems

October 15, 2010

I’m trying these days OpenCV libraries and I got some annoying errors when I tried to compile. The debug window shows something like this:

g++.exe -c main.cpp -o main.o -I”lib/gcc/mingw32/3.4.2/include”  -I”include/c++/3.4.2/backward”  -I”include/c++/3.4.2/mingw32″  -I”include/c++/3.4.2″  -I”include”  -I”C:/OpenCV/include/opencv”

In file included from C:/OpenCV/include/opencv/cxcore.hpp:2243,
from C:/OpenCV/include/opencv/cxcore.h:2123,

from C:/OpenCV/include/opencv/cv.h:58,
from main.cpp:3:
C:/OpenCV/include/opencv/cxoperations.hpp: In member function `void cv::Ptr<_Tp>::addref()’:

After searching about on the internet I’ve found the solution. Just open the file C:\OpenCV2.0\include\opencv\cxoperations.cpp and change the line 68 with this:

#if __GNUC__ >= 4 || __MINGW32__
Now it worked for me and I can compile .cpp files with OpenCV functions.

 

h1

RSA2/DSA key access from PuTTY to a *NIX OpenSSH server

May 1, 2009

If you want to access to your *NIX server using PuTTY in Windows, you just should follow the next steps to create a secure access using RSA/DSA public key infrastructure.

1) The first thing is configuring our openSSH server in the “/etc/ssh/sshd_config” file and modifying some configuration fields

  • Protocol 2
  • RSAAuthentication yes
  • PubkeyAuthentication yes
  • AuthorizedKeysFile      %h/.ssh/authorized_keys

Reload the ssh daemon. /etc/init.d/ssh reload

2) Get the PuTTY Key Generator (Just typing it in google) and generate a RSA2/DSA public and private keys. Save them in a folder, and copy the text with Ctrl+C or in a file. This is your public key in openSSH format (The format which uses the ssh daemon)

It would be a good idea protect our private key with a passphrase, at least, if we’ll use the remote access in a public place like an office. Maybe you must try PuTTY PageAgent to manage your keys, but this is another bussiness 😛

3) Paste the text in your server in you “$home/.ssh/authorized_keys” of the user that you want to authenticate with RSA/DSA. (I suppose that “public_key” file contains the text generated by PuTTY)

  • cat public_key >>$home/.ssh/authorized_keys

4) Now, just open PuTTY and load your private key

5) Just login in the server as usual, and you should be logged in without typing your password. You must be type the keyphrase if you had set it in the  2nd step.

Regards, and be careful with your private key file 😎

h1

Windows XP and WPA2 wireless cipher

December 19, 2007

Finally, i’ve installed DD-WRT in my Fonera :D. After this, i put a WPA2-AES key, but i tried to connect through a Windows XP (SP2) computer and i couldn’t connect!!!

After a google searchs, i found some information about the issue.Basically Windows XP need a patch to support the IEEE 802.11i which had the WPA2 instructions…

Just install it, and reboot your system.

Patch for Wi-Fi Protected Access 2 (WPA2) on Windows XP

Remember, you must get the patch in your OS language o it will not work.

h1

Downloading a entire web site

October 9, 2007

If we need to save a entire website in our drive, we can choose some applications like:

*–level=3 means that 3 sub-levels of the web will be downloaded.

h1

Recovering Unix files in Windows

July 14, 2007

If we’ve a hard drive with some windows and Linux partitions, and we’re running on Windows OS, perhaps we want accede to one Linux partition to recover some data. Don’t worry, that it’s very easy.

Depending on the type of partition we’ve, we must use one of this programs.

  •   Partition: EXT2: R-Linux
  •   Partition: ReiserFS : RSTools
  •   Partition: EXT2, EXT3, ReiserFS: LSTools

Obvious, the last supports all usual Linux partitions. To use this, you can manage it from
a command terminal, but if you hate that,  you could use a GUI, based on Java or .NET. Just install one and follow the user manual.

Also you could manage it from your web browse, probably, the quick and effective form.

h1

How to use “runas” utility

June 23, 2007

Much people use an administrator account everyday… but they probably dont know, that it is a dangerous use in our system For example, some sypware, trojans and “bad software” uses administrator privileges to have access to the internal Windows system files. Okey, we’ve the solution to this. You must use your system running as a limited user, and using “runas” command to install and manage applications.

But, What is “runas”? Is a Windows utility which allows run a program using the rights of other system user, like administrator.

I’ll show here, a examples of use of runas command.

If we want to execute an application or install it, we must type this:

runas /user:[admin_account] [app_dir]

For example, if we want install a program wich installer is on a “C:\myApp\” directory and our administrator user is called “MeAdmin”we must type this:

runas /user:MeAdmin C:\myApp\install.exe

Before this, we will type the administrator password, and the setup will run with administrator privileges.

I you need for example, use de MMC console, you can run as administrator too

runas /user:administrator mmc.exe

And my favourite trick, consists in obtain a CMD of the admin user, which we will be able have total access to our system with all privileges. In this command, i included the computer name. This is very important if we’re using a Workgroup.

runas /user:MyComputer\administrator cmd.exe

All this command looks good… but, some people hates command terminals like CMD (MS-DOS), *NIX shell, etc. Don’t worry, we can launch applications using “runas” from our desktop. Just do right clickwhile you’re pressing shift over the executable you choose, and select “Run as…” option. A window like this (i’m using a Spanish Windows XP) will be open:

 

 

Type the administrator (Or another account with admin privileges) and click Accept.

 

h1

Changing an account password [Win]

June 23, 2007

Open a command terminal (go to Start -> execute and type cmd.exe).

Now, in the terminal type:

net user [account_name] *

Now the system will ask about the new password. To do this, you need administrative privilegies.