Vysoké Učení Technické V Brně

Total Page:16

File Type:pdf, Size:1020Kb

Vysoké Učení Technické V Brně View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by Digital library of Brno University of Technology VYSOKÉ U ČENÍ TECHNICKÉ V BRN Ě BRNO UNIVERSITY OF TECHNOLOGY FAKULTA INFORMA ČNÍCH TECHNOLOGIÍ ÚSTAV INFORMA ČNÍCH SYSTÉM Ů FACULTY OF INFORMATION TECHNOLOGY DEPARTMENT OF INFORMATION SYSTEMS NNTP SERVER JAKO SLUŽBA PRO SYSTÉMY ZALOŽENÉ NA TECHNOLOGII WINDOWS-NT DIPLOMOVÁ PRÁCE MASTER‘S THESIS AUTOR PRÁCE BC. JOSEF LOUPANEC AUTHOR BRNO 2007 VYSOKÉ U ČENÍ TECHNICKÉ V BRN Ě BRNO UNIVERSITY OF TECHNOLOGY FAKULTA INFORMA ČNÍCH TECHNOLOGIÍ ÚSTAV INFORMA ČNÍCH SYSTÉM Ů FACULTY OF INFORMATION TECHNOLOGY DEPARTMENT OF INFORMATION SYSTEMS NNTP SERVER JAKO SLUŽBA PRO SYSTÉMY ZALOŽENÉ NA TECHNOLOGII WINDOWS-NT NNTP SERVER AS A WINDOWS NETWORK SERVICE DIPLOMOVÁ PRÁCE MASTER‘S THESIS AUTOR PRÁCE BC. JOSEF LOUPANEC AUTHOR VEDOUCÍ PRÁCE ING. PAVEL O ČENÁŠEK SUPERVISOR BRNO 2007 NNTP server jako služba pro systémy založené na technologii Windows-NT Vedoucí: Očenášek Pavel, Ing., UIFS FIT VUT Přihlášen: Loupanec Josef, Bc. Zadání: 1. Seznamte se s protokoly NNTP, HTTP, případně s jejich zabezpečenými variantami, podle příslušných RFC. 2. Seznamte se s možnostmi tvorby aplikací v prostředí Windows-NT (resp. Win- XP). Především se zaměřte na implementaci služeb (services). 3. Navrhněte vlastní diskuzní server umožňující práci s uvedenými protokoly. Server bude umět pracovat s lokálními diskuzními složkami (víceuživatelský přístup) a případně předávat požadavky na vzdálené diskuzní servery. 4. Donávrhu zahrňte vzdálené stahování diskuzních příspěvků z jiných serverů. 5. Navržený server implemetujte jakoslužbu pro prostředí Win-NT. 6. Zhodnoťte dosažené výsledky a diskutujte další možnosti rozšíření. Část požadovaná pro obhajobu SP: Body 1 - 4. Kategorie: Počítačové sítě Operační systém: Windows-NT (Win2000, WinXP, ...) Literatura: • Příslušná RFC k jednotlivým protokolů s formátům zpráv. • Dále dle doporučení vedoucího práce. Komentář: Server musí podporovat autentizaci uživatele. Abstrakt: Tato práce se zabývá analýzou požadavk ů, návrhem a implementací internetového diskusního serveru. Přesn ěji řečeno, jedná se o server spravující diskusní skupiny s p řísp ěvky a zajiš ťující jejich dostupnost prost řednictvím protokolu NNTP a HTTP. Server podporuje autentizaci uživatele a disponuje volitelným proxy módem, kdy jsou všechny NNTP požadavky p řeposílány na vzdálený NNTP diskusní server. Sou částí programu je též mechanismus zajiš ťující stahování p řísp ěvk ů ze vzdálených NNTP server ů a tím pádem plnící distribu ční funkci. Aplikace je ur čena pro opera ční systémy MS Windows po čínaje verzí NT a vyšší. Program pob ěží jako služba NT a je konfigurovatelný prost řednictvím grafického uživatelského rozhranní. V dokumentu jsou také obsaženy teoretické informace nutné pro praktické zvládnutí výše uvedených krok ů. Klí čová slova: Rela ční databáze, HTTP protokol, NNTP protokol, proxy server, regulární výraz, formát diskusního přísp ěvku, služba Windows, SQL, MySQL, server, diskusní skupina, distribuce, HTML, port, URL, vlákno, service control manager, relace, primární klí č, Abstract: This work includes specification and analysis of requirements, design and implementation of the internet news server. The server controls newsgroups and associated news. It provides availability of the articles by NNTP protocol and HTTP protocol (by web interface). The server supports a user authentication and an optional proxy mode, when all NNTP requests are resent to another remote NNTP server. A mechanism that provides news-downloading from remote NNTP servers and performs distribution function is included too. The application is designed to run on MS Windows NT (and higher version) as a NT service. The server is configurable by a graphic user interface. The work also includes theoretical information needed for successful accomplishment of the above-mentioned requirements. Key Words: Relation Database, HTTP, NNTP, proxy server, regular expression, news format, Windows service, SQL, MySQL server, newsgroup, distribution, HTML, port, URI, thread, service control manager, relation, primary key Josef Loupanec: NNTP server jako služba pro systémy založené na technologii Windows NT, diplomová práce, Brno, FIT VUT v Brn ě, 2007 Prohlášení Prohlašuji, že jsem tuto diplomovou práci vypracoval samostatn ě pod vedením Ing. Pavla O čenáška. Uvedl jsem všechny literární prameny a publikace, ze kterých jsem čerpal . Obsah Úvod ..................................................................................................................................................3 Up řesn ění požadavk ů..........................................................................................................................3 Teoretické informace ..........................................................................................................................4 NNTP protokol...............................................................................................................................4 Úvod ..........................................................................................................................................4 NNTP P řehled............................................................................................................................5 WILDMAT formát.....................................................................................................................5 Příkazy administrace sezení........................................................................................................6 Příkazy pro zasílání a stahování článk ů.......................................................................................7 Příkazy pro autentizaci .............................................................................................................15 Odpov ědi NNTP Serveru..........................................................................................................15 Formát diskusních p řísp ěvk ů ........................................................................................................17 Popis HTTP protokolu..................................................................................................................18 Úvod ........................................................................................................................................18 Požadavky................................................................................................................................18 Odpov ědi..................................................................................................................................19 URL.........................................................................................................................................20 Pole v hlavi čkách .....................................................................................................................20 Spojení:....................................................................................................................................22 Služby systému Windows NT .......................................................................................................22 Rela ční databáze...........................................................................................................................23 Úvod ........................................................................................................................................23 SQL .........................................................................................................................................24 Regulární výrazy ..........................................................................................................................24 Návrh systému..................................................................................................................................25 Návrh struktury aplikace...............................................................................................................25 Návrh NNTP rozhraní...................................................................................................................27 Návrh HTTP rozhraní...................................................................................................................28 Návrh konfigura čního rozhraní .....................................................................................................29 Návrh automatizovaného NNTP klienta........................................................................................29 Návrh databáze.............................................................................................................................30 Implementace systému......................................................................................................................30 Implementace NNTP rozhraní.......................................................................................................31 1 Popis t řídy NNTPServer...........................................................................................................31 Popis t řídy SocketHandler ........................................................................................................32 Popis t řídy NNTPProxy............................................................................................................33 Popis t řídy Head.......................................................................................................................33
Recommended publications
  • Visual Basic 6.0 Internet Programming:Table of Contents
    To access the contents, click the chapter and section titles. Visual Basic 6.0 Internet Programming (Publisher: John Wiley & Sons, Inc.) Author(s): Carl Franklin ISBN: 0471314986 Publication Date: 02/01/99 Brief Full Advanced Search Search this book: Search Tips FOREWORD CHAPTER 1—THE INTERNET Attack of the Buzzwords! Protocols and Data Protocol Stacks and the OSI Model TCP/IP Names and Addresses Ports Name Resolution Sockets The TCP/IP Model CHAPTER 2—WINSOCK PROGRAMMING Introduction Why Not Use the Winsock API? Installing the Software Loading DSSOCK32.OCX into Visual Basic DSSOCK.BAS SocketConnect IsDotAddress ParseString Getting Started with dsSocket Making a Sockets Connection What’s Going On Here? SocketID and the Socket Property Closing the Connection Handling Multiple Connections on the Server Side Sending Data Receiving Data LineMode, EOLChar, and DataSize The Simple Approach A New Twist Splitting Up the Process with Flags A Slight Variation Event Driven = No Loops Which Approach Is Better? Error Handling Winsock Errors Error-Handling Techniques Minimal Error Trapping Debug.Print Error Trapping Message Dialog Reporting Error Log Reporting UDP—User Datagram Protocol Terminal—A Winsock Terminal Program Epilogue CHAPTER 3—SIMPLE PROTOCOLS Introduction NTP (Network Time Protocol) WHOIS FINGER SetTime Application Epilogue CHAPTER 4—USENET NEWS Introduction NNTP MessageIDs vs. Message Numbers NNTP Versions NNTP Commands Sample Conversation The WILDMAT Format Server Responses Usenet Article Format VB Programming Technique String Parsing
    [Show full text]
  • CLI Maintenance Guide
    ARX CLI Maintenance Guide 810-0045-00 Publication Date This manual was published on September 24, 2012. Legal Notices Copyright Copyright 2006-9/24/12, F5 Networks, Inc. All rights reserved. F5 Networks, Inc. (F5) believes the information it furnishes to be accurate and reliable. However, F5 assumes no responsibility for the use of this information, nor any infringement of patents or other rights of third parties which may result from its use. No license is granted by implication or otherwise under any patent, copyright, or other intellectual property right of F5 except as specifically described by applicable user licenses. F5 reserves the right to change specifications at any time without notice. Trademarks 3DNS, Access Policy Manager, Acopia, Acopia Networks, Advanced Client Authentication, Advanced Routing, APM, Application Security Manager, ARX, AskF5, ASM, BIG-IP, Cloud Extender, CloudFucious, Clustered Multiprocessing, CMP, COHESION, Data Manager, DevCentral, DevCentral [DESIGN], DSI, DNS Express, DSC, Edge Client, Edge Gateway, Edge Portal, ELEVATE, EM, Enterprise Manager, ENGAGE, F5, F5 [DESIGN], F5 Management Pack, F5 Networks, F5 World, Fast Application Proxy, Fast Cache, FirePass, Global Traffic Manager, GTM, GUARDIAN, IBR, Intelligent Browser Referencing, Intelligent Compression, IPv6 Gateway, iApps, iControl, iHealth, iQuery, iRules, iRules OnDemand, iSession, IT agility. Your way., L7 Rate Shaping, LC, Link Controller, Local Traffic Manager, LTM, Message Security Module, MSM, Netcelera, OneConnect, OpenBloX, OpenBloX [DESIGN],
    [Show full text]
  • GNU Make-4.1 Manual
    GNU Make GNU Make A Program for Directing Recompilation GNU make Version 4.1 October 2014 Richard M. Stallman, Roland McGrath, Paul D. Smith This file documents the GNU make utility, which determines automatically which pieces of a large program need to be recompiled, and issues the commands to recompile them. This is Edition 0.73, last updated 5 October 2014, of The GNU Make Manual, for GNU make version 4.1. Copyright c 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being \A GNU Manual," and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled \GNU Free Documentation License." (a) The FSF's Back-Cover Text is: \You have the freedom to copy and modify this GNU manual. Buying copies from the FSF supports it in developing GNU and promoting software freedom." Published by the Free Software Foundation 51 Franklin St. { Fifth Floor Boston, MA 02110-1301 USA ISBN 1-882114-83-3 Cover art by Etienne Suvasa. i Short Contents 1 Overview of make :::::::::::::::::::::::::::::::::::::::::::::::::::: 1 2 An Introduction to Makefiles ::::::::::::::::::::::::::::::::::::::::::: 3 3 Writing Makefiles ::::::::::::::::::::::::::::::::::::::::::::::::::::
    [Show full text]
  • GNU Make a Program for Directing Recompilation Edition 0.48, for Make Version 3.73 Beta
    GNU Make A Program for Directing Recompilation Edition 0.48, for make Version 3.73 Beta. April 1995 Richard M. Stallman and Roland McGrath Copyright c 1988, '89, '90, '91, '92, '93, '94, '95 Free Software Founda- tion, Inc. Published by the Free Software Foundation 675 Massachusetts Avenue, Cambridge, MA 02139 USA Printed copies are available for $20 each. ISBN 1-882114-50-7 Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modi®ed versions of this manual under the conditions for verbatim copying, provided that the en- tire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modi®ed versions, except that this permission notice may be stated in a translation ap- proved by the Free Software Foundation. Cover art by Etienne Suvasa. GNU Make 1 Overview of make ............................. 517 1.1 How to Read This Manual ............................. 517 1.2 Problems and Bugs .................................... 518 2 An Introduction to Make®les ............... 519 2.1 What a Rule Looks Like ............................... 519 2.2 A Simple Make®le ..................................... 520 2.3 How make Processes a Make®le ........................ 521 2.4 Variables Make Make®les Simpler ..................... 522 2.5 Letting make Deduce the Commands ................... 523 2.6 Another Style of Make®le .............................. 524 2.7 Rules for Cleaning the Directory ....................... 525 3 Writing Make®les ...........................
    [Show full text]
  • Linux All-In-One for Dummies, 5Th Edition Is the Ideal
    Getting Computers/Operating Systems/Linux Linux L Administration inux The Networking Started Scripting Security Certification Internet Desktops ™ with verything Easier! 5th ition Ed E Linux Making Get up and running 5th Edition with the popular Linux operating system Open the book and find: ® • An easy-to-understand Are you a Linux user looking to take your skills to the next introduction to Linux level? Linux All-in-One For Dummies, 5th Edition is the ideal, • How to install and configure Linux user-friendly resource for anyone looking to get familiar peripherals with Linux, and includes a test-prep section for those ALL-IN-ONE studying to pass the Level-1 Linux certification. Everything • Ways to work with the shell and try out basic commands LinuxALL-IN-ONE you need is right here at your fingertips! • Helpful screenshots and • Boot up with the basics — find out how to successfully install, plain-English descriptions troubleshoot, and configure Linux distros • How to set up Ethernet • Keep it secure — get a high-level view of how to use security networking on your Linux to keep your overall framework protected system ® • Get connected — discover how to connect your Linux system • The latest on virtual machines to the Internet, whether you have a DSL or cable modem • A primer on TCP/IP • Know the GNOME (and more) — learn all about desktops, including GNOME’s common features, GNOME panels, • Working with files, folders, Unity, and Cinnamon and permissions • Be a programming pro — start programming in Linux, write shell scripts, edit text in vi, and become a champion of Cover Image: © iStock.com/Coldimages programming in C BOOKS IN Emmett Dulaney has authored over thirty books, including the rd 8 CompTIA Security+ Guide, 3 Edition.
    [Show full text]
  • GNU Make-3.81 Manual
    GNU Make GNU Make A Program for Directing Recompilation GNU make Version 3.81 April 2006 Richard M. Stallman, Roland McGrath, Paul D. Smith This file documents the GNU make utility, which determines automatically which pieces of a large program need to be recompiled, and issues the commands to recompile them. This is Edition 0.70, last updated 1 April 2006, of The GNU Make Manual, for GNU make version 3.81. Copyright c 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being \A GNU Manual," and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled \GNU Free Documentation License." (a) The FSF's Back-Cover Text is: \You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development." Published by the Free Software Foundation 51 Franklin St. { Fifth Floor Boston, MA 02110-1301 USA ISBN 1-882114-83-5 Cover art by Etienne Suvasa. i Short Contents 1 Overview of make :::::::::::::::::::::::::::::::::::::::::::::::::::: 1 2 An Introduction to Makefiles ::::::::::::::::::::::::::::::::::::::::::: 3 3 Writing Makefiles :::::::::::::::::::::::::::::::::::::::::::::::::::: 9 4 Writing
    [Show full text]
  • Internet News
    INN InterNet News Computer Center, CS, NCTU CS, Computer Center, Introduction to INN (1) Originally written by Rich Salz • ISC took over development in 1996 • http://www.isc.org/software/inn INN is a complete Usenet system • innd – NNTP server, main program, inbound receiver Exchange news articles with peers innfeed: outbound, feed articles to peers • nnrpd – NNTP reader server • Separate readers and peers For readers: readers.conf For peers: incoming.conf、innfeed.conf、newsfeeds • A lot of components… 2 Computer Center, CS, NCTU CS, Computer Center, Introduction to INN (2) 3 Computer Center, CS, NCTU CS, Computer Center, Introduction to INN (3) Main configuration • inn.conf Components • innd – main daemon for peers (and users) incoming.conf • innfeed – NNTP feeder innfeed.conf、newsfeeds • nnrpd – for users readers.conf • Newsgroups database active、active.times、newsgroups、history • Overview database buffindexed.conf、ovdb.conf、overview.fmt • Spool storage.conf、cycbuff.conf 4 Computer Center, CS, NCTU CS, Computer Center, Introduction to INN (4) Specific functions • Article and history expiration expire.ctl • Handling of control messages control.ctl • Submission addresses for moderated groups moderators • Cron jobs news.daily • Summery of INN log files innreports.conf • Others … 5 INN Installation Computer Center, CS, NCTU CS, Computer Center, Install INN (1) In FreeBSD ports • news/inn: INN 2.4.6 • 2009-06-08 - INN 2.4.6 was made EOL by the release of 2.5.0. • 2010-Mar-25 - INN v2.5.2 , ISC is pleased to announce a
    [Show full text]
  • The Zkl Programming Language Reference Manual
    The zkl Programming Language Reference Manual Craig Durland Copyright © 2006,2007-13, 2014 Craig Durland All Rights Reserved You can distribute this document and/or modify it under the terms of the Creative Commons Attribution-NonCommercial License, version 3.0 (http://creativecommons.org/licenses/by-nc/3.0/). Feedback Please direct comments and suggestions about this document to: [email protected] See Also For more on zkl, including downloads (and an electronic copy of this book), please visit http://zenkinetic.com/ Publication history ● March 2008 ● July 2008 ● January 2010, updated for zkl version 1.1 ● December 2010, updated for zkl version 1.3 ● June 2011, updated for zkl version 1.5.2 ● December 2011, updated for zkl version 1.6 ● August 2012, updated for zkl version 1.7 ● June 2013, updated for zkl version 1.10 ● September 2013, updated for zkl version 1.12 ● June 2015, updated for zkl version 1.12.21 ● January 2017, updated for zkl version 1.12.38 ● December 2018, updated for zkl version 1.14.1 Contents The Young Person's Guide to zkl...........................1 onExit..............................................................55 Getting Started.............................................2 pimport (packaging)........................................57 Data Things: Numbers, Strings, etc.............3 print, println....................................................60 Branching.....................................................4 [ ] (Range).......................................................61 Loops............................................................4
    [Show full text]
  • Porting UNIX Applications to Openedition for VM/ESA
    Porting UNIX Applications to OpenEdition for VM/ESA Erich Amrehn, Neale Ferguson, Jean-Francois Jiguet International Technical Support Organization http://www.redbooks.ibm.com SG24-5458-00 International Technical Support Organization SG24-5458-00 Porting UNIX Applications to OpenEdition for VM/ESA August 1999 Take Note! Before using this information and the product it supports, be sure to read the general information in Appendix M, “Special Notices” on page 337. First Edition (August 1999) This edition applies to Virtual Machine/Enterprise Systems Architecture (VM/ESA) Version 2, Release 3.0, program number 5654-030 for use with OpenEdition for VM/ESA. Comments may be addressed to: IBM Corporation, International Technical Support Organization Dept. HYJ Mail Station P099 522 South Road Poughkeepsie, NY 12601-5400 When you send information to IBM, you grant IBM a non-exclusive right to use or distribute the information in any way it believes appropriate without incurring any obligation to you. © Copyright International Business Machines Corporation 1999. All rights reserved. Note to U.S Government Users - Documentation related to restricted rights - Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp. Contents Figures ......................................................xi Tables .......................................................xv Preface .....................................................xvii The team that wrote this redbook ......................................xvii Commentswelcome...............................................xviii
    [Show full text]
  • OBJECT REFERENCE MANUAL Firmware Versions 6.0.X
    OBJECT REFERENCE MANUAL Firmware Versions 6.0.x BrightSign, LLC. 16780 Lark Ave., Suite B Los Gatos, CA 95032 | 408-852-9263 | www.brightsign.biz 1 TABLE OF CONTENTS INTRODUCTION ................................................................................................................ 1 INTERFACES AND METHODS OVERVIEW ..................................................................... 2 Classes .............................................................................................................................................................................. 3 Object and Class Name Syntax ......................................................................................................................................... 3 Zones................................................................................................................................................................................. 3 Event Loops ....................................................................................................................................................................... 4 BrightSign Object Library ................................................................................................................................................... 5 BRIGHTSCRIPT CORE OBJECTS .................................................................................... 6 roArray ..............................................................................................................................................................................
    [Show full text]
  • GNU Make Manual, for GNU Make Version 4.3
    GNU Make GNU Make A Program for Directing Recompilation GNU make Version 4.3 January 2020 Richard M. Stallman, Roland McGrath, Paul D. Smith This file documents the GNU make utility, which determines automatically which pieces of a large program need to be recompiled, and issues the commands to recompile them. This is Edition 0.75, last updated 17 January 2020, of The GNU Make Manual, for GNU make version 4.3. Copyright c 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being \A GNU Manual," and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled \GNU Free Documentation License." (a) The FSF's Back-Cover Text is: \You have the freedom to copy and modify this GNU manual. Buying copies from the FSF supports it in developing GNU and promoting software freedom." Published by the Free Software Foundation 51 Franklin St. { Fifth Floor Boston, MA 02110-1301 USA ISBN 1-882114-83-3 Cover art by Etienne Suvasa. i Short Contents 1 Overview of make:::::::::::::::::::::::::::::::::::::: 1 2 An Introduction to Makefiles :::::::::::::::::::::::::::: 3 3 Writing Makefiles:::::::::::::::::::::::::::::::::::::
    [Show full text]