Question about socket plugin - 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: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Question about socket plugin (
/showthread.php?tid=357673)
Problem with Socket Plugin -
Kirollos - 08.07.2012
Well
i am having problems,
here it is the code
pawn Код:
new Socket:MySocket = socket_create(TCP);
if(is_socket_valid(MySocket)) {
socket_connect(MySocket, "ftpserver.com", 21);
socket_send(MySocket, "USER kirollos\r\n");
socket_send(MySocket, "PASS password\r\n");
}
now i made socket answer logs. when i open it. i find written
Код:
220 FTP Server ready.
331 Password required for kirollos
500 Invalid command: try being more creative
i am really confused from this.
Re: Problem with Socket Plugin -
Kirollos - 08.07.2012
no one will answer?
Re: Problem about socket plugin -
Kirollos - 10.07.2012
sorry for triple posting but,
i tried writing
pawn Код:
socket_send(MySocket, "HELP\r\n");
socket_send(MySocket, "HELP\r\n");
and the result
Код:
220 FTP Server ready.
214-The following commands are recognized (* =>'s unimplemented):
CWD XCWD CDUP XCUP SMNT* QUIT PORT PASV
EPRT EPSV ALLO* RNFR RNTO DELE MDTM RMD
XRMD MKD XMKD PWD XPWD SIZE SYST HELP
NOOP FEAT OPTS AUTH* CCC* CONF* ENC* MIC*
PBSZ* PROT* TYPE STRU MODE RETR STOR STOU
APPE REST ABOR USER PASS ACCT* REIN* LIST
NLST STAT SITE MLSD MLST
214 Direct comments to root@localhost
500 Invalid command: try being more creative
Re: Question about socket plugin -
FUNExtreme - 13.07.2012
It might be a reaction to the fact that "password" as PASS is just to obvious and not allowed by the FTP server..
(Probably password just replaces your real pass, but meh.. It is a start)
Just a guess
Re: Question about socket plugin -
Kirollos - 13.07.2012
but look at my last post, i requested to execute 2 same commands, (Command "HELP")
the first is executed but the other is not..
Re: Question about socket plugin -
Joe Staff - 13.07.2012
Try concatenating your user/pass calls, so that they're not separated.
Re: Question about socket plugin -
AndreT - 13.07.2012
Try another line ending perhaps. Try just \n. Something makes me think that it registers the other line ending as a part of the next command.
I've taken the similar pitfall with PHP myself once.