hands-on ethical hacking and network defense ch-7, Programming for Security Professionals

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

HTML formatting tags

<H1>,<H2>,<H3>,<H4>,<H5>,and <H6>, with </H1>,</H2>,</H3>,</H4>,</H5> and </H6> : Formats text as different heading levels. level 1 is the largest and level 6 is the smallest. <P> with </P> : used to mark tha beginning and end of a paragraph. <BR> with </BR>: used to insert a carriage return (start a new line). <B> with </B>: formats enclosed text in bold. <I> with </I>: format enclosed text in italics

relational and logical operators in C

== , used to compare the equality of two variables. in a==b, the condition is true if variable a is equal to variable b. != , not Equal; the exclamation mark negates the equal sign. the statement if a != b is read as "if a is not equal to b" >, greater than < ,less than >=, greater than or equal to. <=, less than or equal to. &&, the AND operator; evaluates as true if both sides of the operator are equal. example;if ((a>5)&&(b>5)) printf ("Hello,world!"); ||, the OR operator; evaluates as true if either side of the operator is equal. !, the NOT operator; the statement ! (a == b), evaluates as true if a isn't equal to b .

for loop;

a loop that initializes a variable, tests a condition, and then increments or decrements the variable.

do loop;

a loop that performs an action and then tests to see whether the action should continue to occur.

while loop ;

a loop that repeats an action a certain number of times while a condition is true or false.

Perl (Practical Extraction and Report Language)

a powerful scripting language, developed by Larry Wall in 1987, can run on almost any platform, and *nix-based OS's . hacker's use Perl to create automated exploits and malicious bots, but system administrators and security professionals use it to perform repetitive tasks and conduct security monitoring.

testing;

a process conducted on a variable that returns a value of true or false.

compiler;

a program that converts source code into executable or binary code.

bug;

a programming error that causes unpredictable results in a program.

assembly language;

a programming language that uses a combination of hexadecimal numbers and expressions to program instructions that are easier to understand than machine-language instructions.

algorithm;

a set of directions used to solve a problem

variables (in C)

a variable represents a numeric or string value. a variable might be defined as a character or characters, such as letter of the alphabet, or it can be assigned a numeric value, as in the expression, int x = 1.

pseudocode;

an English-like language for outlining the structure of a program.

parameters (in C)

are placed between opening and closing parentheses , opening-( ,closing - ).

BLT;

branching,looping and testing most programming languages have a way to branch, loop and test.

using printf to format output for Perl;

character_________description______input___________output____ %c,__________________character, _______printf'%c',"d"_____d %s,_______________String,______printf'%s',"This is Fun"___This is fun %d,______signed integer in decimal,printf'%+d %d',1,1__+ 1 1 %u,___unsigned integer in decimal,printf'%u',2______2 %o,___unsigned integer in octal,____printf'%o',8_____10 %x,__unsigned integer in hexadecimal,_printf'%x',10__a %e__floating-point number in scientific notation,printf'%e',10;__1.000000e +001(depending on the OS) %f,_floating-point number in fixed decimal notation,_printf'%f',1__1.000000

mathematical operators in C ;

compare values and perform mathematical calculations. + (unary) doesn't change the value of the number. Unary operators use a single argument; binary operators use two arguments. example: +(2) - (unary) returns the negative value of a single number ++ (unary) increments the unary value by 1. for example, if a is equal to 5, ++a changes the value to 6. --(unary) decrements the value by 1. for example, if a is equal to 5, --a changes the value to 4. +(binary) addition. example , a+b -(binary) subtraction. example,a-b *(binary) multiplication. example,a*b /(binary) division. example,a/b %(binary) modulas. example, 10%3 is equal to 1 because 10 divided by 3 leaves a remainer of 1.

class;

in Object-Oriented Programming, the structure that holds pieces of data and functions.

variable types ;(in C)

int : use this variable for an integer(positive or negative) float: this variable type is for a real number that includes a decimal point, such as 1.299999. double: use this variable type for a double-precision floating-point number. char: this variable type holds the value of a single letter. string: this variable type holds the value multiple characters or words. const: a constant variable is created to hold a value that doesn't change for the duration or your program. example: you can create a constant variable called TAX and give it a specific value: const TAX = .085

HTML;

is a markup language used mainly for indicating the formatting and layout of Web pages, so HTML files don't contain the kind of programming code you see in a C program.

function ;

is a mini program within the main program that carries out a task.

looping;

is the act of performing a task over and over. the loop usually completes after testing. the act of repeating a task

conversion specifiers;

need to use these if the printf () function contains values other than a quoted sentence, such as numbers. a conversion specifier tells the compiler how to convert the value in a function. example: printf ("Your name is %s !",name) displays the following if you have assigned the value Sue to the string variable called name: Your name is Sue ! conversion specifiers: %c - character %d - decimal number %f - floating decimal or double number %s -character string

printf () function;(in C)

special characters; \n -new line \t -tab \o -null(used to end or terminate a string of characters)

branching

takes you from one area of a program (a function) to another area.

conversion specifier ;

tells the compiler how to convert the value indicated in a function.

HTML tags;

the < and > denote HTML tags which act on the data they enclose. each tags has a matching closing tag that includes a forward slash (/). example; the <HTML> tag has the closing tag </HTML>, as do the <HEAD>, <TITLE>, and <BODY> tags. Most HTML Web pages contain these four tags.

the C language;

use /* and */ to comment large portions of text instead of using the // symbols for one-line comments. the # include statement is used to load libraries that hold the commands and functions used in your program. the parentheses in C mean you're dealing with a function examples: - main ( ) function -printf ( )

parameters or (arguments) ;(in C)

when a function calls another function, it uses parameters.

shorthand method

TotalSalary +=5 ,instead of TotalSalary = TotalSalary + 5 or TotalSalary -= 5.


Set pelajaran terkait

General Insurance - Chapter Quiz

View Set

Advanced Physical Assessment Exam 1

View Set

ExamFX - Completing the Application, Underwriting, and Delivering the Policy

View Set

Chp 7: High-Risk Antepartum Nursing Care

View Set

Fundamentals: josphine, kim, mona

View Set

Vertical Asymptotes of Rational Functions

View Set