Hacking: How to Make Your Own Keylogger in C++ Programming Language by Alan T. Norman

Hacking: How to Make Your Own Keylogger in C++ Programming Language by Alan T. Norman

Author:Alan T. Norman
Language: eng
Format: azw3, epub
Published: 2017-02-24T08:00:00+00:00


Just so we know, the little figure above was just written to introduce a new variable type, which we will definitely use later on. The variable type is char. This variable type holds characters such as a dollar sign, a single letter like the one on Line 13 above etc. It is usually utilized with single quotation marks.

Finally, let us go into pointers and files, after which we will start writing our codes for a Keylogger.

Pointers and Files

Pointers:

Basically, a pointer in not just C++ but in other programming languages is used in showing the memory locations of variables. Let us analyze the little program above to help us understand how pointers are used.

Codes from Line 1 to 6 serve the same purpose they have always served in previous codes we have written. A variable num of type int is declared on Line 9. Since a pointer discloses the memory location of a variable, there has to be a variable whose location declared. On Line 10, the pointer is declared. This is done by using a variable type, same as that of the variable, whose location is to be established, followed by an asterisk and finally the name of the pointer. The pointer can have any name, ptr was used in above program.

Now, one Line 9, the pointer is told to point to the variable num. This is done by typing the name of the pointer (ptr) and equating it to an ampersand sign (&) and the variable name (num) with no space in-between. On line 13, a COut statement is written to output num (which we set earlier to a value of 10) and ptr, which will display the memory location of num. As seen in the figure above, on running the code, it displays the value contained in num (10) together with the memory location of the variable (0x28ff18).

Note that on Line 13, if we wanted the pointer to print to console the value contained in the variable, we could simply have put an asterisk before ptr as shown in the figure below.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Popular ebooks
Deep Learning with Python by François Chollet(12568)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7778)
Grails in Action by Glen Smith Peter Ledbrook(7696)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6413)
Kotlin in Action by Dmitry Jemerov(5062)
WordPress Plugin Development Cookbook by Yannick Lefebvre(3784)
Mastering Azure Security by Mustafa Toroman and Tom Janetscheck(3327)
Learning React: Functional Web Development with React and Redux by Banks Alex & Porcello Eve(3085)
Mastering Bitcoin: Programming the Open Blockchain by Andreas M. Antonopoulos(2867)
The Art Of Deception by Kevin Mitnick(2604)
Drugs Unlimited by Mike Power(2467)
Kali Linux - An Ethical Hacker's Cookbook: End-to-end penetration testing solutions by Sharma Himanshu(2311)
The Innovators: How a Group of Hackers, Geniuses, and Geeks Created the Digital Revolution by Walter Isaacson(2297)
Writing for the Web: Creating Compelling Web Content Using Words, Pictures and Sound (Eva Spring's Library) by Lynda Felder(2261)
SEO 2018: Learn search engine optimization with smart internet marketing strategies by Adam Clarke(2190)
A Blueprint for Production-Ready Web Applications: Leverage industry best practices to create complete web apps with Python, TypeScript, and AWS by Dr. Philip Jones(2141)
JavaScript by Example by S Dani Akash(2135)
DarkMarket by Misha Glenny(2083)
Wireless Hacking 101 by Karina Astudillo(2075)
Full-Stack React Projects by Shama Hoque(1990)