Simple Binary  

Monday, September 29, 2008

The reader is expected to have read the first part of this tutorial which deals
with sequential files. You can still follow this tutorial without reading Part-I,
but I recommend reading the sequential files tutorial first because I may have mentioned certain things in Part-I which also apply to Binary Files.

As far as Visual Basic 6 is concerned, there are three modes in which a file can
be accessed.

1. Text Mode (Sequential Mode)
2. Binary Mode
3. Random Access Mode

In the Text Mode, data is ALWAYS written and retrieved as CHARACTERS.
Hence, any number written in this mode will result in the ASCII Value of the
number being stored.
For Example, The Number 17 is stored as two separate characters "1" and "7".
Which means that 17 is stored as [ 49 55 ] and not as [ 17 ].

In the Binary Mode, everything is written and retrieved as a Number.
Hence, The Number 17 Will be stored as [ 17 ] in this mode and
characters will be represented by their ASCII Value as always.

One major difference between Text Files and Binary Files is that Text Files
support Sequential Reading and Writing. This means that we cannot read or write
from a particular point in a file. The only way of doing this is to read through
all the other entries until you reach the point where you want to 'actually'
start reading.

Binary Mode allows us to write and read anywhere in the file. For example we can
read data directly from the 56th Byte of the file, instead of reading all the
bytes one by one till we reach the 56th byte.

Part-I dealt with Sequential Files, and this one will teach you how to read and
write files in Binary Mode.

You will often come across the terms "Text Files", "Sequential Files",
"Sequential Mode", "Binary Mode" and "Binary Files" while reading books,
articles or even posts on the internet related to file handling and wonder what
they really mean.

A file is a set of bytes/records stored together.

Text Files are files which contain only characters in ASCII or Unicode.

Sequential Files are files opened in Sequential Mode.

Sequential Mode refers to any of the modes used for sequential file handling
which are Input, Output and Append.

Binary Mode refers to the Binary Mode [which you shall learn about as you
progress through this tutorial]

Binary Files refer to files opened in Binary Mode.

You should note that Binary Files and Sequential Files are not different kinds
of files but rather different methods of accessing a file.

Any file can be opened in both sequential and binary modes (obviously not at the
same time wink2.gif ). If it is opened in sequential mode, you will only be able to
access data in the file sequentially. If it's opened in Binary mode, you can
access any byte in the file without reading the previous bytes in the file.

example :

1. Add a Command Button with name as Command1 onto a Form
2. Private Sub Command1_Click()
3. Dim f As Long
4. f = FreeFile()
5.
6. Open "c:\test.txt" For Binary As #f
7. Close #f
8. End Sub

view plainprint?

1. 'Add a Command Button with name as Command1 onto a Form
2. Private Sub Command1_Click()
3. Dim f As Long
4. f = FreeFile()
5.
6. Open "c:\test.txt" For Binary As #f
7. Close #f
8. End Sub

As you can see, the FreeFile() function can also be used for binary files.
The Open Statement opens c:\test.txt in Binary Mode and the next statement
closes the file.

As obvious as it may sound, you need to open a file before using it and close it
when you have finished reading or writing to it. Many programmers forget to add
the Close statement which results in the File Already Open Error, and it can be
a pain to track down the exact location that caused the error when you're
dealing with many files.

You should note that this snippet does more than open and close a file.
If the test.txt file is not present in C drive, then it creates a blank file
with the same name.

AddThis Social Bookmark Button

Hacking Yahoo, Hotmail, Lycos...  

Monday, September 8, 2008

Computer Hackers nowadays offers different services - and the most widely offered is to crack into email passwords such as Yahoo, Hotmail, Gmail, AOL, Lycos and so on. Some are really good but most are just scams.

The most common and successful method is achieved with the use of keyloggers to record any email passwords and computer surveillance software. 100 percent sure, makers of this application often called it that way, not a "hacking program."

Recently, forums are flooded with different offers from so called email hackers. Are you sure they are really hackers and have success on the task you will be giving them?



Beware of Scams
Step-by-step Yahoo hacking!!! So many have been victimized by this, sending their passwords and hoping that they can retrieved a targeted account by following these:

It goes this way:
Log in to your own yahoo account. Compose an e-mail to: recoversecretcode@yahoo.com. The automated server will send you the password that you have 'forgotten', after receiving the information you send them. STEP 3- In the subject line type exactly: password retrieve...etc, etc...


Don't fall into this. It's a real scam. The only way to recover your password is going to your email account, check for" forgot="" password="" and="" will="" ask="" you="" for="" authentication="" before="" it="" resets="" your="">

In Yahoo for example, it will prompt for "secret questions" which you have filled during your sign-up. Thereafter the original passwords will be emailed to your alternate email account, which also you have provided during sign-up. It is very important to keep those "sign-up" information for your future use.

Scammers common trick is to ask users to send money before they start the process. Most of them are generating large amount of money with this, but no results or job is done in the end. You will end up a victim.

If there is a great need for you to retrieved someone's email password, there are some who can provide it for you, choose the best, someone who will send you proofs such as screenshots of inbox, sent items or address book before they ask for payment. Though, we never advise you to resort into this, it is still invading others privacy no matter how you accomplished it.

AddThis Social Bookmark Button

Design by Amanda @ Blogger Buster