首页 > 其他分享 >login

login

时间:2023-08-08 22:22:38浏览次数:25  
标签:__ get conf login data md5

# configs/configs.ini

[servers]
DEV = http://ip:port

 

 

#libs/login_sig.py
import requests import hashlib import configparser def get_host(): conf_info=configparser.ConfigParser() conf_info.read('D:\python-pro\py0803\configs\config.ini') value = conf_info.get('servers','DEV') return value def login(data): url=f'{get_host()}/account/sLogin' payload=data res=requests.request('POST',url=url,data=payload) return res def get_md5(data): # 先转码encode # 再加密 # 再解码 data_md5=hashlib.md5(data.encode()).hexdigest() return data_md5 if __name__ == '__main__': test_data={'username':'ct0356', 'password':get_md5('111111') } result=login(test_data) print(result.text) # get_host()

 

标签:__,get,conf,login,data,md5
From: https://www.cnblogs.com/haha1988/p/17615552.html

相关文章

  • FindByNameAsync vs FindByIdAsync vs FindByEmailAsync vs FindByLoginAsync
    InASP.NETIdentity,UserManagerisacoreclassthatprovidesasetofAPIstomanageuseraccounts.Themethodsyoumentioned(FindByNameAsync,FindByIdAsync,FindByEmailAsync,andFindByLoginAsync)areusedtofindauserbasedondifferentcriteria.T......
  • How to get User Name from External Login in ASP.NET Core?
    HowtogetUserNamefromExternalLogininASP.NETCore? 回答1DoyouhaveaccesstoSignInManagerorcanyouinjectit?Ifyes,thenthisishowyouwouldaccessuserid(username),email,first&lastname:publicclassMyController:Microsoft.Asp......
  • docker login&&docker search 时报错
    在dockersearch时报错(centos7-9)问题:Errorresponsefromdaemon:Get"https://index.docker.io/v1/search?q=centos&n=25":dialtcp:lookupindex.docker.ioon192.168.6.2:53:readudp192.168.6.137:47270->192.168.6.2:53:i/otimeout  dns问题无......
  • 筛选出 1指定行( 编号中包含login的行),2指定列的值 放到列表中
    第一版 写死了列的值的下标,不够人性化,还需要去数列在第几个位置#导包importxlrd#第一步根据包提供的方法读某个路径下的xlsworkbook=xlrd.open_workbook('../data/testcase.xls')#第二步根据名字找某个表每个excel里有Sheet1Sheet2等worksheet=wor......
  • hadoop-eclipse开发环境搭建及error: failure to login错误
    对于Hadoop开发者来讲,通过JAVAAPI编程是进入Map-Reduce分布式开发的第一步。由于Eclipse本身并没有提供对MapReduce编程模式的支持,所以需要一些简单的步骤来实现。1.安装Hadoop。本文的Hadoop是部署在虚拟机上的伪分布模式。相关软件环境如下:JDK:sunjdk1.6.0_30Hadoop:hadoop-0......
  • nologin
    nologin拒绝用户登录系统补充说明nologin命令可以实现礼貌地拒绝用户登录系统,同时给出信息。如果尝试以这类用户登录,就在log里添加记录,然后在终端输出Thisaccountiscurrentlynotavailable信息,就是这样。一般设置这样的帐号是给启动服务的账号所用的,这只是让服务启动起来,......
  • rlogin
    rlogin从当前终端登录到远程Linux主机补充说明rlogin命令用于从当前终端登录到远程Linux主机。语法rlogin(选项)(参数)选项-8:允许输入8位字符数据;-e脱离字符>:设置脱离字符;-E:滤除脱离字符;-l用户名称>:指定要登入远端主机的用户名称;-L:使用litout模式进行远端登入阶段操......
  • login remote with ssh private key
    chmod700-rwx------blanklineatthebottomofthefile,LFloginsshname@ip-i/path//private.keyexitdebugblanklineLFvalidatethepublickeyssh-keygen-l-fthe.pub......
  • /login接口路径404但是拦截器却显示路径为/error
    参考文献:springboot全局异常处理中的404的/error重复拦截问题(https://blog.csdn.net/qq_35890572/article/details/106529428)问题:loginInterceptor在经过后,目标接口/login报错,又进入拦截器了,但是断点显示路径为/error因为在接口异常后,SpringMVC会去寻找有没有对应异常的统一处理......
  • Linux系统安全限制:禁用或限制用户ssh登录(sshd_config、hosts.allow、hosts.deny、nolo
        我们知道Linux系统安全性设置有很多方式。常见的有通过firewall防火墙、或者iptables规则实现放行、拦截屏蔽某些特征的网络请求。示例:iptables限制ssh链接服务器    还有一种办法是机房运维常用的权限管控手段:管控服务器登录权限、管控账号执行操作权限。这种手段主......