mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 01:26:42 +03:00
new program for running command prompt commands
This commit is contained in:
parent
9c014c0fd0
commit
60366f7168
7
extra/runcmd/README.txt
Normal file
7
extra/runcmd/README.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
Files in this folder can be used to compile auxiliary program that can
|
||||
be used for running command prompt commands skipping standard "cmd /c" way.
|
||||
They are licensed under the terms of the GNU Lesser General Public License
|
||||
and it's compiled version is available on the official sqlmap subversion
|
||||
repository[1].
|
||||
|
||||
[1] https://svn.sqlmap.org/sqlmap/trunk/sqlmap/shell/runcmd.exe_
|
1
extra/runcmd/windows/README.txt
Normal file
1
extra/runcmd/windows/README.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Compile only the Release version because the Runtime library option (Project Properties -> Configuration Properties -> C/C++ -> Code Generation) is set to "Multi-threaded (/MT)", which statically links everything into executable and doesn't compile Debug version at all.
|
BIN
extra/runcmd/windows/runcmd.sln
Normal file
BIN
extra/runcmd/windows/runcmd.sln
Normal file
Binary file not shown.
46
extra/runcmd/windows/runcmd/runcmd.cpp
Normal file
46
extra/runcmd/windows/runcmd/runcmd.cpp
Normal file
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
runcmd - a program for running command prompt commands
|
||||
Copyright (C) 2010 Miroslav Stampar
|
||||
email: miroslav.stampar@gmail.com
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
#include <use_ansi.h>
|
||||
#include "stdafx.h"
|
||||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
FILE *fp;
|
||||
string cmd;
|
||||
|
||||
for( int count = 1; count < argc; count++ )
|
||||
cmd += " " + string(argv[count]);
|
||||
|
||||
fp = _popen(cmd.c_str(), "r");
|
||||
|
||||
if (fp != NULL) {
|
||||
char buffer[BUFSIZ];
|
||||
|
||||
while (fgets(buffer, sizeof buffer, fp) != NULL)
|
||||
fputs(buffer, stdout);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
BIN
extra/runcmd/windows/runcmd/runcmd.vcproj
Normal file
BIN
extra/runcmd/windows/runcmd/runcmd.vcproj
Normal file
Binary file not shown.
8
extra/runcmd/windows/runcmd/stdafx.cpp
Normal file
8
extra/runcmd/windows/runcmd/stdafx.cpp
Normal file
|
@ -0,0 +1,8 @@
|
|||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// runcmd.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: reference any additional headers you need in STDAFX.H
|
||||
// and not in this file
|
17
extra/runcmd/windows/runcmd/stdafx.h
Normal file
17
extra/runcmd/windows/runcmd/stdafx.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later.
|
||||
#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <tchar.h>
|
||||
|
||||
|
||||
|
||||
// TODO: reference additional headers your program requires here
|
BIN
shell/runcmd.exe_
Normal file
BIN
shell/runcmd.exe_
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user