Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5929029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:22:01+00:00 2026-05-22T14:22:01+00:00

Is there a tool which given a cgi program, and the arguments (query string,

  • 0

Is there a tool which given a cgi program, and the arguments (query string, method, file to upload, etc.) would set the correct environment variables, and execute this program (with or without a debugger.

Something like this perl script, only more solid, with a more clear output and input, support for files, etc.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T14:22:02+00:00Added an answer on May 22, 2026 at 2:22 pm

    Well, a new open source project was born from this question. I’m copying my answer from here.

    If you just want to see your CGI running, you can use my tiny runCGI project.

    All you need is to set a yaml file which looks something like this

    _exec: /var/cgi-bin/myfile.cgi
    method: GET
    query_string:
      q: s
    

    and then run

    ./runCGI myyamlfile.yaml
    

    You will see the output on the console’s standard output.

    You can even debug it with gdb, debug runCGI gdb runCGI, run with the correct parameters (run someyaml.yaml), issue tcatch exec (tcatch catches it only once) and then set breakpoints to your CGI file:

    $ g++ a.cc -o a.out
    $ cat a.yaml
    method: GET
    _exec: a.out
    $ gdb runCGI
    GNU gdb 6.8-debian
    Copyright (C) 2008 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86_64-linux-gnu"...
    (gdb) tcatch exec
    Catchpoint 1 (exec)
    (gdb) run a.yaml
    Starting program: /home/elazar/runCGI/runCGI a.yaml
    Executing new program: /home/elazar/runCGI/a.out
    0x00007fc3a24a6a60 in ?? () from /lib64/ld-linux-x86-64.so.2
    (gdb) tbreak main
    Breakpoint 2 at 0x400577: file a.cc, line 2.
    (gdb) c
    Continuing.
    main (argc=1, argv=0x7fff14891408) at a.cc:2
    2       int a =0;
    (gdb)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a tool available which would convert the sources given into HTML with
Is there a tool for Java which, given a set of JUnit tests, and
I am wondering if there is a tool or technique which, given a BNF
Is there a tool which tells you (or gives you a hint) why a
Is there a tool which traces & logs all RMI activity of a Java
Is there a tool which is able to parse my source code (fortran, C
Is there a tool available which will convert source code in Perl to source
Is there any reporting tool which offers multilingual support (namely English en-US and Arabic
Is there a tool or script which easily merges a bunch of JAR files
Is there a tool (preferably free) which will translate Oracle's PL/SQL stored procedure language

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.