Question about socket plugin
#1

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.
Reply
#2

no one will answer?
Reply
#3

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
Reply
#4

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
Reply
#5

but look at my last post, i requested to execute 2 same commands, (Command "HELP")

the first is executed but the other is not..
Reply
#6

Try concatenating your user/pass calls, so that they're not separated.
Reply
#7

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)