CTF学习笔记:SQL注入(显错注入)

目录

SQL注入原理:

 防范:

显错注入:

SQL注入常用函数:

靶场实例:

靶场


SQL注入原理:

Sql 注入攻击是通过将恶意的 Sql 查询或添加语句插入到应用的输入参数中,再在后台 Sql 服务器上解析执行进行的攻击,它目前黑客对数据库进行攻击的最常用手段之一。

产生原因:程序没有细致过滤用户输入的数据,从而导致非法数据进入系统。

 SQL注入可能造成威胁:

  • 猜解后台数据库,盗取网站的敏感信息。
  • 绕过认证
  • 借助数据库的存储过程进行提权等操作

 防范:

(1)参数化语句:用过将查询语句参数化,来防范SQL注入

(2)输入验证:通过白名单和黑名单的验证对用户的输入进行验证

(3)输出编码:对程序各个模块之间或者各个部分之间传递的数据进行编码处理

(4)规范化:拒绝所有不符合规范的输入和对输入编码进行解码分析是常见的两种规范化处理方法

(5)避免SQL注入漏洞的程序设计:使用存储过程、处理敏感数据等

(6) 安全的编码规范:根据OWASP提供的安全编码规范进行相关编码

显错注入:

一:判断网站是否存在漏洞(也可以用sleep()函数来判断是否存在注入:or sleep(5)页面5秒钟后正常显示)    小技巧: 页面传参后面加 ’ ,看是否报错 )                                                                                       
    and 1=1 --> 条件成立,网页有内容
    and 1=2 --> 条件不成立,网页没有内容
        ==>  网站存在SQL注入漏洞。

二:判断字段数 ,order by ,排序。
    字段 = 列 。
    order by 1 --> 网页有内容,说明表里面有1列
    order by 2 --> 网页有内容,说明表里面有2列
    order by 3 --> 网页无内容,说明表里面只有2列

三:联合查询寻找输出点
     union select 1,2,3,4#
     tips:union select 联合查询前面语句要为假

四:查数据
    version() # 函数,查询版本号
    database() # 函数,查库名

SQL注入常用函数:

group_concat(col) //返回由属于一组的列值连接组合而成的结果
ascll(char) //返回字符的ascll码值
database() //返回当前数据库名
system_user() //返回当前登录用户名
version() //返回mysql服务器的版本
sleep(n) //休眠n秒

靶场实例:

靶场

and1=1网页有内容 and1=2网页无内容

 

 order by 1 by 2 by 3皆有数据 order by 4无数据

  输入and 1=2 union select 1,version(),database()有数据

 具体实例各位自己尝试加油哦!

 

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
xvii Contents Finishing Your Modules 154 Defining Module-Specific Errors 154 Choosing What to Export 155 Documenting Your Modules 156 Try It Out: Viewing Module Documentation 157 Testing Your Module 162 Running a Module as a Program 164 Try It Out: Running a Module 164 Creating a Whole Module 165 Try It Out: Finishing a Module 165 Try It Out: Smashing Imports 169 Installing Your Modules 170 Try It Out: Creating an Installable Package 171 Summary 174 Exercises 174 Chapter 11: Text Processing 175 Why Text Processing Is So Useful 175 Searching for Files 176 Clipping Logs 177 Sifting through Mail 178 Navigating the File System with the os Module 178 Try It Out: Listing Files and Playing with Paths 180 Try It Out: Searching for Files of a Particular Type 181 Try It Out: Refining a Search 183 Working with Regular Expressions and the re Module 184 Try It Out: Fun with Regular Expressions 186 Try It Out: Adding Tests 187 Summary 189 Exercises 189 Chapter 12: Testing 191 Assertions 191 Try It Out: Using Assert 192 Test Cases and Test Suites 193 Try It Out: Testing Addition 194 Try It Out: Testing Faulty Addition 195 Test Fixtures 196 Try It Out: Working with Test Fixtures 197 02_596543 ftoc.qxd 6/29/05 10:55 PM Page xvii xviii Contents Putting It All Together with Extreme Programming 199 Implementing a Search Utility in Python 200 Try It Out: Writing a Test Suite First 201 Try It Out: A General-Purpose Search Framework 203 A More Powerful Python Search 205 Try It Out: Extending the Search Framework 206 Formal Testing in the Software Life Cycle 207 Summary 208 Chapter 13: Writing a GUI with Python 209 GUI Programming Toolkits for Python 209 PyGTK Introduction 210 pyGTK Resources 211 Creating GUI Widgets with pyGTK 213 Try It Out: Writing a Simple pyGTK Program 213 GUI Signals 214 GUI Helper Threads and the GUI Event Queue 216 Try It Out: Writing a Multithreaded pyGTK App 219 Widget Packing 222 Glade: a GUI Builder for pyGTK 223 GUI Builders for Other GUI Frameworks 224 Using libGlade with Python 225 A Glade Walkthrough 225 Starting Glade 226 Creating a Project 227 Using the Palette to Create a Window 227 Putting Widgets into the Window 228 Glade Creates an XML Representation of the GUI 230 Try It Out: Building a GUI from a Glade File 231 Creating a Real Glade Application 231 Advanced Widgets 238 Further Enhancing PyRAP 241 Summary 248 Exercises 248 Chapter 14: Accessing Databases 249 Working with DBM Persistent Dictionaries 250 Choosing a DBM Module 250 Creating Persistent Dictionaries 251 Try It Out: Creating a Persistent Dictionary 251 02_596543 ftoc.qxd 6/29/05 10:55 PM Page xviii xix Contents Accessing Persistent Dictionaries 252 Try It Out: Accessing Persistent Dictionaries 253 Deciding When to Use DBM and When to Use a Relational Database 255 Working with Relational Databases 255 Writing SQL Statements 257 Defining Tables 259 Setting Up a Database 260 Try It Out: Creating a Gadfly Database 261 Using the Python Database APIs 262 Downloading Modules 263 Creating Connections 263 Working with Cursors 264 Try It Out: Inserting Records 264 Try It Out: Writing a Simple Query 266 Try It Out: Writing a Complex Join 267 Try It Out: Updating an Employee’s Manager 269 Try It Out: Removing Employees 270 Working with Transactions and Committing the Results 271 Examining Module Capabilities and Metadata 272 Handling Errors 272 Summary 273 Exercises 274 Chapter 15: Using Python for XML 275 What Is XML? 275 A Hierarchical Markup Language 275 A Family of Standards 277 What Is a Schema/DTD? 278 What Are Document Models For? 278 Do You Need One? 278 Document Type Definitions 278 An Example DTD 278 DTDs Aren’t Exactly XML 280 Limitations of DTDs 280 Schemas 280 An Example Schema 280 Schemas Are Pure XML 281 Schemas Are Hierarchical 281 Other Advantages of Schemas 281 Schemas Are Less Widely Supported 281 02_596543 ftoc.qxd 6/29/05 10:55 PM Page xix xx Contents XPath 282 HTML as a Subset of XML 282 The HTML DTDs 283 HTMLParser 283 Try It Out: Using HTMLParser 283 htmllib 284 Try It Out: Using htmllib 284 XML Libraries Available for Python 285 Validating XML Using Python 285 What Is Validation? 286 Well-Formedness versus Validation 286 Available Tools 286 Try It Out: Validation Using xmlproc 286 What Is SAX? 287 Stream-based 288 Event-driven 288 What Is DOM? 288 In-memory Access 288 Why Use SAX or DOM 289 Capability Trade-Offs 289 Memory Considerations 289 Speed Considerations 289 SAX and DOM Parsers Available for Python 289 PyXML 290 xml.sax 290 xml.dom.minidom 290 Try It Out: Working with XML Using DOM 290 Try It Out: Working with XML Using SAX 292 Intro to XSLT 293 XSLT Is XML 293 Transformation and Formatting Language 293 Functional,Template-Driven 293 Using Python to Transform XML Using XSLT 294 Try It Out: Transforming XML with XSLT 294 Putting It All Together: Working with RSS 296 RSS Overview and Vocabulary 296 Making Sense of It All 296 RSS Vocabulary 297 An RSS DTD 297 02_596543 ftoc.qxd 6/29/05 10:55 PM Page xx xxi Contents A Real-World Problem 297 Try It Out: Creating an RSS Feed 298 Creating the Document 300 Checking It Against the DTD 301 Another Real-World Problem 301 Try It Out: Creating An Aggregator 301 Summary 303 Exercises 303 Chapter 16: Network Programming 305 Try It Out: Sending Some E-mail 305 Understanding Protocols 307 Comparing Protocols and Programming Languages 307 The Internet Protocol Stack 308 A Little Bit About the Internet Protocol 309 Internet Addresses 309 Internet Ports 310 Sending Internet E-mail 311 The E-mail File Format 311 MIME Messages 313 MIME Encodings: Quoted-printable and Base64 313 MIME Content Types 314 Try It Out: Creating a MIME Message with an Attachment 315 MIME Multipart Messages 316 Try It Out: Building E-mail Messages with SmartMessage 320 Sending Mail with SMTP and smtplib 321 Try It Out: Sending Mail with MailServer 323 Retrieving Internet E-mail 323 Parsing a Local Mail Spool with mailbox 323 Try It Out: Printing a Summary of Your Mailbox 324 Fetching Mail from a POP3 Server with poplib 325 Try It Out: Printing a Summary of Your POP3 Mailbox 327 Fetching Mail from an IMAP Server with imaplib 327 Try It Out: Printing a Summary of Your IMAP Mailbox 329 IMAP’s Unique Message IDs 330 Try It Out: Fetching a Message by Unique ID 330 Secure POP3 and IMAP 331 Webmail Applications Are Not E-mail Applications 331 Socket Programming 331 Introduction to Sockets 332 Try It Out: Connecting to the SuperSimpleSocketServer with Telnet 333 02_596543 ftoc.qxd 6/29/05 10:55 PM Page xxi xxii Contents Binding to an External Hostname 334 The Mirror Server 335 Try It Out: Mirroring Text with the MirrorServer 336 The Mirror Client 336 SocketServer 337 Multithreaded Servers 339 The Python Chat Server 340 Design of the Python Chat Server 340 The Python Chat Server Protocol 341 Our Hypothetical Protocol in Action 341 Initial Connection 342 Chat Text 342 Server Commands 342 General Guidelines 343 The Python Chat Client 346 Single-Threaded Multitasking with select 348 Other Topics 350 Miscellaneous Considerations for Protocol Design 350 Trusted Servers 350 Terse Protocols 350 The Twisted Framework 351 Deferred Objects 351 The Peer-to-Peer Architecture 354 Summary 354 Exercises 354 Chapter 17: Extension Programming with C 355 Extension Module Outline 356 Building and Installing Extension Modules 358 Passing Parameters from Python to C 360 Returning Values from C to Python 363 The LAME Project 364 The LAME Extension Module 368 Using Python Objects from C Code 380 Summary 383 Exercises 383 Chapter 18: Writing Shareware and Commercial Programs 385 A Case Study: Background 385 How Much Python Should You Use? 386 02_596543 ftoc.qxd 6/29/05 10:55 PM Page xxii xxiii Contents Pure Python Licensing 387 Web Services Are Your Friend 388 Pricing Strategies 389 Watermarking 390 Other Models 394 Selling as a Platform,Rather Than a Product 395 Your Development Environment 395 Finding Python Programmers 396 Training non-Python Programmers 397 Python Employment Resources 397 Python Problems 397 Porting to Other Versions of Python 397 Porting to Other Operating Systems 398 Debugging Threads 399 Common Gotchas 399 Portable Distribution 400 Essential Libraries 401 Timeoutsocket 401 PyGTK 402 GEOip 402 Summary 403 Chapter 19: Numerical Programming 405 Numbers in Python 405 Integers 406 Long Integers 406 Floating-point Numbers 407 Formatting Numbers 408 Characters as Numbers 410 Mathematics 412 Arithmetic 412 Built-in Math Functions 414 The math Module 415 Complex Numbers 416 Arrays 418 The array Module 420 The numarray Package 422 Using Arrays 422 Computing the Standard Deviation 423 Summary 424 Exercises 425 02_596543 ftoc.qxd 6/29/05 10:55 PM Page xxiii xxiv Contents Chapter 20: Python in the Enterprise 427 Enterprise Applications 428 Document Management 428 The Evolution of Document Management Systems 429 What You Want in a Document Management System 430 People in Directories 431 Taking Action with Workflow 432 Auditing,Sarbanes-Oxley,and What You Need to Know 433 Auditing and Document Management 434 Working with Actual Enterprise Systems 435 Introducing the wftk Workflow Toolkit 435 Try It Out: Very Simple Record Retrieval 436 Try It Out: Very Simple Record Storage 438 Try It Out: Data Storage in MySQL 439 Try It Out: Storing and Retrieving Documents 441 Try It Out: A Document Retention Framework 446 The python-ldap Module 448 Try It Out: Using Basic OpenLDAP Tools 449 Try It Out: Simple LDAP Search 451 More LDAP 453 Back to the wftk 453 Try It Out: Simple Workflow Trigger 454 Try It Out: Action Queue Handler 456 Summary 458 Exercises 458 Chapter 21: Web Applications and Web Services 459 REST: The Architecture of the Web 460 Characteristics of REST 460 A Distributed Network of Interlinked Documents 461 A Client-Server Architecture 461 Servers Are Stateless 461 Resources 461 Representations 462 REST Operations 462 HTTP: Real-World REST 463 Try It Out: Python’s Three-Line Web Server 463 The Visible Web Server 464 Try It Out: Seeing an HTTP Request and Response 465 The HTTP Request 466 The HTTP Response 467 02_596543 ftoc.qxd 6/29/05 10:55 PM Page xxiv xxv Contents CGI: Turning Scripts into Web Applications 468 Try It Out: Running a CGI Script 469 The Web Server Makes a Deal with the CGI Script 470 CGI’s Special Environment Variables 471 Accepting User Input through HTML Forms 473 The cgi Module: Parsing HTML Forms 474 Try It Out: Printing Any HTML Form Submission 478 Building a Wiki 480 The BittyWiki Core Library 481 Back-end Storage 481 WikiWords 481 Writing the BittyWiki Core 481 Try It Out: Creating Wiki Pages from an Interactive Python Session 483 The BittyWiki Web Interface 484 Resources 484 Request Structure 484 But Wait—There’s More (Resources) 485 Wiki Markup 486 Web Services 493 How Web Services Work 494 REST Web Services 494 REST Quick Start: Finding Bargains on Amazon.com 495 Try It Out: Peeking at an Amazon Web Services Response 496 Introducing WishListBargainFinder 497 Giving BittyWiki a REST API 500 Wiki Search-and-Replace Using the REST Web Service 503 Try It Out: Wiki Searching and Replacing 507 XML-RPC 508 XML-RPC Quick Start: Get Tech News from Meerkat 509 The XML-RPC Request 511 Representation of Data in XML-RPC 512 The XML-RPC Response 513 If Something Goes Wrong 513 Exposing the BittyWiki API through XML-RPC 514 Try It Out: Manipulating BittyWiki through XML-RPC 517 Wiki Search-and-Replace Using the XML-RPC Web Service 518 SOAP 520 SOAP Quick Start: Surfing the Google API 520 The SOAP Request 522 The SOAP Response 524 If Something Goes Wrong 524 02_596543 ftoc.qxd 6/29/05 10:55 PM Page xxv xxvi Contents Exposing a SOAP Interface to BittyWiki 525 Try It Out: Manipulating BittyWiki through SOAP 526 Wiki Search-and-Replace Using the SOAP Web Service 527 Documenting Your Web Service API 529 Human-Readable API Documentation 529 The BittyWiki REST API Document 529 The BittyWiki XML-RPC API Document 529 The BittyWiki SOAP API Document 530 The XML-RPC Introspection API 530 Try It Out: Using the XML-RPC Introspection API 530 WSDL 531 Try It Out: Manipulating BittyWiki through a WSDL Proxy 533 Choosing a Web Service Standard 534 Web Service Etiquette 535 For Consumers of Web Services 535 For Producers of Web Services 535 Using Web Applications as Web Services 536 A Sampling of Publicly Available Web Services 536 Summary 538 Exercises 538 Chapter 22: Integrating Java with Python 539 Scripting within Java Applications 540 Comparing Python Implementations 541 Installing Jython 541 Running Jython 542 Running Jython Interactively 542 Try It Out: Running the Jython Interpreter 542 Running Jython Scripts 543 Try It Out Running a Python Script 543 Controlling the jython Script 544 Making Executable Commands 545 Try It Out: Making an Executable Script 546 Running Jython on Your Own 546 Packaging Jython-Based Applications 547 Integrating Java and Jython 547 Using Java Classes in Jython 548 Try It Out: Calling on Java Classes 548 Try It Out: Creating a User Interface from Jython 550 Accessing Databases from Jython 552 Working with the Python DB API 553 02_596543 ftoc.qxd 6/29/05 10:55 PM Page xxvi xxvii Contents Setting Up a Database 554 Try It Out: Create Tables 555 Writing J2EE Servlets in Jython 558 Setting Up an Application Server 559 Adding the PyServlet to an Application Server 560 Extending HttpServlet 561 Try It Out: Writing a Python Servlet 562 Choosing Tools for Jython 564 Testing from Jython 565 Try It Out: Exploring Your Environment with Jython 565 Embedding the Jython Interpreter 566 Calling Jython Scripts from Java 566 Try It Out: Embedding Jython 567 Compiling Python Code to Java 568 Handling Differences between C Python and Jython 569 Summary 570 Exercises 571 Appendix A: Answers to Exercises 573 Appendix B: Online Resources 605 Appendix C: What’s New in Python 2.4 609 Glossary 613 Index 623 Contents Acknowledgments xxix Introduction xxxi Chapter 1: Programming Basics and Strings 1 How Programming Is Different from Using a Computer 1 Programming Is Consistency 2 Programming Is Control 2 Programming Copes with Change 2 What All That Means Together 3 The First Steps 3 Starting codeEditor 3 Using codeEditor’s Python Shell 4 Try It Out: Starting the Python Shell 4 Beginning to Use Python—Strings 5 What Is a String? 5 Why the Quotes? 6 Try It Out: Entering Strings with Different Quotes 6 Understanding Different Quotes 6 Putting Two Strings Together 8 Try It Out: Using + to Combine Strings 8 Putting Strings Together in Different Ways 9 Try It Out: Using a Format Specifier to Populate a String 9 Try It Out: More String Formatting 9 Displaying Strings with Print 10 Try It Out: Printing Text with Print 10 Summary 10 Exercises 11 Chapter 2: Numbers and Operators 13 Different Kinds of Numbers 13 Numbers in Python 14 Try It Out: Using Type with Different Numbers 14 Try It Out: Creating an Imaginary Number 15 02_596543 ftoc.qxd 6/29/05 10:55 PM Page xi xii Contents Program Files 15 Try It Out: Using the Shell with the Editor 16 Using the Different Types 17 Try It Out Including Different Numbers in Strings 18 Try It Out: Escaping the % Sign in Strings 18 Basic Math 19 Try It Out Doing Basic Math 19 Try It Out: Using the Modulus Operation 20 Some Surprises 20 Try It Out: Printing the Results 21 Using Numbers 21 Order of Evaluation 21 Try It Out: Using Math Operations 21 Number Formats 22 Try It Out: Using Number Formats 22 Mistakes Will Happen 23 Try It Out: Making Mistakes 23 Some Unusual Cases 24 Try It Out: Formatting Numbers as Octal and Hexadecimal 24 Summary 24 Exercises 25 Chapter 3: Variables—Names for Values 27 Referring to Data – Using Names for Data 27 Try It Out: Assigning Values to Names 28 Changing Data Through Names 28 Try It Out: Altering Named Values 29 Copying Data 29 Names You Can’t Use and Some Rules 29 Using More Built-in Types 30 Tuples—Unchanging Sequences of Data 30 Try It Out: Creating and Using a Tuple 30 Try It Out: Accessing a Tuple Through Another Tuple 31 Lists—Changeable Sequences of Data 33 Try It Out Viewing the Elements of a List 33 Dictionaries—Groupings of Data Indexed by Name 34 Try It Out: Making a Dictionary 34 Try It Out: Getting the Keys from a Dictionary 35 Treating a String Like a List 36 Special Types 38 02_596543 ftoc.qxd 6/29/05 10:55 PM Page xii xiii Contents Other Common Sequence Properties 38 Referencing the Last Elements 38 Ranges of Sequences 39 Try It Out: Slicing Sequences 39 Growing Lists by Appending Sequences 40 Using Lists to Temporarily Store Data 40 Try It Out: Popping Elements from a List 40 Summary 41 Exercises 42 Chapter 4: Making Decisions 43 Comparing Values—Are They the Same? 43 Try It Out: Comparing Values for Sameness 43 Doing the Opposite—Not Equal 45 Try It Out: Comparing Values for Difference 45 Comparing Values—Which One Is More? 45 Try It Out: Comparing Greater Than and Less Than 45 More Than or Equal,Less Than or Equal 47 Reversing True and False 47 Try It Out: Reversing the Outcome of a Test 47 Looking for the Results of More Than One Comparison 48 How to Get Decisions Made 48 Try It Out: Placing Tests within Tests 49 Repetition 51 How to Do Something—Again and Again 51 Try It Out: Using a while Loop 51 Stopping the Repetition 52 Try It Out: Using else While Repeating 54 Try It Out: Using continue to Keep Repeating 54 Handling Errors 55 Trying Things Out 55 Try It Out: Creating an Exception with Its Explanation 56 Summary 57 Exercises 58 Chapter 5: Functions 59 Putting Your Program into Its Own File 59 Try It Out: Run a Program with Python -i 61 02_596543 ftoc.qxd 6/29/05 10:55 PM Page xiii xiv Contents Functions: Grouping Code under a Name 61 Try It Out: Defining a Function 61 Choosing a Name 62 Describing a Function in the Function 63 Try It Out: Displaying __doc__ 63 The Same Name in Two Different Places 64 Making Notes to Yourself 65 Try It Out: Experimenting with Comments 65 Asking a Function to Use a Value You Provide 66 Try It Out Invoking a Function with Parameters 67 Checking Your Parameters 68 Try It Out: Determining More Types with the type Function 69 Try It Out: Using Strings to Compare Types 69 Setting a Default Value for a Parameter—Just in Case 70 Try It Out: Setting a Default Parameter 70 Calling Functions from within Other Functions 71 Try It Out: Invoking the Completed Function 72 Functions Inside of Functions 72 Flagging an Error on Your Own Terms 73 Layers of Functions 74 How to Read Deeper Errors 74 Summary 75 Exercises 76 Chapter 6: Classes and Objects 79 Thinking About Programming 79 Objects You Already Know 79 Looking Ahead: How You Want to Use Objects 81 Defining a Class 81 How Code Can Be Made into an Object 81 Try It Out: Defining a Class 82 Try It Out: Creating an Object from Your Class 82 Try It Out: Writing an Internal Method 84 Try It Out: Writing Interface Methods 85 Try It Out: Using More Methods 87 Objects and Their Scope 89 Try It Out: Creating Another Class 89 Summary 92 Exercises 93 02_596543 ftoc.qxd 6/29/05 10:55 PM Page xiv xv Contents Chapter 7: Organizing Programs 95 Modules 96 Importing a Module So That You Can Use It 96 Making a Module from Pre-existing Code 97 Try It Out: Creating a Module 97 Try It Out: Exploring Your New Module 98 Using Modules—Starting With the Command Line 99 Try It Out: Printing sys.argv 100 Changing How Import Works—Bringing in More 101 Packages 101 Try It Out: Making the Files in the Kitchen Class 102 Modules and Packages 103 Bringing Everything into the Current Scope 103 Try It Out: Exporting Modules from a Package 104 Re-importing Modules and Packages 104 Try It Out: Examining sys.modules 105 Basics of Testing Your Modules and Packages 106 Summary 106 Exercises 107 Chapter 8: Files and Directories 109 File Objects 109 Writing Text Files 110 Reading Text Files 111 Try It Out: Printing the Lengths of Lines in the Sample File 112 File Exceptions 113 Paths and Directories 113 Paths 114 Directory Contents 116 Try It Out: Getting the Contents of a Directory 116 Try It Out: Listing the Contents of Your Desktop or Home Directory 118 Obtaining Information about Files 118 Recursive Directory Listings 118 Renaming,Moving,Copying,and Removing Files 119 Example: Rotating Files 120 Creating and Removing Directories 121 Globbing 122 02_596543 ftoc.qxd 6/29/05 10:55 PM Page xv xvi Contents Pickles 123 Try It Out: Creating a Pickle File 123 Pickling Tips 124 Efficient Pickling 125 Summary 125 Exercises 125 Chapter 9: Other Features of the Language 127 Lambda and Filter: Short Anonymous Functions 127 Reduce 128 Try It Out: Working with Reduce 128 Map: Short-Circuiting Loops 129 Try It Out: Use Map 129 Decisions within Lists—List Comprehension 130 Generating Lists for Loops 131 Try It Out: Examining an xrange Object 132 Special String Substitution Using Dictionaries 133 Try It Out: String Formatting with Dictionaries 133 Featured Modules 134 Getopt—Getting Options from the Command Line 134 Using More Than One Process 137 Threads—Doing Many Things in the Same Process 139 Storing Passwords 140 Summary 141 Exercises 142 Chapter 10: Building a Module 143 Exploring Modules 143 Importing Modules 145 Finding Modules 145 Digging through Modules 146 Creating Modules and Packages 150 Try It Out: Creating a Module with Functions 150 Working with Classes 151 Defining Object-Oriented Programming 151 Creating Classes 151 Try It Out: Creating a Meal Class 152 Extending Existing Classes 153 02_596543 ftoc.qxd 6/29/05 10:55 PM Page xvi
目 录 第一章 软件的安装、卸载和升级 1 1.1软件安装对计算机的最低配置要求 1 1.2 软件的安装 1 1.3数据库安装与建立数据库 5 1.3.1安装SQL Server 2000参考 5 1.3.2安装SQL Server 2008企业版参考 7 1.3.3创建数据库 29 1.4软件的卸载 30 1.5远程系统升级 32 第二章 软件基本操作 33 2.1进入操作软件 34 2.1.1开启其它功能 35 2.1.2设备连线图 36 2.2系统设置 37 2.2.1系统基本设置 37 2.2.1.1设置系统使用场合 38 2.2.1.2监控照片存量 38 2.2.1.3登录时自动运行功能 39 2.2.1.4门禁参数设置 39 2.2.1.5设置门禁卡有效期 40 2.2.1.6设置开锁时长 40 2.2.1.7自动分析考勤报表 40 2.2.1.8系统日记设置 41 2.2.1.9设置系统默认通信密码 41 2.2.1.10设置数据库备份路径 41 2.2.1.11通讯参数设置 42 2.2.2系统操作员管理 43 2.2.2.1 添加新操作员 43 2.2.2.2删除操作员 45 2.2.2.3 导出操作员 46 2.2.3修改操作员密码 47 2.2.4系统日志查看 48 2.2.5数据库备份 49 2.2.6数据库恢复 50 2.2.7数据库压缩 52 2.2.8数据库初始化 53 2.2.9系统背景图 54 2.2.10切换操作员 55 2.3设备安装 56 2.3.1设备位置管理 56 2.3.1.1添加安装位置 57 2.3.1.2修改安装位置 57 2.3.1.3删除安装位置 58 2.3.2自动搜索安装设备 59 2.3.2.1 RS232/485通讯设置 59 2.3.2.2TCP/IP局域网通讯设置 60 2.3.2.3 Internet广域网通信方式 62 2.3.3批量安装设备 66 2.3.4手动添加安装控制器 67 2.4 企业信息 68 2.4.1企业信息 68 2.4.2添加/编辑部门信息 69 2.4.2.1添加部门 70 2.4.2.2修改部门 70 2.4.2.3 删除部门 71 2.4.3卡片管理 72 2.4.3.1添加卡片 72 2.4.3.2 修改卡片 73 2.4.3.3 删除卡片 74 2.4.3.4 分配卡片 75 2.4.3.5 添加黑名单 76 2.4.3.6 挂失卡 78 2.4.3.7 卡片恢复 80 2.4.4添加/编辑基本资料 82 2.4.4.1添加基本资料 83 2.4.5添加人事档案(发卡并授权) 85 2.4.5.1 添加人事档案 85 2.4.5.2 修改人事档案 91 2.4.5.3删除人事档案 92 2.4.5.4自动发卡功能 93 2.4.5.5 变更部门 95 2.4.5.6 人事档案的导出与导入 96 2.4.5.7人员定位 98 第三章 门禁信息管理 101 3.1门禁设备管理 101 3.1.1设备属性设置 102 3.1.1.1修改设备信息 102 3.1.1.2修改设备IP与端口 103 3.1.1.3替换设备 107 3.2校准设备时间 107 3.3上传门禁数据 108 3.4 复制权限 110 3.5开门时间段管理 111 3.6设置开门权限 113 3.7按人/按门查看开门权限 115 3.7.1按人员显示开门权限 115 3.7.2按门显示开门权限 116 3.8创建开门密码 117 3.9 采集出入记录 119 3.10查看出入记录 122 3.11 区域人数监控 124 3.11.1区域管理 125 3.11.2区域监控 128 3.11.2.1 区域公告屏设置 131 3.11.2.2LED屏其它信息设置 134 3.12 实时数据监控 137 3.12.1 开启/关闭实时监控 139 3.12.2远程开门 139 3.12.3 语音提示 140 3.12.4 LED公告屏设置 140 3.12.4.1LED屏其它信息设置 142 3.12.5 导入未注册卡 145 3.13电子地图监控 147 3.13.1添加地图 148 3.13.2修改地图 150 3.13.3 删除地图 151 3.13.4添加设备 152 3.13.5 修改设备 153 3.13.6 删除设备 154 3.13.7 视频监控 155 3.13.8语音提示 156 3.13.9 LED公告屏设置 157 3.13.9.1刷卡事件内容 159 3.13.9.2此屏幕关联的门 160 3.13.9.3公告内容 160 3.13.9.4LED副屏 161 3.13.10 LCD监控 162 3.14门内人数限制 164 3.14.1 设置读卡间隔 165 3.14.2设置防潜回 167 3.15报警功能设置 168 3.15.1 门禁消防设置 169 3.15.2 门禁匪警设置 171 3.15.3 防盗主机设置 172 3.15.4 烟感报警设置 174 3.15.5 未注册卡报警 176 3.15.6 胁迫报警设置 178 3.15.7 开门超时报警 179 3.15.8门磁报警设置 181 3.15.9 黑名单报警设置 182 3.16 开门系列功能设置 184 3.16.1开锁保持设置 184 3.16.2远程开门 185 3.16.3定时常开设置 186 3.16.4远程锁定门 188 3.16.5定时锁定门设置 190 3.16.6出入认证方式 191 3.16.7多卡开门设置 193 3.16.7.1固定组多卡开门 194 3.16.7.2组合验证开门 196 3.16.8首卡开门设置 198 3.16.9全卡开门设置 200 3.16.10出门开关设置 202 3.16.11多门互锁设置 203 3.16.11.1单控制板多门互锁 204 3.16.11.2区域互锁 205 3.16.12防潜回设置 208 3.16.12.1单控制板防潜回 209 3.16.12.2区域防潜回 210 3.16.13重复读卡间隔 212 3.16.14内外读卡开门 214 3.16.15卡片过期提前提示 215 3.17其它功能设置 217 3.17.1 节假日设置 217 3.17.2定时读卡播报设置 219 3.17.3语音播报设置 221 3.17.4读卡语音播报 223 3.17.5主板蜂鸣器管理 224 3.17.6开锁输出模式 226 3.17.7防探测锁定设置 227 3.17.8读卡器字节设置 230 3.17.9读卡器键盘设置 231 3.17.10读卡器数据校验设置 233 3.17.11密码键盘管理功能 234 3.17.12从设备获取数据 236 3.17.12.1获取卡号 238 3.17.12.2获取开门密码 238 3.17.12.3获取开门时段 239 3.17.13初始化设备数据 241 3.17.14控制器功能状态 243 3.17.15LED显示屏管理 244 3.17.15.1刷卡事件内容设置 246 3.17.15.2设置此屏幕关联的门 247 3.17.15.3 设置公告内容 248 3.17.15.4LED副屏设置 248 3.17.16软件语音提示设置 249 3.17.17USB数据棒 251 第四章 考勤信息管理 252 4.1指纹考勤机 252 4.1.1指纹考勤机管理 253 4.1.1.1安装指纹考勤机 254 4.1.1.2编辑指纹考勤机 255 4.1.1.3删除指纹考勤机 259 4.1.2指纹管理 260 4.1.2.1新增人员并指纹录入 261 4.1.2.2查询指纹用户 268 4.1.2.3下载指纹 268 4.1.2.4关联指纹号 270 4.1.2.5编辑用户指纹 272 4.1.2.6删除指纹 273 4.1.2.7删除指纹用户 275 4.1.3指纹权限管理 275 4.1.3.1查询指纹权限 276 4.1.3.2编辑人员权限 277 4.1.3.3删除人员权限 279 4.1.4上传指纹 281 4.1.5下载考勤记录 283 4.2脸谱考勤机 285 4.2.1脸谱考勤机管理 286 4.2.1.1安装脸谱考勤机 287 4.2.1.2编辑脸谱考勤机 288 4.2.1.3删除脸谱考勤机 293 4.2.2脸谱管理 294 4.2.2.1新增人员并脸谱录入 295 4.2.2.2查询脸谱用户 301 4.2.2.3下载脸谱 302 4.2.2.4关联脸谱人员 303 4.2.2.5删除脸谱 304 4.2.2.6删除脸谱用户 306 4.2.3脸谱权限管理 306 4.2.3.1查询脸谱权限 307 4.2.3.2编辑人员权限 308 4.2.3.3删除人员权限 310 4.2.4上传脸谱 311 4.2.5下载考勤记录 313 4.3门禁考勤机设置 315 4.3.1添加考勤机 316 4.3.2删除考勤机 318 4.4考勤班次 318 4.4.1增加班次 320 4.4.2修改班次 321 4.4.3删除班次 321 4.4.4 多时段刷卡或加班设置 322 4.5自动排班 323 4.5.1新增排班 324 4.5.1.1按星期排班 324 4.5.1.2按灵活排班 325 4.5.2 修改排班 325 4.5.3 删除排班 326 4.6 考勤人员 326 4.6.1新增考勤人员 328 4.6.2删除考勤人员 329 4.7考勤排班表 329 4.7.1手动设置排班 330 4.7.2手动删除排班 332 4.8设置节假日 332 4.9请假类型的设置 334 4.10请假登记 335 4.10.1添加请假人员 336 4.10.1.1单个添加请假人员 336 4.10.1.2批量添加请假人员 338 4.10.1.3修改请假人员 339 4.10.1.4 删除请假人员 340 4.11 出差登记 340 4.12 签到登记 341 4.12.1添加签到人员 342 4.12.1.1添加单个签到人员 342 4.12.1.2批量添加签到人员 343 4.12.1.3删除签到人员 344 4.13 刷卡明细 345 4.14 考勤报表 347 第五章 巡更信息管理 350 5.1巡更路线 350 5.1.1 添加巡查路线 351 5.1.2修改路线 354 5.1.3删除路线 355 5.2巡更人员 356 5.2.1添加巡查组 357 5.2.2修改巡查组 359 5.2.3删除巡查组 360 5.3巡更计划 361 5.3.1添加巡更计划 362 5.3.2修改巡更计划 363 5.3.3删除巡更计划 365 5.4 采集巡更记录 366 5.5巡更签到 367 5.6 巡更读卡记录 368 5.7 巡更报表 369 5.8 巡更地图 369 第六章 电梯门禁信息管理 372 6.1电梯门禁管理 372 6.1.1添加电梯控制器 373 6.1.2电梯控制器参数设置 376 6.1.2.1电梯基本信息设置 377 6.1.2.2连接参数设置 378 6.1.2.3高级参数设置 380 6.1.2.4报警参数设置 381 6.1.2.5接线演示 382 6.1.3电梯详细信息 383 6.1.3.1楼层信息设置 384 6.1.3.2驱动输出时长 385 6.1.3.3开关信号参数 385 6.1.3.4楼层工作方式 386 6.1.3.5手动控制功能 387 6.1.3.6定时锁定功能 388 6.1.4电梯门禁开锁/关锁 389 6.1.4.1电梯门禁开锁 390 6.1.4.2电梯门禁关锁 391 6.2电梯时段管理 393 6.3 电梯权限管理 395 6.4查看电梯权限 396 6.5提取电梯记录 398 6.6 查看电梯记录 399 6.7电梯密码 400 6.8从电梯获取数据 404 6.9电梯数据监控 406

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值