Click here to load reader

Getting Started

  • View
    41

  • Download
    3

Embed Size (px)

DESCRIPTION

Getting Started. 2007. 3. 9 ( 금 ) 김 희 준 [email protected] 실습준비. 실습 서버 amg.hufs.ac.kr OS : Red hat Linux 9 Intel x86 220.67.124.140 OS : Red hat Linux 9 Intel x86 220.67.124.129 OS : Solaris 5.8 SPARC 세 개의 계정 배정. 실습 시 주의사항 (1/3). 실습용 서버주소 : amg.hufs.ac.kr - PowerPoint PPT Presentation

Text of Getting Started

  • Getting Started2007. 3. 9 () [email protected]

  • Contents Command Tool Secure Client Shell UNP LibraryInstallSource Editing by Tools Source InsightCompile & Program testNetstat Simple Client & Server

  • amg.hufs.ac.kr OS : Red hat Linux 9Intel x86 220.67.124.140OS : Red hat Linux 9Intel x86 220.67.124.129OS : Solaris 5.8SPARC

  • (1/3) : amg.hufs.ac.kr

    [Allocation of port numbers] port port number : 5xxxx +10 4

    ex) 200430128 50128~50138

  • Command Line ToolSSH secure shell ftp://ftp.kreonet.re.kr/pub/security/ssh/SSHSecureShellClient-3.2.9.exe SSH (Session Hijacking) DNS

  • SSH secure shell Main Window

    Green : Will connect Remote HostViolet : Register Remote HostRed : New TerminalBlue : New File Transfer

  • SSH secure shellConnecting hostClick Connect or Quick ConnectConnecting hostInput ParametersHost IP or Domain NameID, PasswordPort

    Connecting hostResult

  • SSH secure shellFile Transfer

  • UNP Library (1/2)Wrapper function - W. Richard StevensSolaris, Linux, FreeBSD Libunp.a, libfree.a, libroute.a, libxti.a XTI [ X/Open Transport Interface ]OSI 4(transport layer) (API) X/Open . API 3 .

  • UNP library (2/2)UNP library directory

    config*.* : library ex> config.h, config.h.in, config.log, config.status, configure.in libunp.a : UNP library archive lib, libfree : library object

  • UNP library - installhttp://www.unpbook.com/unpv13e.tar.gz

    SSH Secure Shell file upload

    gunzip unpv13e.tar.gztar xvf unpv13e.tar

    cd unpv13e # into the basic directory that all programs need ./configure # try to figure out all implementation differences

    cd lib # build the basic library that all programs needmake # use "gmake" everywhere on BSD/OS systems

    cd ../libfree # continue building the basic librarymake cd ../intro # build and test a basic client program make daytimetcpcli ./daytimetcpcli 127.0.0.1

  • Source Editing ToolSource Insight C/C++, C# Java program (contextual)

  • Source Insight (Main Window)

  • Source Insight (1/4)Project

  • Source Insight (2/4) Source

  • Source Insight (3/4)

  • Source Insight (4/4)

  • ip address Ip address

  • Netstat Command option

  • Netstat ( )

  • Linux Command # mkdir directory_name

    Compile ExampleMakefile Simple Makefile Example

  • Linux Commandltrace Library call tracer library # ltrace library # ltrace f Fork library # ltrace p [PID] # ltrace S

  • Program Compile & Run test - Echo client (1/2) source Source insight echo client

    int main(int argc, char **argv){int sockfd;struct sockaddr_in servaddr;/* Echo client argument - argv[1] : server IP address - argv[2] : server port number (default:7) */

    sockfd = socket(AF_INET, SOCK_STREAM, 0);bzero(&servaddr, sizeof(servaddr));servaddr.sin_family = AF_INET;servaddr.sin_port = htons(7);inet_pton(AF_INET, argv[1], &servaddr.sin_addr);

    connect(sockfd, (struct sockaddr *) &servaddr, sizeof(servaddr));

    /* echo ( p.88 ) */exit(0);}

  • Program Compile & Run test - Echo client (1/2)UNP library ( unp ) echo_client [Server IP address] [port_number]argument ex) usage : echo_client [server IP address] [port_num]port_number argument (50007) API echo client 220.67.124.140 amg.hufs.ac.kr(220.67.124.142) David A. Curry, UNIX System Programming for SVR4, OReilly

    Run Netstat ltrace ( for debugging )

Search related