1 #求一百以内奇数之和 2 #用while语句好像不好求和? 3 n=1 4 s=0 5 while n < 101: 6 temp=n%2 7 if temp == 0: 8 pass 9 else: 10 s = s + n 11 n = n + 1 12 print(s) 13 14 15 ...
分类:
其他好文 时间:
2020-02-25 09:26:14
阅读次数:
49
Redis 密码设置和查看密码 Redis没有实现访问控制这个功能,但是它提供了一个轻量级的认证方式,可以编辑redis.conf配置来启用认证。 1、初始化Redis密码: 在配置文件中有个参数: requirepass 这个就是配置redis访问密码的参数; 比如 requirepass tes ...
分类:
其他好文 时间:
2020-02-25 00:31:14
阅读次数:
97
[TOC] 一、注册接口 urls.py views.py serializers.py 二、登录接口 调用写好的登录接口即可 三、用户中心接口(权限校验) urls.py views.py serializers.py 四、图书资源接口 urls.py views.py serializers.p ...
分类:
其他好文 时间:
2020-02-25 00:15:51
阅读次数:
73
添加用户报错,无法打开/etc/passwd文件 [root@backup ~]# useradd 123456 useradd: cannot open /etc/passwd 此问题是 chattr +i /etc/passwd吧文件属性改了, 可以使用chattr -i来还原配置。 chatt ...
分类:
其他好文 时间:
2020-02-24 13:24:52
阅读次数:
76
在编程过程中为了增加友好性,在程序出现bug时一般不会将错误信息显示给用户,而是显示一个提示的页面 try: pass except Exception as e: pass 异常种类 AttributeError 试图访问一个对象没有的树形,比如foo.x,但是foo没有属性x IOError 输 ...
分类:
其他好文 时间:
2020-02-24 09:22:11
阅读次数:
69
这题的知识点是绕过密码的md5验证,参考Y1ng师傅的文章 看到题目,fuzz了一下,过滤的并不多 而且页面源码有给sql语句,不过需要先base32再base64解码 select * from user where username = '$name' 直接可以用联合注入,表里有三列 1' Or ...
分类:
数据库 时间:
2020-02-24 00:50:36
阅读次数:
218
import requests from requests.auth import HTTPDigestAuth url = 'https://httpbin.org/digest-auth/auth/user/pass' resp = requests.get(url,auth=HTTPDiges ...
分类:
编程语言 时间:
2020-02-24 00:29:36
阅读次数:
187
打开环境,发现依旧是sql注入 GitHub上有源码(https://github.com/team-su/SUCTF-2019/tree/master/Web/easy_sql) index.php源码 <?php session_start(); include_once "config.php ...
分类:
数据库 时间:
2020-02-23 20:35:01
阅读次数:
255
题目: Given a binary tree, find the length of the longest path where each node in the path has the same value. This path may or may not pass through the ...
分类:
编程语言 时间:
2020-02-23 19:56:52
阅读次数:
92
1、创建一个测试数据库 -- 创建数据库 CREATE DATABASE test; 2、创建一个本地访问数据库的账户 - 创建用户 CREATE USER 'username' @ 'localhost' IDENTIFIED BY 'password';参数:username:数据库访问的账户; ...
分类:
数据库 时间:
2020-02-23 16:19:39
阅读次数:
311