# 调用注册接口
```
# -*- coding: utf-8 -*-
# @Time : 2018/11/16 10:46
# @Author : sunjicheng
#!/usr/bin/python3.8
import requests
import json
import datetime
import random
import redis
import time
#url = 'http://172.16.3.41:8041/chain/love/app/user/register'
url='http://172.16.3.41/gateway.action'
def generate_random_str(randomlength):
"""
生成一个指定长度的随机字符串
"""
random_str = ''
base_str = '0123456789'
base_str2='ABCDEFGHIGKLMNOPQRSTUVWXYZabcdefghigklmnopqrstuvwxyz0123456789'
length = len(base_str) - 1
for i in range(randomlength):
random_str += base_str[random.randint(0, length)]
return random_str
headers={
'Accept': 'application/json;charset=UTF-8',
'Accept-Encoding': 'gzip, deflate',
'Accept-Language': 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2',
'Cache-Control': 'max-age=0',
'Connection': 'keep-alive',
'Content-Type':'application/json',
}
s=generate_random_str(5000)
#print(s)
headers={
'Content-Type':'application/json',
}
'''
init=111211
count=1112111
while count <= 1112116:
count=count + 1
payload = {"stateNo": "86", "phone": "13610707306", "password": "123456", "repassword": "123456",
"smsCode": "106147", "username": "sunsun" + str(count), "inviteCode": "sunsun" + str(init)}
r = requests.post(url, headers=headers, data=json.dumps(payload))
print(payload)
print(r.status_code)
print(r.text)
'''
'''
if count1 ==11316:
break
'''
print( random.randint(1,10) )
#userId 517801438209703936
#ent_id 1
phone1=13000000000
while phone1 <= 13000010000:
phone1=phone1 + random.randint(1,10)
print(phone1)
r = redis.Redis(host='172.16.3.41', password='BH123!@#', port=6379, db=1)
r.set(phone1, '\"123123\"', 600)
#print(r.get(phone1))
t = int(round(time.time() * 1000))
#print(t)
payload ={"appId": 1000000229591911, "timestamp": 1550224644490, "version": "1.1.0",
"sign": "n8AoFF7AI3lgsDWHcogUs0L4vDBpwWcS4tf40py1pay85lixJZ4R98GA4K7FhT/BjnkV+VtbG7+p4J1hxvBOkMVgcoZfZgTzA/H05FaUozaqcqWWDWQ9mEzUGX87cNNlqF20LFt5Dzr6yokFmPSGLL8GIkwa8VkeVb+GtHRwguI=",
"method": "bh.newretail.user.register",
"content": {"inviterCode": "", "inviterPhone": "18511589153", "registerPhone":phone1,
"verification": "123123", "password": "123456"}, "platform": "android", "greenChannel":"rgbWa}ji7tS7"}
'''
payload = {"appId": "1000000229591911", "timestamp": t, "method": "bh.newretail.user.register","sign":"",
"content": {"phone":phone1, "verification": "123123", "inviteCode": "ductnC"}, "version": "1.0","platform":"android", "greenChannel":"rgbWa}ji7tS7"}
'''
r = requests.post(url, headers=headers, data=json.dumps(payload))
print(payload)
print(r.status_code)
print(r.text)
'''
'''
```
- Linux
- linux常用命令
- awk
- cp
- scp
- mv
- screen工具
- rsync
- Linux设置静态IP
- vim常用
- ssh免密登录
- linux挂载磁盘和开机自动挂载
- 文件的时间戳
- 重定向
- 防火墙
- Vultr 服务器利用快照更换IP
- ss
- node-yarn
- ES安装向导
- lnmp/lamp
- windows安装mysql
- windows安装nginx
- Let'sEncrypt 免费通配符/泛域名SSL证书
- 开机自动挂载硬盘
- 普通用户提权
- ELK日志分析系统
- Docker
- docker
- centos7安装docker
- Centos7安装redis
- CentOS 7 使用Docker搭建Nginx
- CentOS 7 使用Docker搭建Jenkins
- CentOS 7 使用Docker搭建Zookeeper
- CentOS 7 使用Docker搭建Tomcat
- CentOS 7 使用Docker搭建Mysql
- CentOS 7 使用Docker搭建PHP环境
- 使用docker搭建Swagger
- docker阿里云私有仓库
- docker zookeeper集群
- docker部署ES
- docker之java容器运行外置springboot-jar
- docker部署owncloud云盘
- ETCD
- centos7部署etcd节点
- Dockerfile
- Docker-compose
- gitlab.yml
- db.yml
- 安装docker-compose
- gitlab-docker-compose.yml
- nginx-docker-compose.yml
- Mysql
- mysql开启远程访问及相关权限控制
- mysql授权
- mysql快速导出导入大数据
- mysql单机备份
- binlog日志
- shell
- 经典案例
- 俄罗斯方块游戏
- 系统初始化
- 服务器监控
- go基础环境
- shell.监控日志.elk
- shell.检查各服务脚本
- shell.删除文件脚本
- shell.守护进程
- shell.数据库
- shell.Ansible
- shell.dev
- shell.ftp环境
- shell.docker环境
- shell.k8s环境
- k8s.二进制安装
- K8s.一主多从
- k8s.三主两从高可用
- k8s.检查服务与配置
- k8s.jenkins
- k8s.gitlab
- go-install.sh
- jenkins-install.sh
- node-install.sh
- redis-install.sh
- zabbix-install.sh
- zabbix-dockerfile.sh
- nginx-install.sh
- shell变量
- 用户自定义变量
- 环境变量
- shell特殊变量
- shell条件判断
- 流程控制
- shell运算符
- Shell _printf
- shell_test
- shell函数
- 输出重定向
- 网络相关
- 安全相关
- 堡垒机部署
- 区块链威胁情报共享平台
- 签名与验签
- 浅谈区块链
- 智能合约
- 黄金币GTF智能合约
- 节点
- 以太坊公链私链geth同步
- 比特节点同步
- BTC节点错误解决方法
- eth硬分叉
- omni钱包节点搭建
- 架构
- K8s
- 搭建k8s集群完整篇
- 二进制部署k8s
- Devops
- git
- Jenkins
- svn
- 禅道
- CI/CD
- docker+jenkins+golang持续集成持续交付(CI/CD)
- 项目部署
- config.env
- docker-compose.yml
- Dockerfile模板
- .dockerignore
- run.sh
- nginx.conf模板
- 跨域
- jenkins配置
- 测试
- Python