- 博客(23)
- 资源 (8)
- 收藏
- 关注
原创 贷款计算
#贷款计算 #百分比 利率 m_rate_basic = 5.9 m_rate_fund = 4.0 #利率优惠 m_multi = 1.1 #m_rate_basic = 6.1 #m_rate_fund = 4 #m_multi = 1 #以元为单位 贷款本金 m_money_basic = 1000000 m_money_fund = 300000 #以年为单位 贷款年数 m_year
2015-05-04 17:18:31
908
原创 VMWare安装kali之后的设置
1、更换apt源为阿里源 root@jiaduobao:~# vim /etc/apt/sources.list 添加下面内容: deb http://mirrors.aliyun.com/kali kali main non-free contrib deb-src http://mirrors.aliyun.com/kali kali main non-free contrib de
2015-03-23 18:18:09
1060
原创 首发论文-数据安全与计算机安全 - 中国科技论文在线 ####统计######
#encoding = utf-8 import urllib2 import urllib from HTMLParser import * class parselinks(HTMLParser): def __init__(self): self.data=[] self.link=[] self.href=0 sel
2014-02-18 12:15:16
3053
原创 virustotal提交目录样本
def vt_submit(file): host = "www.virustotal.com" selector = "https://www.virustotal.com/vtapi/v2/file/scan" fields = [("apikey", "22222222222222222222222222222222222222222222222222222")] file_to_send = open(file, "rb").read() files = [(
2014-01-24 10:33:30
1730
原创 virustotal.com上的公共接口学习
postfile.py文件 来自官方指示:http://code.activestate.com/recipes/146306/ 下面是对应代码: import httplib, mimetypes def post_multipart(host, selector, fields, files): """ Post fields and files to an http
2014-01-24 09:23:40
4280
原创 看一下一段时间内58.com对应的ip会不会变化。
一定要记得文件打开要close掉,不然写入的内容会不成功。 import socket import time hostname='www.58.com' ip = socket.gethostbyname(hostname) for i in range(10000): file_1 = open("ip",'a') #print file_1 file_write
2014-01-21 12:19:34
961
原创 下载 显示时间
import time import urllib ISOTIMEFORMAT='%Y-%m-%d %X' print time.localtime() urllib.urlretrieve("http://www.baidu.com","C:\\Python_s\\111") urllib.urlretrieve("http://www.baidu.com","C:\\Python_s\\2
2014-01-17 13:48:24
652
原创 统计某个网站内的一些内容,很不完善。大家不要看了,浪费时间
#coding = gb2312 #from HTMLParser import HTMLParser from HTMLParser import * #import HTMLParser import urllib import sys import time import MySQLdb #html_parser = HTMLParser.HTMLParser() def db_ins
2014-01-17 10:09:14
737
原创 修改文件夹名字为内部excel中的某个位置的名字
如果存在多个excel,应该会改为最后读到的excel中的指定位置的名字。这儿没做判断和筛选。 import os import xlrd dir_1='D:\\sample\\0103\\modify_name' for fileName in os.listdir(dir_1): if not os.path.isfile(fileName): #prin
2014-01-17 10:06:16
812
原创 触发异常,自定义异常的例子。。
#Filename:13.2.py class ShortInputException(Exception): def __init__(self,length,atleast): Exception.__init__(self); self.length=length; self.atleast=atleast; try: s=raw_input('Enter somethi
2013-12-23 14:15:49
766
原创 按Ctrl-d不会引发EOFError。为何????
按Ctrl-d不会引发EOFError。为何???? #Filename:13.1.py import sys try: s=raw_input('Enter something-->'); except EOFError: print "\nWhy did you do an EOF on me?"; sys.exit(); except: print "\n"; print 'D
2013-12-23 13:47:29
1059
1
原创 python中支持中文方法
在代码开头加上下面一句即可。 #coding=gbk 参考: http://blog.youkuaiyun.com/kernelspirit/article/details/2650696
2013-12-23 12:07:44
963
原创 存储器的简单例子
#!Filename:12.2.py import cPickle as p; #shoplistfile = shoplist.data; shoplist = ['apple','mango','carrot']; f = file('shoplistfile','w'); p.dump(shoplist,f); f.close(); del shoplist; f=file('sh
2013-12-23 12:04:41
832
原创 简单的文件操作的例子
#!Filename:12.1.py temp="adfasfddasf"; f=file('poem.txt','a'); f.write(temp); f.close(); f=file('poem.txt'); while True: line=f.readline(); if len(line)==0: break; print line; f.close();
2013-12-23 11:44:53
656
原创 base64加密---例子
123 base64加密过程: 123 49 50 51 31 32 33 00110001 00110010 00110011 001100 010011 001000 110011 00001100 00010011 00001000 00110011 12 19 8 51 MTIz Base64编码说明 Base64
2013-12-21 20:45:30
752
原创 简单的DLL注入
要注入的dll: // test.cpp : Defines the entry point for the DLL application. // #include "stdafx.h" BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call,
2013-12-14 20:29:43
747
原创 argc,argv的含义
argc 是指命令行输入参数的个数,argv存储了所有的命令行参数。 #include "stdio.h" int main(int argc, char *argv[]) { int n = 0; // printf("dddddd\n"); // printf("run ...\n"); printf("argc=%d\n", argc); for(n=0; n<
2013-12-14 19:51:11
912
原创 生成数字字典
要求: Windows系统。 $infile="c:\zidian"; $number=1000000000; if(open(INFILE,">>$infile")){ print "sucess"; while($number<1100000000){ print INFILE ($number); print INFILE "\n"; $number++; } }
2013-12-09 11:59:19
925
原创 python三引号
python 三引号的形式用来输入多行文本,也就是说在三引号之间输入的内容将被原样保留,之中的单号和双引号不用转义,其中的不可见字符比如\n和\t都会被保留,这样的好处是你可以替换一些多行的文本。
2013-12-07 09:22:00
782
转载 转义字符
转义字符 意义 ASCII码值(十进制) \a 响铃(BEL) 007 \b 退格(BS) ,将当前位置移到前一列 008 \f 换页(FF),将当前位置移到下页开头 012 \n 换行
2013-12-07 09:04:22
668
原创 顺序及注意事项
打开vs2008 -》新建 -》项目-》Win32项目(输入net) -》确定 -》下一步 -》DLL(空项目打勾)-》完成。 打开vs2008 -》新建 -》项目-》Win32项目(输入app)(添入上面的解决方案) -》确定 -》下一步 -》控制台应用程序(空项目打勾)-》完成。 向各自的工程下添加头文件和源文件,添加时注意选择文件夹。之后进行编译成功。 若不成功,修改 项目
2013-12-04 10:27:58
706
原创 Detou简单使用实例
打开vs2008 -》新建 -》项目-》Win32项目(输入DetourHook) -》确定 -》下一步 -》Windows应用程序(其它默认)-》完成。 把下面代码完全拷贝到DetourHook.cpp中,DetourHook.cpp中原来代码完全删除。编译。通过。。有警告忽略处理。。。。。 #include "stdafx.h" #include "DetourHook.h" #inclu
2013-12-03 20:53:29
832
sdbot.rar典型的基于irc僵尸程序源码
2014-02-13
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅