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 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 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
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 .
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).
Solution Suggestions
Goals
Points to Think About
In: Computer Science
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
In: Computer Science
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?
users have reset their account to a previously used password, Implement a password history policy
service accounts are being used to log on to the server, restrict service account permissions to read/ write
single sign-on is allowing remote login to the database server, disable single sign-on until it can be properly configured
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 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 methods in it: (preferably in order)
Design Notes:
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 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 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 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: Computer Science
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
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 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