This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
haas:spring2018:unix:projects:pwn0 [2018/03/11 14:42] – created wedge | haas:spring2018:unix:projects:pwn0 [2018/03/12 20:47] (current) – [Verification] wedge | ||
---|---|---|---|
Line 80: | Line 80: | ||
Your script should also take the following optional arguments (in this order): | Your script should also take the following optional arguments (in this order): | ||
- | * $1- starting value (some value greater than or equal to 0, and less than 256) | + | |
- | * $2- ending value (some value greater than or equal to 0, and less than 256) | + | |
Numerical arguments are to be given in decimal. | Numerical arguments are to be given in decimal. | ||
Line 100: | Line 100: | ||
====Only specifying starting value==== | ====Only specifying starting value==== | ||
- | In the event only the starting value is specified, assume a count of 16 (so display 16 values, starting at the starting value). Note that for binary and octal, all numbers should be displayed in a block, so if an additional place value comes into the picture, leading zeros must be visible on the preceding values. | + | In the event only the starting value is specified, assume a count of 16 (so display 16 values, starting at the starting value). |
For example: | For example: | ||
Line 459: | Line 459: | ||
* indentation should be consistent throughout the script | * indentation should be consistent throughout the script | ||
* indentation is to be no less than 3 on-screen spaces (I recommend tabstops of 4). | * indentation is to be no less than 3 on-screen spaces (I recommend tabstops of 4). | ||
+ | * continuing with our shell scripting, your script will need to employ in a core/ | ||
+ | * variables | ||
+ | * command expansions | ||
+ | * regular expressions | ||
+ | * if statements | ||
+ | * loops | ||
+ | * at least 1 function (use **function** keyword to identify) | ||
+ | * your logic needs to: | ||
+ | * flow (one thing leads into the next, as best as possible) | ||
+ | * make sense within the given context | ||
+ | * avoid redundancy (make a function instead of maintaining multiple copies of code) | ||
+ | * be understood by you (no grabbing snippets that seem to " | ||
+ | * if you gain inspiration from some external resource, please cite it | ||
+ | * comments are a great way of demonstrating understanding (if you explain the why and how effectively, | ||
- | ====Output Formatting with printf(1)==== | + | To be sure, I'll be checking to make sure you solution follows the spirit of what this project is about (that you implement functional, flowing logic utilizing the tools and concepts we've learned, in an application that helps demonstrate your comprehension). Don't try to weasel your way out of this or cut corners. This is an opportunity to further solidify your proficiency with everything. |
+ | |||
+ | =====Spirit of project===== | ||
+ | The spirit of the project embodies many aspects we've been focusing on throughout the semester: | ||
+ | |||
+ | * recognizing patterns to employ effective solutions in problem solving | ||
+ | * utilizing concepts and tools covered | ||
+ | * demonstrating comprehension of concepts, tools, and problems | ||
+ | * employing concepts in knowledgeable and thoughtful manner | ||
+ | * following instructions | ||
+ | * implementing to specifications | ||
+ | * utilizing creativity | ||
+ | * being able to control solution via consistent, clear, and organized presentation | ||
+ | |||
+ | Basically: I want your solution to be the result of an honest, genuine brainstorming process where you have (on your own) figured out a path to solving the problem, you have dabbled and experimented and figured things out, and you can command the concepts and tools with a fluency enabling you to pull off such a feat. Your solution should demonstrate the real learning that took place and experience gained. | ||
+ | |||
+ | Cutting corners, avoiding work, skimping on functionality, | ||
+ | |||
+ | =====Identifying shortcomings===== | ||
+ | I would also like it if you provided an inventory of what functionality is lacking or out of spec when you submit the project. The better you can describe your deviations from stated requirements, | ||
+ | |||
+ | The more fluent you are in describing your shortcomings on accomplishing the project (ie "I didn't know how to do this" is far from fluent), the better I will be able to gauge your understanding on a particular aspect. | ||
+ | |||
+ | This can be in the form of comments in your script, or even a separate file submitted at time of submission (if a file, be sure to make mention of it in your script so I can be sure to look for it). | ||
+ | =====Output Formatting with printf(1)===== | ||
You might be wondering how you can full off some of these output formatting feats. The **echo** command, after all, is rather rudimentary. | You might be wondering how you can full off some of these output formatting feats. The **echo** command, after all, is rather rudimentary. | ||
Line 605: | Line 643: | ||
Play with **printf** and experiment... you'll find it can accomplish some impressive output feats that previously may have been more complicated. | Play with **printf** and experiment... you'll find it can accomplish some impressive output feats that previously may have been more complicated. | ||
+ | |||
+ | =====Verification===== | ||
+ | To assist you in verifying output compliance, I have generated a set of sample script outputs and placed them in the public directory for this project. | ||
+ | |||
+ | There you will find a file by the name of **outputlist**, | ||
+ | |||
+ | Using these files, you can check the functionality of your script in a number of operating conditions, to verify that it is indeed working as it should be. While this isn't likely to cover the full spectrum of possibilities, | ||
=====Submission===== | =====Submission===== | ||
- | By successfully performing this project, you should have a fully functioning script by the name of **pwn.sh**, which is all you need to submit for project completion (no steps file, as your " | + | By successfully performing this project, you should have a fully functioning script by the name of **pwn0.sh**, which is all you need to submit for project completion (no steps file, as your " |
To submit this project to me using the **submit** tool, run the following command at your lab46 prompt: | To submit this project to me using the **submit** tool, run the following command at your lab46 prompt: | ||
Line 624: | Line 669: | ||
< | < | ||
- | 78:usf0:final tally of results (78/78) | + | 78:pwn0:final tally of results (78/78) |
- | *:usf0:usf0.sh submitted with submit tool [3/3] | + | *:pwn0:pwn0.sh on help displays informative usage and exits [4/4] |
- | *:usf0:usf0.sh has a shabang invoking bash [3/3] | + | *:pwn0:pwn0.sh effectively utilizes variables in operations |
- | *:usf0:usf0.sh runs without error [6/6] | + | *:pwn0:pwn0.sh effectively utilizes command expansions |
- | *:usf0:usf0.sh with no arguments | + | *:pwn0:pwn0.sh effectively utilizes regular expressions [4/4] |
- | *:usf0:usf0.sh is commented explaining implementation | + | *: |
- | *:usf0:table heading and separators conform to project specifications | + | *: |
- | *:usf0: | + | *: |
- | *:usf0:binary column is correct | + | *: |
- | *:usf0:octal column is correct and formatted to specifications | + | *: |
- | *:usf0:decimal column is correct and formatted to specifications | + | *:pwn0:pwn0.sh accurately displays values in proper alignment |
- | *:usf0:hexadecimal column is correct and formatted to specifications | + | *:pwn0:pwn0.sh accurately displays values in requested bases [4/4] |
- | *:usf0:starting value is properly | + | *:pwn0:pwn0.sh accurately displays |
- | *:usf0:ending value is properly checked for and verified | + | *:pwn0:pwn0.sh range logic flexibly works forward |
- | *:usf0:signed option | + | *:pwn0:pwn0.sh iterates as appropriate in given scenarios |
+ | *:pwn0:pwn0.sh includes additional bases as requested | ||
+ | *:pwn0:pwn0.sh omits specified bases as requested | ||
+ | *:pwn0:pwn0.sh | ||
+ | *:pwn0:pwn0.sh operates according to specifications | ||
+ | *:pwn0:pwn0.sh logic is organized | ||
</ | </ | ||
+ | |||
+ | Additionally: | ||
+ | * Solutions not abiding by spirit of project will be subject to a 25% overall deduction | ||
+ | * Solutions not utilizing descriptive why and how comments will be subject to a 25% overall deduction | ||
+ | * Solutions not utilizing indentation to promote scope and clarity will be subject to a 25% overall deduction |