Questions
Writ a Python Program that illustrate the DES algorithm 1-Not allowed to use any crypto libraries...

Writ a Python Program that illustrate the DES algorithm

1-Not allowed to use any crypto libraries

2- The whole algorithm must be implemented from scratch

2- The code must be properly commented

Please don’t use librae’s or any code on the internet

In: Computer Science

C++ while loop Exercise Write a program that continues to ask the user to enter any...

C++

while loop Exercise

Write a program that continues to ask the user to enter any set of numbers, until the user enters the number -1. Then display the total sum of numbers entered and their average. (note that you need to define a counter that counts how many numbers so the average = (sum/n) where n is your counter total.

#include <iostream>

using namespace std;

int main()

{

int number, n=0, sum=0;

cout << "Enter a number to start with " << endl;

cin >> number;

while (number != -1)

{

.

.

.

}

.

.

.

return 0;

}

Exercise 3: For loop

Modify Exercise 2 so that the user enters only 5 numbers, and the code display the total sum and their average.

In: Computer Science

In Chapter 4 in Windows Forensic Analysis DVD Toolkit, 2nd Edition Download the RegRipper suite of...

In Chapter 4 in Windows Forensic Analysis DVD Toolkit, 2nd Edition

Download the RegRipper suite of tools at: (50 points)

https://github.com/keydet89/RegRipper2.8

Or

https://code.google.com/archive/p/regripper/downloads

(you may also download the sample hives “samples.zip” for this practice), and download the RegRipper supplemental plugins at:

https://storage.googleapis.com/google-code-archivedownloads/v2/code.google.com/regripper/plugins20130429.zip.

Find related documents on the installation and user guidance; make the practice by selecting at least eight examples of Registry analysis from page 181 to the end of chapter 4.

You may utilize the sample hive files at https://storage.googleapis.com/google-code-archivedownloads/v2/code.google.com/regripper/samples.zip.

Please check the path of regripper and the path of regripperplugins. Your commands may not be the same to the examples shown in the textbook (e.g., the command on page 179 C:\Perl\forencis\rr\rip.pl –r d:\cases\vista\software Plugins Dir= C:\Perl….), because you may have different directory names to hold the regripper, the plugins, and the sample hive files.

Please write down your command to execute these exercises including the paths to have regripper and the plugins, and the output (analysis results) by these commands. You may provide screen capture results to these questions.

In: Computer Science

Write a Java program that will add the digits of a person’s birth date to obtain...

  • Write a Java program that will add the digits of a person’s birth date to obtain a single digit to generate a numerology number.
  • Write one separate method for each of the following tasks (it goes w/o saying that you will have a main() method along with these):
    • date validating
    • date crunching

First: Get a Date

Numerology has been used since ancient times to shed light on relationships, health, and global events. Each element in a birth date is believed to possess a special numerical significance. We are going to develop our own rudimentary numerology prediction program. The first thing to do is to ask the user to enter a birth date to process.

You will need to indicate to your user that they need to enter the month, day and year in that order separated by spaces and forward slashes, which look like this: /. An example would be 12 / 25 / 2112.  The spaces must be present between the numeric and character input.

Second: Validate the Date

The important and time-consuming portion of this program is validating your input from the user. This means that you need to check to make sure the month is between 1 and 12, the day is appropriate for the month, and the year is between 1500 and 3000, inclusive.

By “the day is appropriate for the month and year”, this means that if a date of January 32nd is entered or a date of June 0th is entered, you should recognize and report that. This also means that you should check to see that if the year is a leap year, you should allow February 29th and if it's not a leap year, you should disallow February 29th .

  • Allow the user to input the entire date before you validate it.
  • You should continuously re-prompt the user for a date until a valid date is entered (you should use a 'while' loop for this).
  • If one part of the date fails (month, day, or year), re-prompt for the entire date again. Do not simply re-prompt for the offending part of the date. Output appropriate error messages for the incorrect dates. See the example runs for sample error messages.

Third: Crunch the Date

Then, you need to calculate a single digit from the birth date. For example, if your birth date is 3/19/1955 you add 3+1+9+1+9+5+5 to get 33. You would then break this apart and add 3+3 to get 6.

Once you have calculated the single-digit, PRINT it on the console (see the sample test runs).

  • You will need to be careful because it is possible to have to “fold” the number more than just once, as in the above example. For example, if the birth date was 7/5/1942, you would add up the individual digits 7+5+1+9+4+2 to get 28, then you would need to add 2 + 8 to get 10. This is still a two-digit number, and needs to be added again – 1 + 0 – to get a single-digit result of 1.
  • You can simplify the process by adding the month day and year together first (i.e., 7+5+1942, to get 1954) and then breaking down and adding that result (1+9+5+4), which results in 19, which needs to be broken down again to get 1+9 which results in 10, which then results in 1+0, or 1. You should never have to crunch a number more than 3 times and will usually only need to add the digits once.

Solution Suggestions

  • It might actually be easier to work backward solving this program, like this, checking each step as you complete it:
    • Then add the code to take a date and crunch it down to a single digit. For simply testing this code, don’t worry about validating the date or input format yet; declare three variables (for example month, date, year), read in the date to process from the user, and then output the final single-digit number.
    • Finally, add code to validate the date that you read from the keyboard before crunching it. Validation will need to include tests for the month, day, and year as well as for using forward slashes between those pieces of information.
    • Make sure that your program continuously prompts the user for a date until a valid date is entered.
    • Make sure to allow the user to enter the entire date before validating it. In other words, don't just validate the month, then validate the day and then validate the year. Allow the entire date to be entered, then validate it and output an appropriate error message, repeating input if necessary.

Goals

  • Use most of the concepts in Java that we have learned so far: if/else, while, methods.
    • arrays can be used but not required.
  • Use only the data type int for numbers in this program; there’s no need to calculate floating-point numbers.
  • Solve a moderately complex Java program using the techniques you’ve learned so far.

Points to Think About

  • Validate to make sure that the year is between 1500 and 3000, inclusive.
  • Validate to make sure that the month is between 1 and 12, inclusive.
  • Validate to make sure that the day is appropriate for the month (at least >=1 and <= 28, 29, 30 or 31 depending on which month and year it is).
  • Validate that the user uses forward slashes (/) between the month, day, and year.

In: Computer Science

discussed big data , data warehouse and google database for big data and bootstrapping technique for...

discussed big data , data warehouse and google database for big data and bootstrapping technique for data analytics to a real life business scenario.

Writing Requirements

  • 3-5 pages in length in word document

In: Computer Science

An organization has the following password policies: - password must be at least 16 characters long...

An organization has the following password policies:

- password must be at least 16 characters long

- three failed login attempts will lock the account for 5 minutes

- password must have one uppercase letter, one lowercase letter, and one non alphanumeric symbol

a database server was recently breached, and the incident Response Team suspect the passwords were compromised. Users with permission on the database server were forced to change their passwords for that server. Unauthorised and suspicious logins are now being detected on the same server. Which of the following is the most likely issue, that should be done?

  1. users have reset their account to a previously used password, Implement a password history policy

  2. service accounts are being used to log on to the server, restrict service account permissions to read/ write

  3. single sign-on is allowing remote login to the database server, disable single sign-on until it can be properly configured

  4. users are logged in after work hours, Implement time of day restrictions for the database servers

In: Computer Science

using java language only write a code Have the function StringChallenge(str) take the str string parameter...

using java language only write a code

Have the function StringChallenge(str) take the str string parameter being passed and return the number of words the string contains (e.g. "Never eat shredded wheat or cake" would return 6). Words will be separated by single spaces.

Examples

Input: "Hello World"
Output: 2

Input: "one 22 three"
Output: 3

------- you have the following code edit it to get the result

mport java.util.*;

import java.io.*;

class Main {

  public static String StringChallenge(String str) {

    // code goes here  

    return str;

  }

  public static void main (String[] args) {  

    // keep this function call here     

    Scanner s = new Scanner(System.in);

    System.out.print(StringChallenge(s.nextLine()));

  }

}

In: Computer Science

Please write a java program (using dialog box statements for user input) that has the following...

Please write a java program (using dialog box statements for user input) that has the following methods in it: (preferably in order)  

  1. a method to read in the name of a University and pass it back
  2. a method to read in the number of students enrolled and pass it back
  3. a method to calculate the tuition as 20000 times the number of students and pass it back
  4. a method print the name of the University, the number of students enrolled, and the total tuition

Design Notes:

  • The method described in Item #1 above will read in a string and pass it back to the main program. Nothing is passed to the method, but the University name is passed back
  • The method described in Item #2 above will read in an integer for the number of students enrolled and pass it back to the main program. Nothing is passed to the method, but the University name is passed back to the main program
  • The method described in Item #3 above will receive the number of students. It will then do the calculation for the tuition and pass back that value, which is a double value to the main program
  • The method described in Item #4 above will receive all data for printing and pass nothing back to the main program

Please copy the java code along with a screen print (snippet) of the final output. I would like both to review the work that I already have done. Thanks in advance!

In: Computer Science

I only need to update this JAVA program to be able to : 1 ) Exit...

I only need to update this JAVA program to be able to :

1 ) Exit cleanly after creating the chart

2 ) change the pie chart to a perfect circle rather than an oval

3 ) provide a separate class driver

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.util.Scanner;

import javax.swing.JComponent;
import javax.swing.JFrame;

// class to store the value and color mapping of the
// pie segment(slices)
class Segment {
double value;
Color color;

// constructor
public Segment(double value, Color color) {
this.value = value;
this.color = color;
}
}

class pieChartComponent extends JComponent {

private static final long serialVersionUID = 1L;
Segment[] Segments;

// Parameterized constructor
// create 4 segments of the pie chart
pieChartComponent(int v1, int v2, int v3, int v4) {
Segments = new Segment[] { new Segment(v1, Color.black), new Segment(v2, Color.green), new Segment(v3, Color.yellow),
new Segment(v4, Color.red) };
}

// function responsible for calling the worker method drawPie
public void paint(Graphics g) {
drawPie((Graphics2D) g, getBounds(), Segments);
}

// worker function for creating the percentage wise slices of the pie chart
  
void drawPie(Graphics2D g, Rectangle area, Segment[] Segments) {
double total = 0.0D;
// fin the total of the all the inputs provided by the user
for (int i = 0; i < Segments.length; i++) {
total += Segments[i].value;
}
  
// Initialization
double curValue = 0.0D;
int strtAngle = 0;
// iterate till all the segments are covered
for (int i = 0; i < Segments.length; i++) {
// compute start angle, with percentage
strtAngle = (int) (curValue * 360 / total);
// find the area angle of the segment
int arcAngle = (int) (Segments[i].value * 360 / total);

g.setColor(Segments[i].color);
g.fillArc(area.x, area.y, area.width, area.height, strtAngle, arcAngle);
curValue += Segments[i].value;
}
}
}

public class Graphic_Pie2D {
public static void main(String[] argv) {

System.out.println("Pleae provide 4 values, to create the pie chart");
Scanner input = new Scanner(System.in);
int v1, v2, v3, v4;
v1 = input.nextInt();
v2 = input.nextInt();
v3 = input.nextInt();
v4 = input.nextInt();
  
// create a JFrame with title
JFrame frame = new JFrame("Pie Chart");
frame.getContentPane().add(new pieChartComponent(v1,v2,v3,v4));
frame.setSize(500, 300);
frame.setVisible(true);

}
}

here's the assignment for reference :

Pie chart: prompt the user (at the command line) for 4 positive integers, then draw a pie chart in a window. Convert the numbers to percentages of the numbers’ total sum; color each segment differently; use Arc2D. No text fields (other than the window title) are required. Provide a driver in a separate source file to test your class.

In: Computer Science

Write a Python script that performs brute force to extract a password protected zip file named...

Write a Python script that performs brute force to extract a password protected zip file named sec2.zip. The password is believed to be associated with one of the dictionary word in the 'wordlist.txt file.

a) Paste your code here

b) What is the password?

In: Computer Science

CODE must using C++ language. Write the definition of the class dayTye that implements the day...

CODE must using C++ language.

Write the definition of the class dayTye that implements the day of the week in a program. The class dayType should store the day of the week as integer. The program should perform the following operations on an object of type dayType

1. set the day

2. display the day as a string - Sunday, ... Saturday

3. return the day as an integer

4. return the next as an integer

5. return the previous day as an integer

6. calculate and return the day by adding to or subtracting from the current day. For example, if the current day is Monday (1) and we add 4 days the day returned is Friday (5). If today is Tuesday (2) and we subtract 13 days the day returned is Wednesday (3).

7. Add the appropriate constructors, accessors, mutators, and custom methods .

Write a main function to test your class in its own file. Do not put any class file the file that contains the main function.

Write a cpp file and an h file for your class in two files.

Upload the 2 files and the 1 h file.

In: Computer Science

In Python syntax, create a list of 10 numbers (any numbers). Create your list 3 times,...

  1. In Python syntax, create a list of 10 numbers (any numbers). Create your list 3 times, each time using a different syntax to define the list.
  1. Write a while loop that prints the numbers from 1 to 10.
  1. Convert your previous loop into a for loop.
  1. Rewrite your for loop to only have one number in the range.
  1. Write a for loop to print out each item of your list of 10 numbers, all on the same line, separated by & (ampersand).
  1. In the previous question, you may notice that your line of numbers ends with the &. See if you can change this to only print the last number instead of the &. Hint: You’ll need to be clever about printing the last number from within the loop to make this work.

In: Computer Science

Suppose x = 0x5A and y = 0xA5. What is the output for x | y?...

Suppose x = 0x5A and y = 0xA5.

What is the output for x | y?

What is the output for x & y?

What is x for x = ~y?

What is the output for x ^ y?

In: Computer Science

Write a program in C++ to keep statistics for a basketball team consisting of 10 players...

  1. Write a program in C++ to keep statistics for a basketball team consisting of 10 players using parallel arrays. The stats for each player should include the total points, shots attempted, shots made, free throw attempts, free throws made, rebounds, assists, and turnovers. Use functions to perform the following:
    1. Calculate the shooting percentage
    2. Calculate free throw percentage
    3. Print the player's names, shooting percentage, free throw percentage, rebounds, assists, and turnovers. After each player, use "endl" to skip to a new line.

Perform multiple sorts of printing in between sorts. Print a list of player names and total points, sorted from highest to lowest. Next, print a list of player names and rebounds, sorted from highest to lowest.

In: Computer Science

Fruits=['mango','apple','orange','banana','grape'] prices=[15,12,17,7,19] 1. Using priceDict, find the price for 'grape'. 2. Add a price of 20...

Fruits=['mango','apple','orange','banana','grape']

prices=[15,12,17,7,19]

1. Using priceDict, find the price for 'grape'.

2. Add a price of 20 for 'pomegranate'.

3. Create a sorted list of all the prices in priceDict.

4. Calculate the average of all the prices in priceDict.

5. Update the price for 'pomegranate' to be 25.

6. Mangos has just sold out. Delete 'mango' and its price from priceDict.

Python

In: Computer Science