• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 5 pages
Exam (elaborations)

D385: FINAL EXAM AND ALL CORRECT ANSWERS UPDATED.

Document preview thumbnail
Preview 2 out of 5 pages

What is Defensive Programming? - Answer - assume mistakes will happen and guard against them - assertions are the most common way of doing this - code checks itself as it runs - always check, validate, and sanitize data Which attribute provides a dictionary of breakpoint instances? - Answer - bplist - maintains a (file, line) tuple of breakpoints Which function can be used to return all set breakpoints? - Answer - get_all_breaks( ) - returns a string with all set breakpoints Which 3 data types are considered user-provided? - Answer - cookies - POST data payloads - URL parameters What are limitations of Static Code Analysis - Answer - does not account for runtime vulnerabilities - requires the tester to posses both testing and software development skills - tools would have to be language specific Advantage of Static Code Analysis? - Answer - fast turnaround time - especially when tools are used Advantage of Dynamic Code Analysis? - Answer - no need to understand how to write software - finds runtime vulnerabilities - requires only a running system; conducted on any application Limitations of Dynamic Code Analysis? - Answer - false positives and false negatives - dependent on the correctness of the rules - false sense of security

Content preview

D385: FINAL EXAM AND ALL CORRECT
ANSWERS 2026-2027 UPDATED.
What is Defensive Programming? - Answer - assume mistakes will happen and guard against
them

- assertions are the most common way of doing this

- code checks itself as it runs

- always check, validate, and sanitize data



Which attribute provides a dictionary of breakpoint instances? - Answer - bplist

- maintains a (file, line) tuple of breakpoints



Which function can be used to return all set breakpoints? - Answer - get_all_breaks( )

- returns a string with all set breakpoints



Which 3 data types are considered user-provided? - Answer - cookies

- POST data payloads

- URL parameters



What are limitations of Static Code Analysis - Answer - does not account for runtime
vulnerabilities

- requires the tester to posses both testing and software development skills

- tools would have to be language specific



Advantage of Static Code Analysis? - Answer - fast turnaround time

- especially when tools are used



Advantage of Dynamic Code Analysis? - Answer - no need to understand how to write
software

- finds runtime vulnerabilities

- requires only a running system; conducted on any application



Limitations of Dynamic Code Analysis? - Answer - false positives and false negatives

- dependent on the correctness of the rules

- false sense of security

, - difficult to trace back to exact location



What kind of attacks does Client-side Testing look to prevent? - Answer - XSS

- SQLi

- CORS

- Clickjacking

- HTML injection



Secure Unit Testing - Answer - check for bad input

- bypass security

- inject bad data



How to hash with sha256 in Python? - Answer import hashlibsha256 =
hashlib.sha256()sha256.update(b'message')hash = sha256.hexdigest()



Examples of Block Ciphers? - Answer - Triple DES

- Blowfish

- Twofish

- AES



Examples of Stream Ciphers? - Answer - RC4

- ChaCha



TLS Handshake: 3 Tasks - Answer 1. cipher suite negotiation

2. key exchange

3. server authentication



Set-Cookie Response Header 5 Directives? - Answer - HttpOnly

- SameSite

- Secure

- Domain

- Max-Age



Secure Directive - Answer - prevents MITM

- ensures cookie transmitted over HTTPS

Document information

Uploaded on
September 10, 2026
Number of pages
5
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$13.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
COCOSOLUTIONS
4.1
(38)
Sold
230
Followers
16
Items
9625
Last sold
17 hours ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions