|
#include "lrs.h"
extern char *strtok(char *string, const char *delimiters );
Action()
{
char *BufVal;
char *token;
char hostport[255];
char portinfo[8];
char PortNum[255];
char cVal[8];
char cHighVal[8];
char cLowVal[8];
int iVal,iLength,i,j;
lrs_create_socket("socket0", "TCP", "LocalHost=0", "RemoteHost=192.168.0.100:21", LrsLastArg);
lrs_send("socket0","vpnbuf0",LrsLastArg);
lrs_receive("socket0", "buf0", LrsLastArg);
lrs_send("socket0", "buf1", LrsLastArg);
lrs_receive("socket0", "buf2", LrsLastArg);
lrs_send("socket0", "buf3", LrsLastArg);
lrs_receive("socket0", "buf4", LrsLastArg);
//send PASV
lrs_send("socket0", "pasvbuf0", LrsLastArg);
lrs_receive("socket0", "pasvbuf1", LrsLastArg);
// Get the Local Port of the Local Host on socket0*/
lrs_get_last_received_buffer("socket0",&BufVal,&iLength);
lr_output_message("The buffer is:%s", BufVal);
strcpy(PortNum,BufVal);
// lr_output_message("PortNum Conetnt %s", PortNum);
for(i=0,j=40;i |
|
|