09 2016 档案

摘要:如果是开源的Python代码,为了能够让大家更方便的使用,放到PyPI上也许是个非常不错的主意(PyPI:Python Package Index)。刚开始我以为要将代码打包放到PyPI上是一件非常复杂繁琐的事情,不过看过《Dive Into Python 3》的PACKAGING PYTHON L 阅读全文
posted @ 2016-09-30 10:00 godjob 阅读(616) 评论(0) 推荐(0)
摘要:如果你有多个模块需要发布,而它们又存在于多个包中,那么指定整个包比指定模块可能要容易地多。即使你的模块并不在一个包内,这种做法也行的通;你可以告诉Distutils从根包(root package)处理模块,并且它工作起来和其他任意的包一样(除非你不需要拥有一个__init__.py文件)。 例1. 阅读全文
posted @ 2016-09-30 09:19 godjob 阅读(4509) 评论(0) 推荐(1)
摘要:加权随机算法一般应用在以下场景:有一个集合S,里面比如有A,B,C,D这四项。这时我们想随机从中抽取一项,但是抽取的概率不同,比如我们希望抽到A的概率是50%,抽到B和C的概率是20%,D的概率是10%。一般来说,我们可以给各项附一个权重,抽取的概率正比于这个权重。那么上述集合就成了: {A:5,B 阅读全文
posted @ 2016-09-28 21:16 godjob 阅读(17035) 评论(0) 推荐(0)
摘要:Linux comes with a host based firewall called Netfilter. According to the official project site: netfilter is a set of hooks inside the Linux kernel t 阅读全文
posted @ 2016-09-28 09:59 godjob 阅读(307) 评论(0) 推荐(0)
摘要:Nmap is short for Network Mapper. It is an open source security tool for network exploration, security scanning and auditing. However, nmap command co 阅读全文
posted @ 2016-09-27 18:14 godjob 阅读(454) 评论(0) 推荐(0)
摘要:Search in Rotated Sorted Array I Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 阅读全文
posted @ 2016-09-27 16:32 godjob 阅读(187) 评论(0) 推荐(0)
摘要:0x01 看一条规则alert tcp any any -> any any (content:"union";http_uri;nocase;content:"select":nocase;http_uri;)下面这两条会触发哪一条?http://foo.com?id=union select h 阅读全文
posted @ 2016-09-26 16:53 godjob 阅读(2260) 评论(0) 推荐(1)
摘要:If you've worked with Django at some point you probably had the need for some background processing of long running tasks. Chances are you've used som 阅读全文
posted @ 2016-09-26 10:37 godjob 阅读(223) 评论(0) 推荐(0)
摘要:Nmap 是一個開放原始碼的網路掃描與探測工具,可以讓網路管理者掃描整個子網域或主機的連接埠等,功能非常強大。 Nmap(Network Mapper)是一個開放原始碼的網路檢測工具,它的功能非常強大,這裡整理了許多使用範例,讓初學者可以快速上手。 安裝 一般的 Linux 系統通常都會將 Nmap 阅读全文
posted @ 2016-09-25 13:56 godjob 阅读(983) 评论(0) 推荐(0)
摘要:在 It's FOSS 我们并非每天都谈论 Linux 的“命令行方面”。基本上,我更专注于 Linux 的桌面端。但你们读者中的一些人在内部调查(仅面向 It's FOSS newsletter 订阅者)中指出,你们也想学些命令行技巧。速查表也受大部分读者所喜欢和支持。 为此,我编辑了一个 Lin 阅读全文
posted @ 2016-09-24 10:13 godjob 阅读(2685) 评论(0) 推荐(0)
摘要:下述範例描述了電影同導演的多對一關係。範例中說明了從用戶定義的Python類建立數據表的方法,雙方關係例項的建立方法,以及最終查詢數據的方法:包括延遲載入和預先載入兩種自動生成的SQL查詢。 結構定義 建立兩個Python類以及DBMS中對應的數據表: from sqlalchemy import 阅读全文
posted @ 2016-09-23 16:01 godjob 阅读(699) 评论(0) 推荐(0)
摘要:语法:wc [选项] 文件… 说明:该命令统计给定文件中的字节数、字数、行数。如果没有给出文件名,则从标准输入读取。wc同时也给出所有指定文件的总统计数。字是由空格字符区分开的最大字符串。 该命令各选项含义如下: - c 统计字节数。 - l 统计行数。 - w 统计字数。 这些选项可以组合使用。 阅读全文
posted @ 2016-09-23 09:33 godjob 阅读(892) 评论(0) 推荐(0)
摘要:为了防止网络的拥塞现象,TCP提出了一系列的拥塞控制机制。最初由V. Jacobson在1988年的论文中提出的TCP的拥塞控制由“慢启动(Slow start)”和“拥塞避免(Congestion avoidance)”组成,后来TCP Reno版本中又针对性的加入了“快速重传(Fast retr 阅读全文
posted @ 2016-09-22 19:14 godjob 阅读(4303) 评论(0) 推荐(1)
摘要:数值 MySQL 的数值数据类型可以大致划分为两个类别,一个是整数,另一个是浮点数或小数。 许多不同的子类型对这些类别中的每一个都是可用的,每个子类型支持不同大小的数据,并且 MySQL 允许我们指定数值字段中的值是否有正负之分(UNSIGNED)或者用零填补(ZEROFILL)。 INT 在 My 阅读全文
posted @ 2016-09-22 14:40 godjob 阅读(19503) 评论(0) 推荐(0)
摘要:PostgreSQL can be installed using RPMs (binary) or SRPMs (source) managed by YUM. This is available for the following Linux distributions (both 32- an 阅读全文
posted @ 2016-09-22 10:56 godjob 阅读(577) 评论(0) 推荐(0)
摘要:一、简介 PostgreSQL 是一种非常复杂的对象-关系型数据库管理系统(ORDBMS),也是目前功能最强大,特性最丰富和最复杂的自由软件数据库系统。有些特性甚至连商业数据库都不具备。这个起源于伯克利(BSD)的数据库研究计划目前已经衍生成一项国际开发项目,并且有非常广泛的用户。 二、系统环境 系 阅读全文
posted @ 2016-09-22 10:45 godjob 阅读(892) 评论(0) 推荐(0)
摘要:Iptables is an extremely flexible firewall utility built for Linux operating systems. Whether you’re a novice Linux geek or a system administrator, th 阅读全文
posted @ 2016-09-13 10:07 godjob 阅读(283) 评论(0) 推荐(0)
摘要:A new ransomware variant, named “Fsociety Locker” (“Fsociety ALpha 1.0”), showed up recently seeking a place in the threat marketplace. The authors of 阅读全文
posted @ 2016-09-09 10:46 godjob 阅读(832) 评论(0) 推荐(0)
摘要:1 实验目的 在linux或windows任意一个平台下完成snort的安装,使snort工作在NIDS模式下,并编写符合相关情景要求的snort规则。 2 实验环境 物理机:windows 8.1 虚拟机:ubuntu 12.04 和 windows xp sp3 软件:winpcap 4.0.2 阅读全文
posted @ 2016-09-07 14:37 godjob 阅读(2068) 评论(0) 推荐(0)
摘要:本周,CloudFlare宣布,开始提供Keyless服务,即你把网站放到它们的CDN上,不用提供自己的私钥,也能使用SSL加密链接。 我看了CloudFlare的说明(这里和这里),突然意识到这是绝好的例子,可以用来说明SSL/TLS协议的运行机制。它配有插图,很容易看懂。 下面,我就用这些图片作 阅读全文
posted @ 2016-09-03 17:40 godjob 阅读(207) 评论(0) 推荐(0)
摘要:DNS 是互联网核心协议之一。不管是上网浏览,还是编程开发,都需要了解一点它的知识。 本文详细介绍DNS的原理,以及如何运用工具软件观察它的运作。我的目标是,读完此文后,你就能完全理解DNS。 一、DNS 是什么? DNS (Domain Name System 的缩写)的作用非常简单,就是根据域名 阅读全文
posted @ 2016-09-03 12:23 godjob 阅读(206) 评论(0) 推荐(0)
摘要:Contents Introduction Understanding the default output What can I discover? How do I … Get a short answer? Get a not-quite-so-short answer? Get a long 阅读全文
posted @ 2016-09-03 09:26 godjob 阅读(361) 评论(0) 推荐(0)
摘要:There are lots of free tools available online to get easy access to the WiFi networks intended to help the network admins and the programmers working 阅读全文
posted @ 2016-09-02 20:28 godjob 阅读(302) 评论(0) 推荐(0)
摘要:SSH原理与运用(二):远程操作与端口转发 作者:阮一峰 (Image credit: Tony Narlock) 七、远程操作 SSH不仅可以用于远程主机登录,还可以直接在远程主机上执行操作。 上一节的操作,就是一个例子: $ ssh user@host 'mkdir -p .ssh && cat 阅读全文
posted @ 2016-09-02 18:13 godjob 阅读(219) 评论(0) 推荐(0)
摘要:SSH是每一台Linux电脑的标准配置。 随着Linux设备从电脑逐渐扩展到手机、外设和家用电器,SSH的使用范围也越来越广。不仅程序员离不开它,很多普通用户也每天使用。 SSH具备多种功能,可以用于很多场合。有些事情,没有它就是办不成。本文是我的学习笔记,总结和解释了SSH的常见用法,希望对大家有 阅读全文
posted @ 2016-09-02 15:59 godjob 阅读(147) 评论(0) 推荐(0)
摘要:Protocol The *** protocol is very similar to SOCKS5 but encrypted and simpler. Below is the structure of a *** request (sent from clie 阅读全文
posted @ 2016-09-01 23:59 godjob 阅读(230) 评论(0) 推荐(0)
摘要:密码学中,区块(Block)密码的工作模式(英语:mode of operation)允许使用同一个区块密码密钥对多于一块的数据进行加密,并保证其安全性。[1][2] 区块密码自身只能加密长度等于密码区块长度的单块数据,若要加密变长数据,则数据必须先被划分为一些单独的密码块。通常而言,最后一块数据也 阅读全文
posted @ 2016-09-01 22:59 godjob 阅读(3990) 评论(0) 推荐(0)
摘要:文件形式的邮件 #!/usr/bin/env python3 #coding: utf-8 import smtplib from email.mime.text import MIMEText from email.header import Header sender = '***' recei 阅读全文
posted @ 2016-09-01 16:53 godjob 阅读(698) 评论(0) 推荐(0)
摘要:2. TCP keepalive overview In order to understand what TCP keepalive (which we will just call keepalive) does, you need do nothing more than read the n 阅读全文
posted @ 2016-09-01 12:48 godjob 阅读(258) 评论(0) 推荐(0)