This forum is in archive mode. You will not be able to post new content.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - soakingtub

Pages: [1]
1
C - C++ / Re: C++ Compiler Errors
« on: September 27, 2015, 12:15:10 PM »
It works! You're a legend! Thanks for your help!

2
C - C++ / Re: C++ Compiler Errors
« on: September 27, 2015, 04:21:51 AM »
Had a few more tries and it looks like the problem only happens when trying to compile to exe. If i compile with the switches "/EHsc /nologo /W4 /c" it compiles fine but no exe is generated, only the .obj file.
If i attempt to compile without any switches (to .exe) that's when the fatal errors occur. Any ideas?

3
C - C++ / Re: C++ Compiler Errors
« on: September 27, 2015, 01:56:03 AM »
Thanks! Is there a way to download the exe one it has been compiled at webcompiler? I tried compiling using the Visual Studio Developer Command Prompt and CL (cl ex.cpp) but received the following errors. Any ideas?

C:\temp>cl ex.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23026 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

ex.cpp
Microsoft (R) Incremental Linker Version 14.00.23026.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:ex.exe
ex.obj
ex.obj : error LNK2019: unresolved external symbol __imp__GetMessageA@16 referen
ced in function _WinMain@16
ex.obj : error LNK2019: unresolved external symbol __imp__TranslateMessage@4 ref
erenced in function _WinMain@16
ex.obj : error LNK2019: unresolved external symbol __imp__DispatchMessageA@4 ref
erenced in function _WinMain@16
ex.obj : error LNK2019: unresolved external symbol __imp__DefWindowProcA@16 refe
renced in function "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned
 int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)
ex.obj : error LNK2019: unresolved external symbol __imp__PostQuitMessage@4 refe
renced in function "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned
 int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)
ex.obj : error LNK2019: unresolved external symbol __imp__RegisterClassExA@4 ref
erenced in function _WinMain@16
ex.obj : error LNK2019: unresolved external symbol __imp__CreateWindowExA@48 ref
erenced in function _WinMain@16
ex.obj : error LNK2019: unresolved external symbol __imp__DestroyWindow@4 refere
nced in function "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned i
nt,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)
ex.obj : error LNK2019: unresolved external symbol __imp__ShowWindow@8 reference
d in function _WinMain@16
ex.obj : error LNK2019: unresolved external symbol __imp__FlashWindow@8 referenc
ed in function "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int
,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)
ex.obj : error LNK2019: unresolved external symbol __imp__keybd_event@16 referen
ced in function "void __stdcall leave(void)" (?leave@@YGXXZ)
ex.obj : error LNK2019: unresolved external symbol __imp__SetTimer@16 referenced
 in function "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,l
ong)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)
ex.obj : error LNK2019: unresolved external symbol __imp__KillTimer@8 referenced
 in function "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,l
ong)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)
ex.obj : error LNK2019: unresolved external symbol __imp__UpdateWindow@4 referen
ced in function _WinMain@16
ex.obj : error LNK2019: unresolved external symbol __imp__ShellExecuteA@24 refer
enced in function _WinMain@16
ex.exe : fatal error LNK1120: 15 unresolved externals

4
C - C++ / C++ Compiler Errors
« on: September 24, 2015, 04:56:34 AM »
I'm trying to compile https://www.exploit-db.com/exploits/37098/ to test on my WinXP VM but i'm getting the following compiler errors. Any ideas on how i can resolve these? Thanks!

root@kali:~/.wine/drive_c/MinGW/bin# wine g++ ex.cpp -o ex.exe
ex.h:9:20: error: typedef 'NTSTATUS' is initialized (use decltype instead)
typedef NTSTATUS ( WINAPI *_ZwAllocateVirtualMemory ) (
^
ex.h:9:20: error: expected primary-expression before '__attribute__'
typedef NTSTATUS ( WINAPI *_ZwAllocateVirtualMemory ) (
^
ex.h:18:20: error: typedef 'NTSTATUS' is initialized (use decltype instead)
typedef NTSTATUS ( WINAPI *_PsLookupProcessByProcessId ) (
^
ex.h:18:20: error: expected primary-expression before '__attribute__'
typedef NTSTATUS ( WINAPI *_PsLookupProcessByProcessId ) (
^
In file included from ex.cpp:14:0:
ex.h:24:5: warning: '__stdcall__' attribute only applies to function types [-Wattributes]
_Inout_ PVOID Process
^
ex.h:24:5: error: typedef '_PsReferencePrimaryToken' is initialized (use decltype instead)
ex.h:24:5: error: '_Inout_' was not declared in this scope
ex.h:32:20: error: typedef 'NTSTATUS' is initialized (use decltype instead)
typedef NTSTATUS ( WINAPI *_ZwQuerySystemInformation ) (
^
ex.h:32:20: error: expected primary-expression before '__attribute__'
typedef NTSTATUS ( WINAPI *_ZwQuerySystemInformation ) (
^
ex.cpp:16:1: error: '_ZwAllocateVirtualMemory' does not name a type
_ZwAllocateVirtualMemory ZwAllocateVirtualMemory;
^
ex.cpp:17:1: error: '_PsLookupProcessByProcessId' does not name a type
_PsLookupProcessByProcessId PsLookupProcessByProcessId;
^
ex.cpp:18:1: error: '_PsReferencePrimaryToken' does not name a type
_PsReferencePrimaryToken PsReferencePrimaryToken;
^
ex.cpp: In function 'DWORD_PTR pti()':
ex.cpp:29:47: error: '__readfsdword' was not declared in this scope
LPBYTE p = ( LPBYTE ) __readfsdword( 0x18 );
^
ex.cpp: In function 'BOOL Init()':
ex.cpp:67:5: error: '__try' was not declared in this scope
__try {
^
ex.cpp:67:11: error: expected ';' before '{' token
__try {
^
ex.cpp:286:1: error: expected '}' at end of input
}
^

Pages: [1]


Want to be here? Contact Ande, Factionwars or Kulverstukas on the forum or at IRC.