In Python please: Number the Lines in a File: Create a program that adds line numbers to a file. The name of the input file will be read from the user, as will the name of the new file that your program will create. Each line in the output file should begin with the line number, followed by a colon and a space, followed by the line from the input file.
In: Computer Science
In no more than 200 words, please identify what are the core components of a Cyber Incident Response plan? What groups / functions need to be involved in your cyber incident response? Write in details in your own analysis
In: Computer Science
In an asynchronous bus, what are the steps that a master device let a slave device do a job?
Please draw the circuit diagram of an SR latch using only NAND gates. Please also show its truth.
In: Computer Science
use c++
A right-angle triangle with integer sides a, b, c, such as 3, 4,
5, is called a Pythagorean triple. The condition is that hypotenuse
to power of 2 is equal to adding of square of the 2 other sides. In
this example 25 = 16 + 9. Use brute force approach to find all the
triples such that no side is bigger than 50.
For this you should first implement the following Triangle class
and its methods. Then use it in main() to find all pythagorean
triples and put then in a std::vector. Finally print them out as
triples, like
(3, 4, 5)
.....
Make sure your output contains a triple only once, and not any
reordered ones, this means (3, 4, 5) is the same as (4, 3, 5) and
so only the increasing order triple should be printed out. This
means only (3, 4, 5) shoud be printed.
You program should print out all possible pythogorean triples with
sides <= 50.
*/
class Triangle
{
public:
Triangle(int a, int b, int c) // constructor.
Implement this
{}
bool isPythagorean() const // implement this
properly
{
return false;
}
private: // what do you put in private section?
}
int main()
{
}
In: Computer Science
I am a student taking an introductory Unix / LInux shell programming course and need some help with an assignment.
Using the file CISED as input, write the sed command to do the following:
Change 2 or more occurrences of g to a single g
Add > to beginning of any line that begins with CIS132
Add < to the end of any line that ends in Tux or tux
Replace any five to eight digit number with XX
For every line that begins with CIS132, place the first 6 characters in the line at the end of the line and the last three characters at the beginning of the line. Leave the characters in between these characters as they were.
Change any non alphanumeric character to &
For any line that begins with CIS132 place the entire line inside of double quotes.
Thanks for your help.
In: Computer Science
1) How large are the blocks that get fed through the AES Encryption algorithm?
2) What are the three possible key sizes for AES? How many rounds are there for each key size? How large is the keyspace?
3) List five distinct differences between the AES and DES algorithms.
4) List the 16 elements of GF(16) as polynomials. What is 3x^2+6x+1 equal to in GF(16), when the coefficients are reduced appropriately?
5) Use the table on slide 17 of the Chapter 4 slides to compute the inverse of x^4+x^3+1 in GF(256). Then verify that the product of x^4+x^3+1 and the inverse you computed is, in fact, 1 modulo the polynomial indicated in red on slide 17.
6) List three separate known attacks on AES. Include the weakness(es) of AES that they exploit and include the year in which the attack was first discovered
#understanding cryptography
#asap
In: Computer Science
Write a function with the following prototype: int add_ok (int s, unsigned x, unsigned y); This function should return 1 if arguments x and y can be added without causing overflow, otherwise return 0. If s is 0, x and y are unsigned numbers. If s is 1, x and y are treated as signed numbers. I tried this code but it doesn't work. Does anyone help me please?
#include int add_ok(int s, unsigned x, unsigned y) {
s=x+y;
if ((s<x) || (s<y)) {
return 0; }
return 1;
}
int main()
{
int nums = new int[(sizeof(int))];
unsigned x = 3357162450;
unsigned y = 40;
printf("%d\n",add_ok(s, x, y));
scanf("%d\n", &nums);
return 0;
}
In: Computer Science
Consider the following scenario:
Your manufacturing company has operated with a mainframe IBM computer for more than 20 years. Recent technological advances have brought opportunities to replace that mainframe-based computing environment with a client/server environment. You have been tasked with responding to the senior management group about the security issues involved with replacing the existing mainframe computer environment with a client/server platform. The salespeople you deal with from each vendor believe that the current mainframe environment costs about $500K a year to maintain from a security standpoint, while a client/server environment would cost about $325K a year. But cost is not the only consideration. No PII or SPII data is contained in this manufacturing platform. It is strictly a final product for sale application.
Outline and review a typical mainframe enterprise security footprint. Do the same for a possible client/server environment. This could include the use of the cloud for distributed computing, but that would also include unique security concerns.
Discuss the following:
Respond to the following in a minimum of 175 words:
In: Computer Science
Convert the following C function to the corresponding MIPS
assembly procedure:
int count(int a[], int n, int x)
{
int res = 0;
int i = 0;
int j = 0;
int loc[];
for(i = 0; i != n; i++)
if(a[i] == x) {
res = res + 1;
loc [j] = i;
j = j+1}
return res, loc;
}
In: Computer Science
What is DNS Poisoning, Spoofing, Pharming and the differences and examples of each
In: Computer Science
C++ Chapter 4/5 Lab Assignment Using concepts from chapters 1 – 5 only. Grading will be based on chapter 4 concepts more. Design a menu driven program that can keep track of five player’s scores. Your program must have the following documentation: A. Your name B. The program name C. Program Description D. The date the exe file was created E. The code: a. Use a menu approach do the following: i. to Add a player information ii. to Search for any player based on their name. iii. to Display all the information at any time (Hint : Use value and reference parameters as necessary).. b. Organize the main program to call input and output functions. Use static variables to keep track of player’s information. c. Input the names of five players and their highest scores on three games they ever played. Do Not Hard-Code the players’ names and their scores. d. Create an average function to compute the average highest score of each player i.e. ( john: g1 100 g2 200 g3 300. Average highest score will be 200.00).
In: Computer Science
Convert the following C function to the corresponding MIPS
assembly procedure:
int count(int a[], int n, int x)
{
int res = 0;
int i = 0;
int j = 0;
int loc[];
for(i = 0; i != n; i++)
if(a[i] == x) {
res = res + 1;
loc [j] = i;
j = j+1}
return res, loc;
}
In: Computer Science
implement the algorithm described in this chapter to convert a prefix expression to postfix form. involve the classes that programming problems 4 and 5 describe
This is to be written in C++. I cannot provide anymore information, I cannot provide any class information, etc. This is all the problem that book gave me. This is for Data Structures and algorithms.
In: Computer Science
Convert the following C function to the corresponding MIPS
assembly procedure:
int count(int a[], int n, int x)
{
int res = 0;
int i = 0;
int j = 0;
int loc[];
for(i = 0; i != n; i++)
if(a[i] == x) {
res = res + 1;
loc [j] = i;
j = j+1}
return res, loc;
}
In: Computer Science
Write a value returning function named CountLower that counts the number of lower case letters on one line of standard input and returns that number. Document the dataflow of the function and show how it would be called from main().
In: Computer Science