当前位置:网站首页>Post - payload of interface test
Post - payload of interface test
2022-06-11 07:53:00 【zljun8210】
Project use Post Method , Parameter use payload, The code is as follows :
# -*- coding: utf-8 -*-
"""
-------------------------------------------------
File Name: LoginsTest.py
Description :
Author : Zeng Liangjun
QQ: 277099728
Date: 8/11/2021 3:46 PM
-------------------------------------------------
Change Activity:
8/11/2021:
-------------------------------------------------
"""
__author__ = 'ljzeng'
import requests
url = 'http://*/Login.aspx?tp=dologin'
username = 'username'
password = 'password'
ss = username + 'ª' + password
payload = ss.encode('utf8')
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36',
'Content-Type': 'text/plain;charset=UTF-8'}
req = requests.post(url=url, data=payload, headers=headers)
list = []
for a in req.text.split(','):
list += [a]
resu = list[0].split(':')[1]
if resu !=str(0):
mess = list[1].split(':')[1]
mess = mess[1:-1]
print(" Login failed ! ")
print(mess)
else:
jumpurl = list[2][11:-1]
print(" Login successful ! ")
print(' Jump to : ', jumpurl)边栏推荐
- Remote office experience sharing | community essay solicitation
- [atcoder1980] mystious light (mathematical simulation)
- Qunhui ds918 creates m.2 SSD read / write cache
- C language to achieve three piece chess (not artificial mental retardation ha ha ha)
- 2021-11-05 definition of cache
- [IOT] project management: how to build a better cross functional team?
- Pycrypto packaging error
- Tidb cloud launched Google cloud marketplace, empowering global developers with a new stack of real-time HTAP databases
- Bidirectional linked list simple template (pointer version)
- 排序——交换排序
猜你喜欢

Import on CSDN MD file

空间几何

Getting started with bladed tutorial (video)

测试4年裸辞失业,面试15k的测试岗被按在地上摩擦,结局让我崩溃大哭...

TiDB Cloud 上线 Google Cloud Marketplace,以全新一栈式实时 HTAP 数据库赋能全球开发者

C language Yanghui triangle code

图数据库无缝集成Tushare接口
![[atcoder1980] mystious light (mathematical simulation)](/img/c0/7de31b36e11ff71328d927c1d1c2d3.png)
[atcoder1980] mystious light (mathematical simulation)

Lesson 1 about Xiaobai's C language

C# 微信上传Form-data
随机推荐
C. Managing history (greedy / hashing / thinking / good questions)
Space geometry
【软件测试】这样的简历已经刷掉了90%的面试者
测试4年裸辞失业,面试15k的测试岗被按在地上摩擦,结局让我崩溃大哭...
Bladed入門教程(視頻)
YUV数据的裁剪与重叠
Servlet
学习《缠解论语》
Using Tkinter to realize guessing numbers game
C language lesson 2
放大镜子效果图
二本毕业,银行外包测试工作 4 个月有余。聊聊一些真实感受 ...
Bidirectional linked list simple template (pointer version)
2022.6.6 extra long growth simulation
forEach 中 return 和 for 中 break
Flask页面的分页
2021-10-17
Methods to improve training speed in deep learning and techniques to reduce video memory (suitable for entry-level trick without too many computing resources)
mpi
零基础自学SQL课程 | UNION 联合查询