-
What is Remote Code Execution?
What is Remote code execution (RCE)? A simple web search brings up a Wikipedia page on Arbitrary code execution (ACE). According to Wikipedia: In computer security, arbitrary code execution (ACE) is an attacker’s ability to execute arbitrary commands or code on a target machine or in a target process. An arbitrary code execution vulnerability is a security flaw in software or hardware allowing arbitrary code execution. A program that is designed to exploit such a vulnerability is called an arbitrary code execution exploit. The ability to trigger arbitrary code execution over a network (especially via a wide-area network such as the Internet) is often referred to as remote code execution…
-
More C++ Notes…
More C++ Notes… Step 1–Define the problem to solve. Step 2–Define a solution. Step 3–Write a program that implements the solution. Step 4–Compile the program. Step 5–Link object files. Step 6–Test program. Step 7–Debug. C++ files should end in ‘.cpp‘ extension to indicate a C++ source file. Ex: name.cpp Use a C++ compiler to compile a C++ (.cpp) program. The C++ compiler sequentially goes through each source code (.cpp) file in your program & does 2 important tasks: First, it checks the code to make sure it follows the rules of the C++ language. If it does not, the compiler will give you an error to help pinpoint what needs…
-
Slackware Linux Configuration Notes
After the initial install of Linux, I am now configuring my install of Slackware Linux: Slackware Linux Configuration Notes Configure Info The first screen prompt in this next process was to “Make USB Flash Boot”. “If your computer supports booting from a USB device, it is recommended that you make a USB boot stick for your system at this time. It will boot your computer straight into the root filesystem on ‘/dev/sda2’. “Please insert a USB flash memory stick and then press ENTER to create a boot stick. WARNING! The existing contents of the USB stick will be erased.” The options are: Create–Make a USB Linux boot stick, or, Skip–Skip…
-
More Programming Notes…
Value–the representation of some entity that can be manipulated by a program. The members of a ‘type‘ are the values of that type. Data are characteristics, or information, usually numerical, that are collected through observation. In a more technical sense, data are a set of values of qualitative or quantitative variables about one or more persons or objects, while a datum (singular of data) is a single value of a single variable. In academic treatments, data are simply units of information. Data re employed in virtually every form of human organizational activity. Data are measured, collected & reported, and analyzed. Raw data (“unprocessed data” is a collection of numbers or…
-
Classes: A Deeper Look, Part 2–STRUCTURED PROGRAMMING Course Notes
Classes: A Deeper Look, Part 2 ‘const’ (Constant) Objects and ‘const’ Member Functions The keyword ‘const‘ can be used to specify that an object is not modifiable and that any attempt to modify the object should result in a compilation error. C++ compilers disallow non-const member function calls on const objects. An attempt by a const member function to modify an object of its class is a compilation error. A member function (behavior) is specified as const both in its prototype and in its definition. A const object must be initialized. Constructors & destructors cannot be declared const. const data member & reference data members must be initialized using member…
-
Classes: A Deeper Look, Part 1–STRUCTURED PROGRAMMING Course Notes
Classes: A Deeper Look, Part 1 Time Class Case Study Preprocessor directives (a.k.a. “preprocessor wrappers”)–Use preprocessor directives to form preprocessor wrappers. Ex: //prevent multiple inclusions of header file #ifndef TIME_H #define TIME_H … #endif Preprocessor directives ‘#ifndef‘ (“if not defined”) and #endif are used to prevent multiple inclusions of a header file. (If the code between these directives has not previously been included in an application, #define defines a name that can be used to prevent future inclusions, and the code is included in the source code file. Tip: Use the name of the header file in upper case with the period replaced by an underscore in the #ifndef and…
-
Pointers–STRUCTURED PROGRAMMING Course Notes
Pointers Pointer Variable Declarations & Initialization Pointers are variables that contain as their values memory addresses of other variables. The declaration: int *ptr; declares ptr to be a pointer to a variable of type int and is read, “ptr is a pointer to int.“ The *(asterisk) as used here in a declaration indicates that the variable is a pointer. There are 3 values that can be used to initialize a pointer: 0, NULL, or, an address of an object of the same type. The only integer that can be assigned to a pointer without casting is zero. Normally, a variable directly contains a specific value. A pointer contains the memory…
-
Arrays & Vectors–Arrays–STRUCTURED PROGRAMMING Course Notes
Arrays & Vectors Intro Data Structures are collections of related items. Arrays are data structures consisting of related data items of the same type. Arrays are “static” entities in that they remain the same size throughout program execution. (They may, of course, be of automatic storage class, and hence be created and destroyed each time the blocks in which they’re defined are entered & exited.) An array is a consecutive group of memory locations that share the same type. To refer to a particular location or element in an array, we specify the name of the array and the position number of the particular element in the array. A program…
-
Recursion–Functions–STRUCTURED PROGRAMMING Course Notes
Recursion A recursive function calls itself, either directly or indirectly. A recursive function knows how to solve only the simplest case(s), or so-called base case(s). If the function is called with a base case, the function simply returns a result. If the function is called with a more complex problem, the function typically divides the problem into two conceptual pieces–a piece that the function knows how to do, and a piece that it does not know how to do. To make recursion feasible, the latter piece must resemble the original problem, but be a slightly simpler or slightly smaller version of it. For recursion, to terminate, the sequence of recursive…
-
Function Templates–Functions–STRUCTURED PROGRAMMING Course Notes
Function Templates Overloaded functions typically perform similar operations that involve different program logic on different data types. If the program logic & operations are identical for each data type, overloading may be performed more compactly & conveniently using function templates. Given the argument types provided in calls to a function template, C++ automatically generates separate function template specializations to handle each type of call appropriately. All function template definitions begin with the ‘template‘ keyword followed by a template parameter list to the function template enclosed in angle brackets ( <> ). The formal type parameters are placeholders for fundamental types or user-defined types. These placeholders are used to specify the…