Python登陆接口小程序版本V1Python#!/usr/bin/envpython
#_*_coding:utf-8_*_
__author__=‘gaogd‘
importMySQLdbasmysql
importdatetime
classAuthon(object):
def__init__(self):
self.db=mysql.connect(user="root",passwd="XXXX@2015",db="logintest",host="192.168.10.1..
分类:
编程语言 时间:
2016-09-02 23:38:52
阅读次数:
328
1、显示当前系统上root、fedora或user1用户的默认shell;[root@C7-1~]#useraddfedora#新建用户fedora
[root@C7-1~]#useradduser1#新建用户user1
[root@C7-1~]#egrep‘^(root|fedora|user1)\>‘/etc/passwd|cut-d:-f1,7#由于(root|fedora|user1)是扩展表达式,所以要使用egrep..
分类:
其他好文 时间:
2016-09-02 16:07:52
阅读次数:
173
Python脚本如下:#!/usr/bin/envpython
#_*_coding:utf-8_*_
__author__=‘gaogd‘
importMySQLdbasmysql
importdatetime
importsys,os,urllib2,json
db=mysql.connect(user="root",passwd="xxxx@2015",db="intest",host="192.168.10.12")#数据库连接信息
db.autocommit(True)..
分类:
编程语言 时间:
2016-09-01 16:41:51
阅读次数:
192
Python脚本如下:#!/usr/bin/envpython
#_*_coding:utf-8_*_
__author__=‘lvnian‘
#!/usr/binenvpython
#coding:utf-8
importMySQLdbasmysql
importsys,os
db=mysql.connect(user="root",passwd="xxxxx@2015",db="intest",host="192.168.10.12")#数据库连接信息
db.autocommi..
分类:
编程语言 时间:
2016-09-01 16:36:04
阅读次数:
196
1.在/etc/yum.repos.d/目录下创建一个源配置文件nginx.repo: cd /etc/yum.repos.d/ vi nginx.repo 填写如下内容: [nginx] name=nginx repo baseurl=http://nginx.org/packages/cento ...
分类:
其他好文 时间:
2016-09-01 16:04:32
阅读次数:
114
这两天在配置Ubuntu 14.04的环境时,碰到一个典型的问题:在用xshell 连接Ubuntu时,显示"SSH服务器拒绝密码检测"的问题,在经过一系列配置修改后,最终怀疑是否密码太简单,于是将密码难度进行调整,问题得以解决。 linuxidc@ubuntu:~$ sudo passwd[sud ...
分类:
其他好文 时间:
2016-09-01 14:37:53
阅读次数:
153
//DbUtil.h #ifndef DBUTIL_H#define DBUTIL_H using namespace std; QString md5Encode(QString passwd);class DbUtil { public: static QString checkNameT; s ...
分类:
其他好文 时间:
2016-08-31 22:19:51
阅读次数:
366
PASSWD=123456USER=rootREP_HOST=10.10.10.70REP_PORT=3306REP_USER=slaveREP_PASSWD=123456@REP_FILE=mysql-bin.000021REP_POS=863718 if [ ! -f /var/lock/mys ...
分类:
数据库 时间:
2016-08-31 22:07:20
阅读次数:
209
1、which[root@lb01~]#whichpasswd
/usr/bin/passwd
#which-showsthefullpathof(shell)commands.
#显示命令的全路径2、whereis[root@lb01~]#whereispasswd
passwd:/usr/bin/passwd/etc/passwd/usr/share/man/man5/passwd.5.gz/usr/share/man/man1/passwd.1.gz
#whereis-locatet..
分类:
系统相关 时间:
2016-08-31 12:22:56
阅读次数:
187
1、显示当前系统上root、fedora或user1用户的默认shell;grep-E"^(root|fedora|user1)\>"/etc/passwd|cut-d:-f1,72、找出/etc/rc.d/init.d/functions文件中某单词后面跟一组小括号的行,形如:hello();grep-E"[[:alpha:]]+\(\)+"/etc/rc.d/init.d/functions3、使用echo命令..
分类:
其他好文 时间:
2016-08-31 12:21:01
阅读次数:
136