nerdexam
GIAC

GPEN · Question #224

Which of the following syntaxes is the correct syntax for the master.dbo.sp_makewebtask procedure?

The correct answer is B. sp_makewebtask [@outputfile =] 'outputfile', [@query =] 'query'. The sp_makewebtask procedure requires the @outputfile parameter to specify the HTML file destination and the @query parameter for the SQL query, with @outputfile listed first.

Web Application Penetration Testing

Question

Which of the following syntaxes is the correct syntax for the master.dbo.sp_makewebtask procedure?

Options

  • Asp_makewebtask [@inputfile =] 'inputfile', [@query =] 'query'
  • Bsp_makewebtask [@outputfile =] 'outputfile', [@query =] 'query'
  • Csp_makewebtask [@query =] 'query', [@inputfile =] 'inputfile'
  • Dsp_makewebtask [@query =] 'query', [@outputfile =] 'outputfile'

How the community answered

(18 responses)
  • A
    6% (1)
  • B
    72% (13)
  • C
    6% (1)
  • D
    17% (3)

Why each option

The sp_makewebtask procedure requires the @outputfile parameter to specify the HTML file destination and the @query parameter for the SQL query, with @outputfile listed first.

Asp_makewebtask [@inputfile =] 'inputfile', [@query =] 'query'

There is no @inputfile parameter in sp_makewebtask; the procedure generates output from a query and writes it to a file rather than reading from an input file.

Bsp_makewebtask [@outputfile =] 'outputfile', [@query =] 'query'Correct

The correct syntax for master.dbo.sp_makewebtask is sp_makewebtask [@outputfile =] 'outputfile', [@query =] 'query'. The @outputfile parameter designates the path where the generated HTML results will be written, and @query supplies the T-SQL statement to execute - these two are the required parameters and must appear in this order.

Csp_makewebtask [@query =] 'query', [@inputfile =] 'inputfile'

This option reverses the required parameter order and incorrectly uses @inputfile, which is not a valid parameter for sp_makewebtask.

Dsp_makewebtask [@query =] 'query', [@outputfile =] 'outputfile'

Although this option uses the correct @outputfile and @query parameters, the order is reversed - @outputfile must come before @query in the procedure signature.

Concept tested: SQL Server sp_makewebtask procedure parameter syntax

Source: https://learn.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-makewebtask-transact-sql

Topics

#sp_makewebtask#SQL Server#stored procedures#SQL injection

Community Discussion

No community discussion yet for this question.

Full GPEN Practice