cgi

Send form to cgi with jQuery

别等时光非礼了梦想. 提交于 2019-12-25 06:18:39
问题 I want to send a form and control what happens after with jQuery. I cannot use php . My server have cgi to process the data. How to send the form to the cgi using jQuery?. I don't know how to do it but I tried things like this: $(function(){ var name = $("input:text").val("name"); ; $(":submit").click(function(e){ e.preventDefault(); load("http://cgi.myDomain.com/FormMail.pl", ( name )); }); }) The html: <Form id="formulari" method="POST" action="http://cgi.aDomain/FormMail.pl"> <p> <input

Is MySQL Connector C++ cgi program vulnerable to MySQL injection just like php is?

亡梦爱人 提交于 2019-12-25 04:36:11
问题 I am making a cgi program using C++ . It allows users to register their information on the website and also login. I am worried about security . Normally, MySQL is vulnerable to MySQL injection when using php to receive form. I am using the MySQL Connector/C++ API. When using C++ , does the method of MySQL injection work on cgi programs? Is the C++ cgi program still vulnerable to MySQL injection ? I know that cgi programs has their own security problems such as buffer overflow but I am asking

Accessing http upload data before upload completion

拥有回忆 提交于 2019-12-25 04:35:06
问题 Is there any way to access a file being uploaded over http using a CGI script before the upload finishes? For example, say a 10 megabyte file is being uploaded, and is exactly 10% done, meaning the server has 1 megabyte of data. Is it possible to read that 1 megabyte of data without waiting for the upload to finish? My understanding of http uploads is that the server won't call the CGI script handling the upload until all of the data is received, but I'm hoping there's some way around that. I

Using BeautifulSoup in CGI without installing

柔情痞子 提交于 2019-12-25 04:22:57
问题 I am trying to build a simple scraper in Python, which will run on a Webserver via CGI. Basically it will return a value determined by a parameter passed to it in a URL. I need BeautifulSoup to do the processing of HTML pages on the webserver. However, I'm using HelioHost, which doesn't give me shell access or pip etc. I can only use FTP. One the BS website, it says you can directly extract it and use it without installing. So I got the tarball on my Win7 machine, used 7-zip to remove bz2

How do I call perl cgi script from another perl cgi script

这一生的挚爱 提交于 2019-12-25 03:27:15
问题 I have a cgi script which takes few parameter like below. testScript.cgi?arg=1&arg2=SomeThingElse&arg3=otherThing..... The above script works well and perfectly. Now I have another perl cgi script called mySecondScript.cgi . It does its own thing but I want to call textScript.cgi with arguments which are calculated in this script. How do I do that. Any elegant solution will be appreciated. 回答1: You probably want to use LWP::Simple to call the second program. Inside mySecondScript.cgi you

How can I call curl from a Perl CGI script?

余生颓废 提交于 2019-12-25 03:12:27
问题 I have a CGI (perl) script that is attempting to call curl using the open command: @curl = ('/usr/bin/curl', '-S','-v','--location', $url, '-H', 'Content-Type:'.$content_type, '-H', "Authorization: $authorization", '-H', "X-Gdata-Key:$gdata_key", '-H', "Content-Length:$content_length", '-H','GData-Version:2', '--data',"\@$filename"); And then executed like so: open CURL, "-|", @curl; The program works perfectly from the command line, but when I try to run it in the browser, the page ends up

Python CGI: How to redirect to another page after processing POST data

北战南征 提交于 2019-12-25 02:28:20
问题 I'm trying to write a Python script, in pyscripts/find_match.py that will process data received from a POST in an upload.php page, send it to connect.php and then redirect to another PHP page, response.php that will display information based on my processed data and that has an <?php include '/connect_database.php';?> line. Up till now, I am able to get the POST info, process it and send it through a JSON to connect.php, but I am not able to make find_match.py redirect to response.php. My

How To Write a perl cgi script which keeps on flushing with current time in the same browser instead of printing alist of times [duplicate]

我与影子孤独终老i 提交于 2019-12-25 00:26:13
问题 This question already has an answer here : Closed 7 years ago . Possible Duplicate: Reg: Perl CGI script Autoupdate with New Data A perl CGI script continuosly updating the time, instead of creating a time list #!C:/perl/bin/perl.exe use warnings; use strict; use CGI; local $| = 1; my $cgi = new CGI; my $string = localtime(); print $cgi->header(); print $cgi->start_html("Welcome"); print $cgi->h1("$string"); print $cgi->end_html(); print $cgi->header(); print $cgi->start_html("Welcome");

How do I get it to display the result on the original HTML page after executing a CGI script?

喜你入骨 提交于 2019-12-24 18:39:18
问题 I would like to display the result of a CGI script on the original HTML page. The best way is to trigger the CGI process with a click on a button but not reload the page. I read this about Ajax, but how can I integrate the result of the CGI script into the HTML page? #!/usr/bin/python2.7 # -*- encoding: utf-8 -*- import cgi, cgitb import time import os import mmap form = cgi.FieldStorage() password = form.getvalue('passwordcheck') inputformular = form.getvalue('myfield') x=inputformular print

Python Redirect not working

强颜欢笑 提交于 2019-12-24 17:19:40
问题 I'm trying to redirect the user to my homepage. Its suppose to be as simple as print "Location:http://localhost:8000/index.html" print "" This isn't working for some reason. I'm running CGIHTTPServer on Kali Linux. I'm using Python 2.7.3 When I try to run the script it simply prints out Location:http://localhost:8000/index.html I have also tried using 127.0.0.1 instead of localhost. It doesn't work either.Here is the CGI script that I'm trying to run #!/usr/bin/python import MySQLdb,cgi, os,