SA-MP Forums Archive
[Plugin] [REL] pwncurl 0.1 (download websites with pawn) (help with win-compile needed!!) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Plugin Development (https://sampforum.blast.hk/forumdisplay.php?fid=18)
+--- Thread: [Plugin] [REL] pwncurl 0.1 (download websites with pawn) (help with win-compile needed!!) (/showthread.php?tid=72260)

Pages: 1 2 3


[REL] pwncurl 0.1 (download websites with pawn) (help with win-compile needed!!) - DracoBlue - 07.04.2009

Hello,

I want to release this little plugin, which is doing not much, but downloading websites (synchron) so I can use them inside of the samp-server.

pwncurl 0.1
o Download (22KB)

Usful addons
o urlencode (pwn, useful for encoding parameters in url)

HELP needed!
_________________________________________________
Currently I can only provide a pwncurl.so (for linux) and the source code, since I was not able to compile it on windows, yet. I would like to compile it on mingw-environment or something like that, to have no dependency to the visual studio runtime environment.
--> Ticket#2 precompiled pwncurl.dll for windows is not available, yet
Experimental Windows Versions available by Killerkid. & JeNkStAX.
_________________________________________________

What for?
Initially I made this for my clientside anticheat-protection to coordinate the servers, but I guess one could implement an automated filterscript/gamemode version detection by using this . Or dictionary services? No idea what's all possible, if you have access to websites content from ingame! If you need _more_ then please check out Boylett's xSockets instead.

Example
Код:
 new uri[255];
 format(uri, 255, "%s", "http://example.org");
 new content[1024];
 pwncurl_get(uri,content,1024);
 printf("Content of uri %s is %s", uri, content);
Regards,
DracoBlue


Re: [REL] pwncurl 0.1 (download websites with pawn) - gijsmin - 07.04.2009

WOW Great!


Re: [REL] pwncurl 0.1 (download websites with pawn) - mako - 07.04.2009

I just wanted to start to make my first own plugin - but this is exactly what I was looking for ;-P
I think I'll start making plugins later, that's much more comfortable this way.
(want to use us it to request a xml file from the internet)


Re: [REL] pwncurl 0.1 (download websites with pawn) - lavamike - 07.04.2009

Looks very nice!

But it's not windows?


Re: [REL] pwncurl 0.1 (download websites with pawn) - DracoBlue - 07.04.2009

Quote:
Originally Posted by lavamike
Looks very nice!

But it's not windows?
Will compile it for windows soon, and add it to the download.

- Draco


Re: [REL] pwncurl 0.1 (download websites with pawn) - boylett - 07.04.2009

Nice


Re: [REL] pwncurl 0.1 (download websites with pawn) - Killerkid - 07.04.2009

Quote:
Originally Posted by lavamike
Looks very nice!

But it's not windows? :'(
Here is one I compiled: http://files.uploadffs.com/2/7abd2565/pwncurl.dll


Re: [REL] pwncurl 0.1 (download websites with pawn) - DracoBlue - 08.04.2009

Quote:
Originally Posted by Killerkid.
Quote:
Originally Posted by lavamike
Looks very nice!

But it's not windows? :'(
Here is one I compiled: http://files.uploadffs.com/2/7abd2565/pwncurl.dll
Seems not to work for everyone (especially not for me )

Quote:
Originally Posted by EvenemE date=1239165473
Doesn't work with windows yet : (
Yes, serverside is only compiled for linux (and easy compiles for linux ...), yet. It would be great, if somebody could help compiling for windows.
I made a Ticket about that: http://dev.webdevberlin.com/issues/show/2 , please contribute there.

- Draco


Re: [REL] pwncurl 0.1 (download websites with pawn) (help with win-compile neede - CracK - 11.04.2009

Trying to compile the plugin on windows I get this:
Код:
--------------------Configuration: pwncurl - Debug--------------------
Compiling source file(s)...
pwncurl.cpp
In file included from E:\Downloads\pwncurl_0_1\pwncurl_src\pwncurl.cpp:37:
E:\Downloads\pwncurl_0_1\pwncurl_src\AMX_SDK\plugincommon.h:36: warning: ignoring
#pragma message
E:\Downloads\pwncurl_0_1\pwncurl_src\pwncurl.cpp: In function `cell
n_pwncurl_get(AMX*, cell*)':
E:\Downloads\pwncurl_0_1\pwncurl_src\pwncurl.cpp:95: error: `_alloca'
undeclared (first use this function)
E:\Downloads\pwncurl_0_1\pwncurl_src\pwncurl.cpp:95: error: (Each undeclared
identifier is reported only once for each function it appears in.)

pwncurl.dll - 2 error(s), 1 warning(s)
How to fix this? (I am using MinGW Developer Studio)


Re: [REL] pwncurl 0.1 (download websites with pawn) (help with win-compile neede - max007 - 11.04.2009

this plugin does not work for me


Re: [REL] pwncurl 0.1 (download websites with pawn) (help with win-compile needed!!) - gijsmin - 11.04.2009

Quote:
Originally Posted by max007
this plugin does not work for me
u use Windows?


Re: [REL] pwncurl 0.1 (download websites with pawn) (help with win-compile neede - Eraz0r - 13.04.2009

Quote:
Originally Posted by CrαcK
Trying to compile the plugin on windows I get this:
Код:
--------------------Configuration: pwncurl - Debug--------------------
Compiling source file(s)...
pwncurl.cpp
In file included from E:\Downloads\pwncurl_0_1\pwncurl_src\pwncurl.cpp:37:
E:\Downloads\pwncurl_0_1\pwncurl_src\AMX_SDK\plugincommon.h:36: warning: ignoring
#pragma message
E:\Downloads\pwncurl_0_1\pwncurl_src\pwncurl.cpp: In function `cell
n_pwncurl_get(AMX*, cell*)':
E:\Downloads\pwncurl_0_1\pwncurl_src\pwncurl.cpp:95: error: `_alloca'
undeclared (first use this function)
E:\Downloads\pwncurl_0_1\pwncurl_src\pwncurl.cpp:95: error: (Each undeclared
identifier is reported only once for each function it appears in.)

pwncurl.dll - 2 error(s), 1 warning(s)
How to fix this? (I am using MinGW Developer Studio)
U must include malloc.h to manually allocate the memory


Re: [REL] pwncurl 0.1 (download websites with pawn) (help with win-compile neede - CracK - 13.04.2009

I am a total newbie in this... that's why I simply don't know how to fix these ones
Another couple of errors:
Код:
--------------------Configuration: pwncurl - Release--------------------
Linking...
Creating library file: G:\pwncurl\Release\libpwncurl.dll.a
G:\pwncurl\Release\pwncurl.o(.text+0xac):pwncurl.cpp: undefined reference to `pAMXFunctions'
G:\pwncurl\Release\pwncurl.o(.text+0x14c):pwncurl.cpp: undefined reference to `amx_GetAddr'
G:\pwncurl\Release\pwncurl.o(.text+0x15e):pwncurl.cpp: undefined reference to `amx_StrLen'
G:\pwncurl\Release\pwncurl.o(.text+0x194):pwncurl.cpp: undefined reference to `amx_GetString'
G:\pwncurl\Release\pwncurl.o(.text+0x1a9):pwncurl.cpp: undefined reference to `_imp__curl_easy_init'
G:\pwncurl\Release\pwncurl.o(.text+0x1f9):pwncurl.cpp: undefined reference to `_imp__curl_easy_setopt'
G:\pwncurl\Release\pwncurl.o(.text+0x20e):pwncurl.cpp: undefined reference to `_imp__curl_easy_setopt'
G:\pwncurl\Release\pwncurl.o(.text+0x227):pwncurl.cpp: undefined reference to `_imp__curl_easy_setopt'
G:\pwncurl\Release\pwncurl.o(.text+0x240):pwncurl.cpp: undefined reference to `_imp__curl_easy_setopt'
G:\pwncurl\Release\pwncurl.o(.text+0x259):pwncurl.cpp: undefined reference to `_imp__curl_easy_setopt'
G:\pwncurl\Release\pwncurl.o(.text+0x272):pwncurl.cpp: more undefined references to `_imp__curl_easy_setopt' follow
G:\pwncurl\Release\pwncurl.o(.text+0x27b):pwncurl.cpp: undefined reference to `_imp__curl_easy_perform'
G:\pwncurl\Release\pwncurl.o(.text+0x286):pwncurl.cpp: undefined reference to `_imp__curl_easy_cleanup'
G:\pwncurl\Release\pwncurl.o(.text+0x2a3):pwncurl.cpp: undefined reference to `amx_GetAddr'
G:\pwncurl\Release\pwncurl.o(.text+0x2ce):pwncurl.cpp: undefined reference to `amx_SetString'
G:\pwncurl\Release\pwncurl.o(.text+0x38d):pwncurl.cpp: undefined reference to `amx_Register'

pwncurl.dll - 15 error(s), 0 warning(s)



Re: [REL] pwncurl 0.1 (download websites with pawn) (help with win-compile neede - ICECOLDKILLAK8 - 13.04.2009

Quote:
Originally Posted by CrαcK
I am a total newbie in this... that's why I simply don't know how to fix these ones
Another couple of errors:
Код:
--------------------Configuration: pwncurl - Release--------------------
Linking...
Creating library file: G:\pwncurl\Release\libpwncurl.dll.a
G:\pwncurl\Release\pwncurl.o(.text+0xac):pwncurl.cpp: undefined reference to `pAMXFunctions'
G:\pwncurl\Release\pwncurl.o(.text+0x14c):pwncurl.cpp: undefined reference to `amx_GetAddr'
G:\pwncurl\Release\pwncurl.o(.text+0x15e):pwncurl.cpp: undefined reference to `amx_StrLen'
G:\pwncurl\Release\pwncurl.o(.text+0x194):pwncurl.cpp: undefined reference to `amx_GetString'
G:\pwncurl\Release\pwncurl.o(.text+0x1a9):pwncurl.cpp: undefined reference to `_imp__curl_easy_init'
G:\pwncurl\Release\pwncurl.o(.text+0x1f9):pwncurl.cpp: undefined reference to `_imp__curl_easy_setopt'
G:\pwncurl\Release\pwncurl.o(.text+0x20e):pwncurl.cpp: undefined reference to `_imp__curl_easy_setopt'
G:\pwncurl\Release\pwncurl.o(.text+0x227):pwncurl.cpp: undefined reference to `_imp__curl_easy_setopt'
G:\pwncurl\Release\pwncurl.o(.text+0x240):pwncurl.cpp: undefined reference to `_imp__curl_easy_setopt'
G:\pwncurl\Release\pwncurl.o(.text+0x259):pwncurl.cpp: undefined reference to `_imp__curl_easy_setopt'
G:\pwncurl\Release\pwncurl.o(.text+0x272):pwncurl.cpp: more undefined references to `_imp__curl_easy_setopt' follow
G:\pwncurl\Release\pwncurl.o(.text+0x27b):pwncurl.cpp: undefined reference to `_imp__curl_easy_perform'
G:\pwncurl\Release\pwncurl.o(.text+0x286):pwncurl.cpp: undefined reference to `_imp__curl_easy_cleanup'
G:\pwncurl\Release\pwncurl.o(.text+0x2a3):pwncurl.cpp: undefined reference to `amx_GetAddr'
G:\pwncurl\Release\pwncurl.o(.text+0x2ce):pwncurl.cpp: undefined reference to `amx_SetString'
G:\pwncurl\Release\pwncurl.o(.text+0x38d):pwncurl.cpp: undefined reference to `amx_Register'

pwncurl.dll - 15 error(s), 0 warning(s)
You need to include the libcurl.lib or libcurl.lib source files into your project, You also need to include the libcurl includes into your project


Re: [REL] pwncurl 0.1 (download websites with pawn) (help with win-compile needed!!) - DMSOrg - 16.04.2009

It's gonna be really great to see this on windows!


Re: [REL] pwncurl 0.1 (download websites with pawn) (help with win-compile neede - DracoBlue - 17.04.2009

Hey Crack did you have any luck with compiling pwncurl on windows, using mingw, yet?

Would be cool to have a tutorial on how to get it working!

- Draco


Re: [REL] pwncurl 0.1 (download websites with pawn) (help with win-compile neede - CracK - 17.04.2009

Not yet. JeNkStAX said, that I should include a library of libcurl. I found this page about libraries...
But this doesn't help me, I don't know what exactly I should type in the projects>settings>link>libraries.

I tried a lot of combinations (-llibcurl, -lcurl, -l curl e.t.c.) but compiler still says: "cannot find library"...


Re: [REL] pwncurl 0.1 (download websites with pawn) (help with win-compile needed!!) - Amit_B - 17.04.2009

Don't work for me
After writting "plugins pwncurl.so" in server.cfg,
and running the server,
the gamemode become "Unknown".


Re: [REL] pwncurl 0.1 (download websites with pawn) (help with win-compile needed!!) - max007 - 17.04.2009

Quote:
Originally Posted by Amit B
Don't work for me
After writting "plugins pwncurl.so" in server.cfg,
and running the server,
the gamemode become "Unknown".
Same error

Quote:
Originally Posted by Gijsmin (Spot-host.co.uk)
Quote:
Originally Posted by max007
this plugin does not work for me
u use Windows?
yes i do, but it doesnґt run on linux... gamemode becomes "UNKNOWN"


Re: [REL] pwncurl 0.1 (download websites with pawn) (help with win-compile needed!!) - DracoBlue - 17.04.2009

What does the server_log.txt say?

Did you compiled the plugin on your own (doing "make" in pwncurl_src folder, does that automaticly for you)?

- Draco