Starting from:

$24.99

Project 3: Binary Bomb

Project 3
1 Introduction
In this project, you will diffuse a multi-phase 32 bit binary bomb. A binary bomb is a program that consists of a sequence of phases. Each phase expects a particular string as input which can either be provided through the terminal (stdin) or through a file. If you provide the correct string, the phase is diffused, and you move on to the next phase. Otherwise, the bomb explodes by printing BOOM and terminates. The bomb is diffused when all phases have been diffused. You are allowed to work in groups of no more than 2 people. You are required to email your group membership to the TAs no later than 11/07/2017.
2 Instructions
• BEFORE YOU BEGIN: After downloading the bomb from mycourses, transfer it to remote, and verify that the md5checksum $ md5sum ./bomb is: 575495e7424864973559ff900189159e.
• You can attempt the project alone or in groups of two students. There is no extra credit for attempting the project alone. If you do decide to work in pairs, TAs must be notified with your group membership before 7th Nov 2017, 11:59 pm. If the TAs dont receive your group information by then, you will undertake the project alone. Pick your group carefully. Each member of the group receives the same score.
• You can download the bomb from mycourses. The bomb comprises of 7 phases labeled phase0 through phase6. You are required to solve all phases in order to diffuse the bomb. Before running the bomb, make it executable by running $ chmod +x bomb. You are required to diffuse the bomb on remote.cs.binghamton.edu.
• Source code for the main function is given below: 1 int main( int argc , char a r g v [ ] ) { FILE f p ; i f ( argc 1) { 3 fp = fopen ( argv [1] , r ) ; i f ( fp == NULL) { 5 goto usage ret ; } else { 7 fp = stdin ; }
2
9
i n i t i a l i z e () ;
11
phase0 ( fp ) ; 13 phase1 ( fp ) ; phase2 ( fp ) ; 15 phase3 ( fp ) ; phase4 ( fp ) ; 17 phase5 ( fp ) ; phase6 ( fp ) ;
19
return 0;
21
usage ret : 23 printf ( U s a g e : %s OR%s <file \ n , argv [0] , argv [0]) ; return 1 ; 25 }
Each phase either explodes or prints a statement acknowledging that the phase has been successfully diffused. • Inputs can either be provided through stdin or can be typed into a text file (each line is the input for 1 phase) and the file can be provided as a command-line argument. • You can score a total of 100 points. Phases 0 and 1 are worth 10 points each. Phases 2, 3, 4 and 5 are worth 15 points each. Phase 6 is worth 20 points

More products