Summer Special 60% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: bestdeal

Free GIAC GPYC Practice Exam with Questions & Answers

Questions 1

Review the following code, written in Python. What are the contents of variable a?

GPYC Question 1

Options:
A.

'cat'/dog'/bird'/violet'

B.

'dandelion', 'rose', 'cat', 'violet', 'bird', 'dog'

C.

'violet'/rose'/dandelion'

D.

'cat'/dog'/bird'

GIAC GPYC Premium Access
Questions 2

A connection between a python raw socket server and a netcat client is being made over port 1100 on the same computer. The last command in the Python terminal is:

GPYC Question 2

What needs to be typed in the python terminal to display the input from the netcat session?

Options:
A.

Nothing, as the connection is complete

B.

connection.recv( 1024)

C.

print(remoteip)

D.

Nothing, port 1100 is too low to bind the python server to

Questions 3

Using the Python "sockets" module, which of the following functions looks up the IP address of www.giac.org ?

Options:
A.

socket.gethostbyaddr(" <a href="www.giac.org">www.giac.org</a> ")

B.

<a href="socket.nslookup.www.giac.org">socket.nslookup.www.giac.org</a>

C.

socket.get( <a href="www.giac.org)">www.giac.org)</a>

D.

socket. gethostbynameC'<a href="www.giac.org">www.giac.org</a> ")

Questions 4

What will the contents of the "__name__" variable be if the program "gpyc.py" is run as a standalone program?

Options:
A.

The name of the Python version used to create the module

B.

__main__

C.

The name of the GCC compiler used to compile the module

D.

gpyc

Questions 5

What does the LIMIT function restrict in an SQL SELECT statement?

Options:
A.

The number of queries that can be run against the table per second

B.

The number of records a table is permitted to hold

C.

The number of records that will be returned by a request

D.

The number of subsequent SELECT statements that can be run against the table

Questions 6

Which of the following modules allows a programmer to specify and spawn new processes, connect to their input and output pipes, and retrieve returned data?

Options:
A.

pip

B.

urllib2

C.

subprocess

D.

prochandle

Questions 7

What does the following command do?

pip search syslog

Options:
A.

Searches for python modules related to syslog

B.

Searches for functions in the syslog module

C.

Results in a syntax error for the pip function

D.

Determines whether the syslog module is loaded

Questions 8

What does the following line of code do?

Options:
A.

Sends the data stored in the variable "socket" to the IP address stored in AF_INET

B.

Gets data from all network sockets on the system

C.

Creates an instance of a UDP socket for transmitting or receiving data

D.

Transfers data from the local system to a remote system across the network

Questions 9

An attacker does not yet know the IP address of his target. He uses the "socket" module to create a backdoor program. He is writing the command to bind the computer's current IP address and port 4444 to the "backdoor" socket. Which command should he use?

Options:
A.

backdoor.bind(UDP, 4444)

B.

backdoor.bind()(4444)

C.

backdoor.bind((*))

D.

backdoor.bind(("",4444))

Questions 10

Which python regular expression method should be used to match any character in a-z, 0-

Options:
A.

\w

B.

Greedy matching

C.

A custom character set

D.

\w