All pastes #502153 Raw Edit

Untitled

public text v1 · immutable
·published 2007-05-22 11:40 UTC
rendered paste body
#include <stdio.h>
#include <stdlib.h>

/* prototypes */
void serverBuilder(void);
void connectionStatus(void);
void manualConnect(void);

int main(void)
{
	char option = 0;

	puts(	"##########################################\n"
        	"##              Achilles 1.0             ##\n"
        	"##          Created By Ice_Dragon        ##\n"
        	"###########################################\n\n\n\n");

	puts("What do you want to do?");

	puts(	"###########################################\n"
    		"## [1] - Server Builder                  ##\n"
        	"## [2] - Connection Status               ##\n"
       		"## [3] - Manual Connect                  ##\n"
        	"## [4] - Live Help                       ##\n"
       		"## [5] - About                           ##\n"
        	"###########################################\n");

	printf("Option: ");
	option = fgetc(stdin);
	
	switch(option)
	{
		case '1':
			serverBuilder();
		break;

		case '2':
			connectionStatus();
		break;
		
		case '3':
			manualConnect();
		break;

		default:
			perror("Invalid option");
			return 1;
	}
	return 0;
}

void serverBuilder(void)
{
	char buff[128];
	char ip[64];
	char filename[128]
	unsigned short int port = 0;
	

	puts(	"###############################################\n"
       		"##           Achilles Server Builder         ##\n"
      		"##                                           ##\n"
        	"###############################################\n");

	/* get IP */
	puts("Please Enter Your Static IP Address / DNS :");
	fgets(ip, sizeof(ip), stdin);

	/* get port */
	puts("Please Enter A Port To Connect To:");
	fgets(buff, sizeof(buff), stdin);
	port = atoi(buff);

	/* get the filename */
	puts("Please Enter A FileName (e,g; server.exe) :");
	fgets(filename, sizeof(filename), stdin);

	puts("Please Stand By....");
	return;
}

void connectionStatus(void)
{
	/* blah */
	return;
}

void manualConnect(void)
{
	/* blah */
	return;
}