#!/bin/bash # Indirect variable referencing. # This has a few of the attributes of references in C++. a=letter_of_alphabet letter_of_alphabet=z echo "a = $a" # Direct reference. echo "Now a = ${!a}" # Indirect reference. # The ${!variable} notation is more intuitive than the old #+ eval var1=\$$var2 echo t=table_cell_3 table_cell_3=24 echo "t = ${!t}" # t = 24 table_cell_3=387 echo "Value of t changed to ${!t}" # 387 # No 'eval' necessary. # This is useful for referencing members of an array or table, #+ or for simulating a multi-dimensional array. # An indexing option (analogous to pointer arithmetic) #+ would have been nice. Sigh. exit 0 # See also, ind-ref.sh example.
Last updated 4 Aug 11 Course Title: OWASP Top 10 Threats and Mitigation Exam Questions - Single Select 1) Which of the following consequences is most likely to occur due to an injection attack? Spoofing Cross-site request forgery Denial of service Correct Insecure direct object references 2) Your application is created using a language that does not support a clear distinction between code and data. Which vulnerability is most likely to occur in your application? Injection Correct Insecure direct object references Failure to restrict URL access Insufficient transport layer protection 3) Which of the following scenarios is most likely to cause an injection attack? Unvalidated input is embedded in an instruction stream. Correct Unvalidated input can be distinguished from valid instructions. A Web application does not validate a client’s access to a resource. A Web action performs an operation on behalf of the user without checkin...
Comments
Post a Comment
https://gengwg.blogspot.com/