精华内容
下载资源
问答
  • 模拟app注销登录

    2015-10-12 16:39:22
    一个简单模拟app注销登录的demo,轻松切换回登录首页
  • appium控制考研帮app登录模拟滑动操作
  • 移动端模拟app

    2021-01-16 16:50:25
    登录 <template> <div> <h1>登录</h1> <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm" > <el-form-item label=...

    登录

    <template>
      <div>
        <h1>登录</h1>
        <el-form
          :model="ruleForm"
          :rules="rules"
          ref="ruleForm"
          label-width="100px"
          class="demo-ruleForm"
        >
          <el-form-item label="活动名称" prop="username">
            <el-input v-model="ruleForm.username"></el-input>
          </el-form-item>
          <el-form-item label="活动区域" prop="password">
            <el-input v-model="ruleForm.password"></el-input>
          </el-form-item>
          <el-form-item>
              <el-button type="primary" @click="submitForm('ruleForm')">立即创建</el-button>
          </el-form-item>
        </el-form>
      </div>
    </template>
    
    <script>
    export default {
      name: "",
      data() {
        return {
              ruleForm: {
            username:"",
            password:"",
              },
               rules: {
                 username:[{ required: true, message: '请输入活动名称', trigger: 'blur' }],  
                 password:[{ required: true, message: '请输入活动名称', trigger: 'blur' }],  
               }
        };
      },
      mounted() {
        //this.axios.get('/').then((res) => {
        //this.result = res.result;
        //});
      },
      methods: {
           submitForm(formName) {
            this.$refs[formName].validate((valid) => {
              if (valid) {
               this.$axios.post('https://www.liulongbin.top:8888/api/private/v1/login',this.ruleForm).then(res=>{
                   console.log(res);
                   if(res.meta.status==200){
                       sessionStorage.setItem('03B-token',res.data.token)
                       this.$store.commit('add',this.ruleForm.username)
                       this.$router.go(-1)
                    // this.$router.push('/shoye')
                       this.$message.success(res.meta.msg);
                   }else{
                         this.$message.error(res.meta.msg);
                   }
               })
              } else {
                 this.$message.error('错了哦,这是一条错误消息');
                return false;
              }
            });
          },
      },
      computed: {},
      watch: {},
    };
    </script>
    
    <style scoped></style>
    
    

    在这里插入图片描述

    主页面

    <template>
      <div class="bian">
        <router-view />
        <ul>
          <router-link to="/shoye" tag="li">首页</router-link>
          <router-link to="/fenlei" tag="li">分类</router-link>
          <router-link to="/gowuche" tag="li">购物车</router-link>
          <router-link to="/wode" tag="li">我的</router-link>
        </ul>
      </div>
    </template>
    <script>
    export default {
      name: "",
      data() {
        return {};
      },
      mounted() {
        //this.axios.get('/').then((res) => {
        //this.result = res.result;
        //});
      },
      methods: {},
      computed: {},
      watch: {},
    };
    </script>
    
    <style scoped>
    .bian{
        width: 100%;
        height: 100%;
    }
    ul{
        width: 100%;
        height: 50px;
        background: #666;
        display: flex;
        position: fixed;
        bottom: 0;
        font-size: 20px;
    }
    li{
        width: 25%;
        text-align: center;
        line-height:50px;
    }
    .router-link-active{
        background: blue;
        color: #fff;
    }
    </style>
    
    ## 首页
    <template>
      <div>
          <p class="p">积云商城 <span class="span"><i class="el-icon-search"></i></span> </p>
    <div>
      <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item>1</van-swipe-item>
      <van-swipe-item>2</van-swipe-item>
      <van-swipe-item>3</van-swipe-item>
      <van-swipe-item>4</van-swipe-item>
    </van-swipe>
    </div>
    <div >
      <p><img :src="result.section1.banner"></p>
      <div class="sss">
          <p class="dx" v-for="(item,index) in result" :key="index"><img :src="result.section1.list[0].imgPath"></p>
      </div>
    </div>
      </div>
    </template>
    <script>
    import Vue from 'vue';
    import { Swipe, SwipeItem } from 'vant';
    Vue.use(Swipe);
    Vue.use(SwipeItem);
    export default {
      name: '',
      data() {
        return {
          result:''
        };
      },
      mounted() { 
    this.$axios.get('http://api.com/index').then((res) => {
      console.log(res);
    this.result = res;
    });
    },
      methods: {},
      computed: {},
      watch: {},
    };
    </script>
    
    <style scoped>
    .p{
      width: 100%;
      height: 30px;
      text-align: center;
      font-size: 20px;
      position: relative;
    }
    .span{
      width: 20px;
      height: 20px;
      position: absolute;
      top: 0;
      right: 10px;
    }
      .my-swipe .van-swipe-item {
        color: #fff;
        font-size: 20px;
        line-height: 150px;
        text-align: center;
        background-color: #39a9ed;
      }
      img{
        width: 100%;
      }
      .sss{
        width: 100%;
        height: 100%;
        display: flex;
        flex-wrap: wrap;
      }
      .dx{
        width: 47%;
        margin: 1%;
      }
    </style>
    
    ![在这里插入图片描述](https://img-blog.csdnimg.cn/20210116164614661.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0xpdUJvXzE5OTk=,size_16,color_FFFFFF,t_70)
    
    ## 分类
    
    ```html
    <template>
      <div class="bian">
        <van-sidebar v-model="index">
          <van-sidebar-item 
            :title="item.title"
            v-for="(item, index) in result"
            :key="index"
          />
        </van-sidebar>
        <div class="kuan" >
          <van-grid :column-num="3" v-model="index">
             
            <van-grid-item v-for="(item,index) in list" :key="index" :icon="item.imgPath" :text="item.title" @click="$router.push('/xiangping')"/>
          </van-grid>
        </div>
      </div>
    </template>
    <script>
    import Vue from "vue";
    import { Sidebar, SidebarItem } from "vant";
    Vue.use(Sidebar);
    Vue.use(SidebarItem);
    
    import { Grid, GridItem } from "vant";
    Vue.use(Grid);
    Vue.use(GridItem);
    
    export default {
      name: "",
      data() {
        return {
          result: [],
          list:[],
          index:0,
        };
      },
      mounted() {
        this.$axios.get("http://api.com/category").then((res) => {
          console.log(res);
          this.result = res.aside;
          this.list=res.aside[this.index].list
          console.log(this.list);
        });
      },
      methods: {
      },
      computed: {
        
      },
      watch: {},
    };
    </script>
    
    <style scoped>
    .bian {
      width: 100%;
      height: 100%;
      display: flex;
    }
    .kuan {
      flex: 1;
    }
    </style>
    
    

    在这里插入图片描述

    我的页面

    <template>
      <div>
          <h1>我的</h1>
          {{$store.state.username}}
          <button @click="app">退出</button>
      </div>
    </template>
    
    <script>
    export default {
      name: '',
      beforeRouteEnter(to, from, next) {
    next((vm) => {
    if (vm.$store.state.username == '') {
    vm.$router.push('/denglu');
    }
    });
    },
      data() {
        return {};
      },
      mounted() { 
    //this.axios.get('/').then((res) => {
    //this.result = res.result;
    //});
    },
      methods: {
          app(){
              this.$store.commit('shan')
              this.$router.push('/denglu')
          }
      },
      computed: {},
      watch: {},
    };
    </script>
    
    <style scoped>
    </style>
    
    

    在这里插入图片描述

    详情页

    <template>
      <div>
          <p @click="$router.go(-1)">返回</p>
        <van-swipe :autoplay="3000">
          <van-swipe-item v-for="(item, index) in result" :key="index">
            <img v-lazy="result.swiper[0].imgSrc" />
          </van-swipe-item>
        </van-swipe>
        <p>{{ result.view.title }}</p>
        <p>¥{{ result.view.price }}</p>
        <p>{{ result.view.intro }}</p>
        <p class="ku">
          <span >
              {{result.view.chose[0].col}}
          </span>
          <span>
              {{result.view.chose[1].col}}
          </span>
          <span>
              {{result.view.chose[2].col}}
          </span>
        </p>
        <van-goods-action>
      <van-goods-action-icon icon="cart-o" text="购物车" @click="onClickIcon" />
      <van-goods-action-icon icon="shop-o" text="店铺" @click="onClickIcon" />
      <van-goods-action-button
        type="danger"
        text="立即购买"
        @click="onClickButton"
      />
    </van-goods-action>
      </div>
    </template>
    
    <script>
    import Vue from "vue";
    import { Lazyload } from "vant";
    Vue.use(Lazyload);
    
    import { GoodsAction, GoodsActionIcon, GoodsActionButton } from 'vant';
    Vue.use(GoodsAction);
    Vue.use(GoodsActionButton);
    Vue.use(GoodsActionIcon);
    export default {
      name: "",
      data() {
        return {
          result: [],
        };
      },
      mounted() {
        this.$axios.get("http://api.com/detail").then((res) => {
          console.log(res);
          this.result = res;
        });
      },
      methods: {
           onClickIcon() {
          Toast('点击图标');
        },
        onClickButton() {
          Toast('点击按钮');
        },
      },
      computed: {},
      watch: {},
    };
    </script>
    
    <style scoped>
    .ku{
        width: 100%;
        margin-bottom:60px ;
    }
    span{
        color:#f00;
        border:1px solid;
        margin-left:20px ;
    }
    </style>
    
    

    在这里插入图片描述

    展开全文
  • 获取接口信息 逆向apk,可能加密了 Fiddler 4抓包 近水楼台先得月,不可言 App或网站的积分规则 网站登录行为中,如果添加验证码的话,很麻烦,这里先跳过。 效果图 ...实现过程模拟App登录 已经确

    获取接口信息

    1. 逆向apk,可能加密了
    2. Fiddler 4抓包
    3. 其他

    App或网站的积分规则

    这里写图片描述

    网站登录行为中,如果添加验证码的话,很麻烦,这里先跳过。

    效果图

    这里写图片描述
    这里写图片描述这里写图片描述
    这里写图片描述
    这里写图片描述
    这里写图片描述
    这里写图片描述

    这里写图片描述

    为减少用户账号的异常特征,收藏、订阅、评论之后都删除,日志记录没办法了
    积分可以兑换,有个排名,也是一个接口调用而已,仅供个人学习、研究之用,请勿用于商业用途。

    实现过程

    模拟App登录

    已经确定登录的URL和参数USERNAME&PASSWORD,POST提交,返回一个json,包含token,以下的操作均使用token代替用户名和密码作为参数

    USERNAME=xxxxxx
    PASSWORD=xxxxxx
    login_url=xxxxx
    #模拟登录
    echo '++++++++++++++++++++++++++++登录++++++++++++++++++++++++++++++++++++++'
    data=`curl -d "USERNAME=$USERNAME&PASSWORD=$PASSWORD" "$login_url"`

    使用curl -d模拟POST提交,使用jq解析json格式的data,并替换掉两边的双引号

    token=`echo $data|jq '.data'|sed 's/\"//g'`
    search_url=xxxxxx
    #模拟获取文章
    echo '++++++++++++++++++++++++++++获取文章++++++++++++++++++++++++++++++++++++++'
    contents=`curl -d "&accessToken=$token&cuPage=1&adcode=xxxx" "$search_url"`
    
    #设置操作的文章数
    for_times=15
    for((ii=0;ii<$for_times;ii++));
    do
        jj=`expr $ii + 1`
        content_title_arr[$ii]=`echo $contents|jq '.data.abc['$jj'].title'`
        content_websitename_arr[$ii]=`echo $contents|jq '.data.abc['$jj'].websitename'`
        content_id_arr[$ii]=`echo $contents|jq '.data.abc['$jj'].articleId'`
        content_type_arr[$ii]=`echo $contents|jq '.data.abc['$jj'].type'`
    done
    #获取文章中相应字段
    echo '++++++++++++++++++++++++++++处理所需字段++++++++++++++++++++++++++++++++++++++'
    for((i=0;i<${#content_id_arr[*]};i++))
    do
        content_id_arr[$i]=`echo ${content_id_arr[$i]} |sed 's/\"//g'`
        content_type_arr[$i]=`echo ${content_type_arr[$i]} |sed 's/\"//g'`
        content_title_arr[$i]=`echo ${content_title_arr[$i]} |sed 's/\"//g'`
        content_title_arr[$i]=`echo ${content_title_arr[$i]} |sed 's/\[ //g'`
        content_title_arr[$i]=`echo ${content_title_arr[$i]} |sed 's/\ ]//g'`
        content_websitename_arr[$i]=`echo ${content_websitename_arr[$i]} |sed 's/\"//g'`
    done
    
    #模拟阅读文章
    echo '+++++++++++++++++++++++++++阅读文章+++++++++++++++++++++++++++++++++++'
    #for((i=0;i<1;i++))
    for((i=0;i<${#content_type_arr[*]};i++))
    do
        content_detail=`curl -d "articleId=${content_id_arr[$i]}&TYPE=${content_type_arr[$i]}&accessToken=$token" "$content_detail_url"`
        index=$((i+1))
        echo '++++++++++++++++++++++++++++阅读文章:第'$index'篇    '${content_title_arr[$i]}
    done
    

    其它接口类似

    完善


    使用crontab设置一个定时任务

    这里写图片描述

    在以上各个字段中,还可以使用以下特殊字符:
    星号(*):代表所有可能的值,例如month字段如果是星号,则表示在满足其它字段的制约条件后每月都执行该命令操作。
    逗号(,):可以用逗号隔开的值指定一个列表范围,例如,“1,2,5,7,8,9”
    中杠(-):可以用整数之间的中杠表示一个整数范围,例如“2-6”表示“2,3,4,5,6”
    正斜线(/):可以用正斜线指定时间的间隔频率,例如“0-23/2”表示每两小时执行一次。同时正斜线可以和星号一起使用,例如*/10,如果用在minute字段,表示每十分钟执行一次。


    sleep 1 睡眠1秒
    sleep 1s 睡眠1秒
    sleep 1m 睡眠1分
    sleep 1h 睡眠1小时


    直接把用户名和密码明文写sh里不太好,简单可逆加密,遇到技术好的还是藏不住

    一步加密代码:
    echo "ibase=16; $(echo "gtalk@gmail.com" |xxd -ps -u)" |bc
    得到:137514765985002236391382606438443478282
    
    解密代码:
    dc -e 137514765985002236391382606438443478282P
    得到:gtalk@gmail.com

    curl -d 显示的信息太多,修改为进度条样式:
    curl  -# -d

    修改后的脚本(u,p,r为错误占位值)

    #!/bin/bash
    u='393938972265586578744682'
    p='30765298571722054944135433354'
    r='167852555465201814248138704241983574790873686482887295919533834'
    login_url=`dc -e ${r}P`'login/v1/loginCheck.do'
    search_url=`dc -e ${r}P`'search/v1.do'
    content_detail_url=`dc -e ${r}P`'search/v1/getContentById.do'
    N=`dc -e ${u}P`
    B=`dc -e ${p}P`
    #模拟登录
    echo '++++++++++++++++++++++++++++登录'
    data=`sleep 1s;curl -# -d "USERNAME=$N&PASSWORD=$B" "$login_url"`
    token=`echo $data|jq '.data'|sed 's/\"//g'`
    #模拟获取文章
    echo '++++++++++++++++++++++++++++获取文章'
    contents=`sleep 1s;curl -# -d "accessToken=$token&cuPage=1&adcode=370102" "$search_url"`

    上面的积分中,网站登录积分在shell实现较复杂,上网搜一圈,初步思路是Asprise-OCR-Java识别验证码,curl -D /curl -b 保存cookies/调用cookies 维持同一个session,下午验证了一下,可行,再细化一下

    1. Maven生成可以直接运行的jar包的多种方式
    2. Asprise Ocr 15.3 完美破解版,完美解决试用期弹出对话框的问题,同时去除了单词使用100次调用的问题
    3. curl -o
    4. # 将文件下载到本地并命名为mygettext.html
      curl -o mygettext.html http://www.abc.com/ual/gettext.html
    sleep_time=1s
    #模拟PC登录
    #1.获取cookies
    pc_result_data_1=`sleep $sleep_time;curl -# -D pccookies $URL/login.do?redirectUrl=$URL/`
    #2.保存验证码图片
    pc_result_data_2=`sleep $sleep_time;curl -# -b pccookies -o code.png $URL/validateImg.do?d=0.48115387154622147`
    #3.删除已存在的储存验证码txt
    code_txt='code.txt'
    path_=`pwd`
    if [  -f "$code_txt" ]; then
        rm -f ${path_}/code.txt
    fi
    #4.识别验证码图片
    export LD_LIBRARY_PATH=/usr/local/games/score;
    pc_result_data_3=`sleep $sleep_time;java -jar Recognize-1.0-SNAPSHOT-jar-with-dependencies.jar ${path_}/code.png`
    echo $pc_result_data_3
    #5.模拟PC登录
    N=`dc -e ${u}P`
    B=`dc -e ${p}P`
    code=`cat code.txt`
    if [[ "$code" =~ "*" ]];then
        code_arr[0]=`echo $code|sed 's/*/9/g'`
        code_arr[1]=`echo $code|sed 's/*/0/g'`
    else
        code_arr[0]=$code
    fi
    for((ii=0;ii<${#code_arr[*]};ii++));
    do
        pc_result_data_4=`sleep $sleep_time;curl -# -b pccookies  -d "userId=$username_base64&password=$password_base64&remember=true&validCode=$code_arr[$ii]&redirectUrl=$URL/" "$URL/loginCheck.do"`
        pc_result_data_5=`sleep $sleep_time;curl -# -b pccookies "$URL/main.do"`
    done

    问题1:

    >>> UnsatisfiedLinkError occurs. To fix it, visit http://asprise.com/ocr/fix-link-error?os=Linux
    Dependency information:     linux-vdso.so.1 =>  (0x00007fffd3532000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fdb4f73b000)
        librt.so.1 => /lib64/librt.so.1 (0x00007fdb4f532000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007fdb4f22c000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fdb4efa8000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fdb4ec13000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fdb51bbf000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fdb4e9fd000)
    LD_LIBRARY_PATH=/usr/local/games/score
    java.library.path=/usr/local/games/score:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
    OS: Linux 2.6.32-431.el6.x86_64 amd64
    Linux host-10-20-5-112 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
    JVM: 1.7.0_67-b01 64bit by Oracle Corporation
    
    java.lang.UnsatisfiedLinkError: /tmp/libaocr_x64.so: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /tmp/libaocr_x64.so)
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1851)
        at java.lang.Runtime.load0(Runtime.java:795)
        at java.lang.System.load(System.java:1062)
        at com.asprise.ocr.util.OcrLibHelper.loadOcrLib(OcrLibHelper.java:64)
        at com.asprise.ocr.Ocr.<clinit>(Ocr.java:474)
        at com.gch.Test01Recognize.recognize(Test01Recognize.java:36)
        at com.gch.Test01Recognize.main(Test01Recognize.java:30)
    
    >>> Relax, it's easy to fix: http://asprise.com/ocr/fix-link-error?os=Linux
    Exception in thread "main" java.lang.UnsatisfiedLinkError: com.asprise.ocr.Ocr.doSetup(Z)I
        at com.asprise.ocr.Ocr.doSetup(Native Method)
        at com.asprise.ocr.Ocr.setUp(Ocr.java:508)
    

    解决:下载 libstdc++.so.6
    export LD_LIBRARY_PATH=/usr/local/libstdc++.so.6文件地址;

    问题2:NOTICE: Asprise OCR - strictly for evaluation only. All Rights Reserved (C) asprise.com NOTICE: this evaluation version replaces all recognized ‘q’, ‘x’, ‘0’, and ‘9’ occurrences with asterisk (‘*’).
    解决:破解或者echo $code|sed ‘s/*/9/g 替换
    问题3:登录后没有登录分数,排查后发现积分拦截的路径不是loginCheck.do,而是登录成功后main.do

     pc_result_data_4=`sleep $sleep_time;curl -# -b pccookies  -d "userId=$username_base64&password=$password_base64&remember=true&validCode=$code_arr[$ii]&redirectUrl=$URL/" "$URL/loginCheck.do"`

    解决:
    pc_result_data_5=sleep sleep_time;curl -# -b pccookies "URL/main.do”“


    总结起来就是接口地址参数收集,返回json解析,使用shell实现而已
    仅供个人学习、研究、娱乐之用

    展开全文
  • 一个实现教务系统模拟登录APP Demo.rar,太多无法一一验证是否可用,程序如果跑不起来需要自调,部分代码功能进行参考学习。
  • 项目进展:现已可以通过微博sdk登录三方应用 运行效果: 1、Authorize请求 GET https://open.weibo.cn/oauth2/authorize?client_id=608714079&redirect_uri=http%3A%2F%2Fwww.xiaohongshu.com%2F&...

    项目进展:现已可以通过微博sdk登录三方应用

     

    运行效果:

    1Authorize请求

    GET https://open.weibo.cn/oauth2/authorize?client_id=608714079&redirect_uri=http%3A%2F%2Fwww.xiaohongshu.com%2F&scope=all&response_type=code&version=0031405000&packagename=com.xingin.xhs&key_hash=6cfca61d9d1eca56844806706ba18cf7 HTTP/1.1

    Host: open.weibo.cn

    Connection: keep-alive

    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8

    User-Agent: Mozilla/5.0 (Linux; Android 4.4.4; ZUK Z2121 Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/33.0.0.0 Safari/537.36

    Accept-Encoding: gzip,deflate

    Accept-Language: zh-CN,en-US;q=0.8

    X-Requested-With: com.xingin.xhs

    参数列表

    client_id 608714079 //小红书weibo oath client_id

    redirect_uri http://www.xiaohongshu.com/

    scope all

    response_type  code

    version 0031405000

    packagename com.xingin.xhs

    key_hash 6cfca61d9d1eca56844806706ba18cf7 //apk CERT.RSA文件md5hash

    如果Authorize失败,返回302

     

    2、在执行跳转前执行前置方法 ClientCommonConfig

     

    ClientCommonConfig请求

    GET http://api.weibo.cn/2/client/common_config?appkey=608714079&packagename=com.xingin.xhs&key_hash=6cfca61d9d1eca56844806706ba18cf7&version=0031405000&oauth_timestamp=1508989219&oauth_sign=c22eb2c HTTP/1.1

    X-Tingyun-Processed: true

    X-Tingyun-Id: LbxHzUNcfig;c=2;r=565931765

    Host: api.weibo.cn

    Connection: Keep-Alive

     

    参数列表

    appkey 608714079

    packagename com.xingin.xhs

    key_hash 6cfca61d9d1eca56844806706ba18cf7

    version 0031405000

    oauth_timestamp 1508989219

    oauth_sign c22eb2c

     

    ClientCommonConfig响应

    HTTP/1.1 200 OK

    Server: Tengine/2.2.0

    Date: Thu, 26 Oct 2017 03:40:19 GMT

    Content-Type: application/json;charset=UTF-8

    Connection: close

    Vary: Accept-Encoding

    X-Powered-By: PHP/7.0.15

    X-Log-Uid:

    X-Error-Code: 0

    X-Validator: eaG4t1TR+piBrjEL8VbZKX3yr2vBURkjoNHe+GdK3rk=

    PROC_NODE: v5-web-007.mweibo.xxg.intra.weibo.cn

    SSL_NODE: ssl-010.mweibo.yf.intra.weibo.cn

    Content-Length: 472

     

    u7FFIamNkcuNHMwmAa+VaBLCV5OXWYPQOP+foSfZjYyxZGpn3KZknFVy4ErIXpjcrTepq2dyvmshHzKaHQSXb9cK5ndukrs0n1wuvQ1QN+v847terBC12nEm1k/oRDbcP2veR7Zrj2k+bPItUJ9Qg5xdPIIbfRCMuXUGRCy6t09vhILzRYQLBSpfO5NUbfXr13wEjZdivmeBmFOZihCeFioZgAU6bJ15lqNeHwEZCcosvJUosQr+UIDaJtfk3WUUnzELTZeV+mxiSBXJFCQ2SFa8PjY9al0rwizH7IZqWJf7wZk/95v6dkGFbhHVfwBSw3QyAlZNWQsF/meeatj599oREW6IUu/BYwjJhb4JmMSk+FfVnyJuHB9exTdCepmXgyQ4w1f0+psrEZ/NYoA8JJji3F6pDsDN/qY8/fvzzy2sXgKz19gJ69oJWkM4r+tWG/1iwg1AnhDu1RqKQxt7Tw==

     

    内容需要Aes解密,解密后得到JSON对象

    {

        "cmd": {

            "app_install": [

                {

                    "app_package": "",

                    "app_sign": "18da2bf10352443a00a5e046d9fca6bd",

                    "app_version": "1762",

                    "download_url": "",

                    "notification_delay": "",

                    "notification_text": "",

                    "notification_title": ""

                }

            ],

            "app_invoke": [

                {

                    "notification_delay": "",

                    "notification_text": "",

                    "notification_title": "",

                    "package": "",

                    "scheme": "",

                    "url": ""

                }

            ],

            "frequency": ""

        }

    }

     

    3、接下来执行302跳转,加载页面

    GET https://passport.weibo.cn/signin/login?client_id=608714079&redirect_uri=http://www.xiaohongshu.com/&display=sdk&action=login&offcialMobile=true&rf=1&version=0031405000&sso_type=1&scope=all HTTP/1.1

    Host: passport.weibo.cn

    Connection: keep-alive

    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8

    User-Agent: Mozilla/5.0 (Linux; Android 4.4.4; ZUK Z2121 Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/33.0.0.0 Safari/537.36

    Accept-Encoding: gzip,deflate

    Accept-Language: zh-CN,en-US;q=0.8

    X-Requested-With: com.xingin.xhs

     

    参数列表

    client_id 608714079

    redirect_uri http://www.xiaohongshu.com/

    display sdk

    action login

    offcialMobile true

    rf 1

    version 0031405000

    sso_type 1

    scope all

     

    在跳转之前发起一个请求GetAid

    4GetAid请求

    GET https://api.weibo.com/oauth2/getaid.json?appkey=608714079&mfp=01jGbGZnVv%2BnKgEFKn%2BgdgAAF7Sb%2BoXqJOLk2iVcI5BlDy%2F6QpcBmg2Gu0e7KaKW5zByD2CkW0uUuNFjOl%2BgyukhYo0w2gi%2FJ9A22QNXKChyKsefPLxD4oxzc%2BZ%2ByAM4z%2FJVCobjKN5mq9mSmX9DSwCTiJZ%2FFQ%2FdLG3DlChTJXQSlL2nB6sNQH1TEMPlAg73NB64ZV02nPiZFj9i4JFZefKHdGV4%2BvNYjkZ9KZCmSRJOsW73%2BH4SleNRgyh%2B0O%2FUYRDV%2Fhld9k2ygGiV8rq54dvDvv8oLOg37CflmpySgsC%2FOFew1POaj0YPlOdzDhFiwEDLbQoz4raHqDLtHX%2FSzJaUKuiUUdGun6SfgE%2F34WxrvNnVPUxv2iaZ3z8NmCOIzQ47dTfT2PcdZ7x0SZTX4b4pkpTBh2wM8iSmEVmjsvaQUnZxrp29tJtoAPm2en0Kua6RxO7wCD5rAUsCN3WlUTcgTxzVsOaKmbIiDUOizUz9AARCuA3bRiF2nTmzwbkEAZTHlwyJ%2Fhl%2Fv6x5HFHxVU0rXxz2WFRtAJ2W2XoCZ7VndIh1cjL%2FKIU05u74lKtOOU09GbU%2BMIQAstm4CA5WxKZ85X1wODH8TOifT44pHsNXuZrJ3cyPrznC3HFJZSWiSp0Rg9Z5BNmf%2Bcg%2B%2FbWVScGeeKKp%2FZTx%2B8ufjwZJNHuDE%3D&packagename=com.xingin.xhs&key_hash=6cfca61d9d1eca56844806706ba18cf7&oauth_timestamp=1508989219&oauth_sign=c22eb2c HTTP/1.1

    X-Tingyun-Processed: true

    X-Tingyun-Id: LbxHzUNcfig;c=2;r=39933382

    Host: api.weibo.com

    Connection: Keep-Alive

     

    参数列表

    appkey 608714079

    mfp 01jGbGZnVv+nKgEFKn+gdgAAF7Sb+oXqJOLk2iVcI5BlDy/6QpcBmg2Gu0e7KaKW5zByD2CkW0uUuNFjOl+gyukhYo0w2gi/J9A22QNXKChyKsefPLxD4oxzc+Z+yAM4z/JVCobjKN5mq9mSmX9DSwCTiJZ/FQ/dLG3DlChTJXQSlL2nB6sNQH1TEMPlAg73NB64ZV02nPiZFj9i4JFZefKHdGV4+vNYjkZ9KZCmSRJOsW73+H4SleNRgyh+0O/UYRDV/hld9k2ygGiV8rq54dvDvv8oLOg37CflmpySgsC/OFew1POaj0YPlOdzDhFiwEDLbQoz4raHqDLtHX/SzJaUKuiUUdGun6SfgE/34WxrvNnVPUxv2iaZ3z8NmCOIzQ47dTfT2PcdZ7x0SZTX4b4pkpTBh2wM8iSmEVmjsvaQUnZxrp29tJtoAPm2en0Kua6RxO7wCD5rAUsCN3WlUTcgTxzVsOaKmbIiDUOizUz9AARCuA3bRiF2nTmzwbkEAZTHlwyJ/hl/v6x5HFHxVU0rXxz2WFRtAJ2W2XoCZ7VndIh1cjL/KIU05u74lKtOOU09GbU+MIQAstm4CA5WxKZ85X1wODH8TOifT44pHsNXuZrJ3cyPrznC3HFJZSWiSp0Rg9Z5BNmf+cg+/bWVScGeeKKp/ZTx+8ufjwZJNHuDE= 

    Mfpmachine full parameters?)是rsa加密的设备信息JSON字串,包括(os+imei+meid+imsi+mac+iccid+seriaNo+androidId+cpu+model+sdsize+resolution+ssid+deviceName+connectType+uaaid

    packagename com.xingin.xhs

    key_hash 6cfca61d9d1eca56844806706ba18cf7

    oauth_timestamp 1508989219

    oauth_sign c22eb2c

     

    响应内容

    {"aid":"01AmjYJZon83qXRbP3-X-LU9kpCO0n1K7BmDtG1tbuvec85tQ."}

    Aid将被存储,以后存储有Aid值将不再发送该请求

     

    接下来通过网页加载weibo登录页面,输入账号密码登录。登录成功在授权页面点击确定授权

     

    确定授权,这一步由浏览器自动完成

    POST https://open.weibo.cn/oauth2/authorize HTTP/1.1

    Host: open.weibo.cn

    Connection: keep-alive

    Content-Length: 245

    Cache-Control: max-age=0

    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8

    Origin: https://passport.weibo.cn

    User-Agent: Mozilla/5.0 (Linux; Android 4.4.4; ZUK Z2121 Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/33.0.0.0 Safari/537.36

    Content-Type: application/x-www-form-urlencoded

    Referer: https://passport.weibo.cn/signin/login?client_id=608714079&redirect_uri=http://www.xiaohongshu.com/&display=sdk&action=login&offcialMobile=true&rf=1&version=0031405000&sso_type=1&scope=all

    Accept-Encoding: gzip,deflate

    Accept-Language: zh-CN,en-US;q=0.8

    X-Requested-With: com.xingin.xhs

     

    client_id=608714079&redirect_uri=http%3A%2F%2Fwww.xiaohongshu.com%2F&display=sdk&action=login&offcialMobile=true&rf=1&version=0031405000&sso_type=1&scope=all&wm=3349&ticket=ST-NjM1OTM1NzQxOA%3D%3D-1508990187-tc-14FE7791A2547A8A0F3F03CE5521C8F2-1

     

    参数列表

    client_id 608714079

    redirect_uri http://www.xiaohongshu.com/

    display sdk

    action login

    offcialMobile true

    rf 1

    version 0031405000

    sso_type 1

    scope all

    wm 3349

    ticket ST-NjM1OTM1NzQxOA==-1508990187-tc-14FE7791A2547A8A0F3F03CE5521C8F2-1

     

    再次调用oauth2/Authorize方法,这次是跳转到目标站,weibo登录完成。

    POST https://open.weibo.cn/oauth2/authorize HTTP/1.1

    Host: open.weibo.cn

    Connection: keep-alive

    Content-Length: 602

    Cache-Control: max-age=0

    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8

    Origin: https://open.weibo.cn

    User-Agent: Mozilla/5.0 (Linux; Android 4.4.4; ZUK Z2121 Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/33.0.0.0 Safari/537.36

    Content-Type: application/x-www-form-urlencoded

    Referer: https://open.weibo.cn/oauth2/authorize

    Accept-Encoding: gzip,deflate

    Accept-Language: zh-CN,en-US;q=0.8

    Cookie: JSESSIONID=A7744F796A83D087FBA9880ED45A48B9

    X-Requested-With: com.xingin.xhs

     

    display=sdk&action=scope&scope=follow_app_official_microblog&withOfficalFlag=0&withOfficalAccount=null&response_type=code®Callback=https%253A%252F%252Fopen.weibo.cn%252F2%252Foauth2%252Fauthorize%253Fclient_id%253D608714079%2526response_type%253Dcode%2526display%253Dsdk%2526redirect_uri%253Dhttp%25253A%25252F%25252Fwww.xiaohongshu.com%25252F%2526from%253D%2526with_cookie%253D&redirect_uri=http%3A%2F%2Fwww.xiaohongshu.com%2F&client_id=608714079&appkey62=YAyVF&state=&from=&offcialMobile=true&uid=6359357418&url=&verifyToken=b7e529c991906f6911ad621de267c45a&visible=0&version=0031405000&sso_type=1

    参数列表

    display sdk

    action scope

    scope follow_app_official_microblog

    withOfficalFlag 0

    withOfficalAccount null

    response_type code

    regCallback https%3A%2F%2Fopen.weibo.cn%2F2%2Foauth2%2Fauthorize%3Fclient_id%3D608714079%26response_type%3Dcode%26display%3Dsdk%26redirect_uri%3Dhttp%253A%252F%252Fwww.xiaohongshu.com%252F%26from%3D%26with_cookie%3D

    redirect_uri http://www.xiaohongshu.com/

    client_id 608714079

    appkey62 YAyVF

    state

    from

    offcialMobile true

    uid 6359357418

    url

    verifyToken b7e529c991906f6911ad621de267c45a

    visible 0

    version 0031405000

    sso_type 1

    响应内容 302

    http://www.xiaohongshu.com/?access_token=2.00w3N4wG0B2GMf43ca4b5de2aPvs_E&remind_in=2646209&expires_in=2646209&refresh_token=2.00w3N4wG0B2GMf0bc4272fb04dsQrC&uid=6359357418&scope=follow_app_official_microblog

     

    获取weibo用户信息

    GET https://api.weibo.com/2/users/show.json?uid=6359357418&access_token=2.00w3N4wG0B2GMf43ca4b5de2aPvs_E&aid=01AmjYJZon83qXRbP3-X-LU9kpCO0n1K7BmDtG1tbuvec85tQ.&oauth_timestamp=1508990190&oauth_sign=a54bf9b HTTP/1.1

    X-Tingyun-Processed: true

    X-Tingyun-Id: LbxHzUNcfig;c=2;r=1187104192

    Host: api.weibo.com

    Connection: Keep-Alive

     

    参数列表

    uid 6359357418

    access_token 2.00w3N4wG0B2GMf43ca4b5de2aPvs_E

    aid 01AmjYJZon83qXRbP3-X-LU9kpCO0n1K7BmDtG1tbuvec85tQ.

    oauth_timestamp 1508990190

    oauth_sign a54bf9b

     

    响应内容

    {

        "id": 6359357418,

        "idstr": "6359357418",

        "class": 1,

        "screen_name": "思永negative",

        "name": "思永negative",

        "province": "51",

        "city": "6",

        "location": "四川 德阳",

        "description": "",

        "url": "",

        "profile_image_url": "http://tvax3.sinaimg.cn/default/images/default_avatar_male_50.gif",

        "profile_url": "u/6359357418",

        "domain": "",

        "weihao": "",

        "gender": "m",

        "followers_count": 1,

        "friends_count": 60,

        "pagefriends_count": 0,

        "statuses_count": 0,

        "favourites_count": 0,

        "created_at": "Wed Sep 06 14:10:30 +0800 2017",

        "following": false,

        "allow_all_act_msg": false,

        "geo_enabled": true,

        "verified": false,

        "verified_type": -1,

        "remark": "",

        "insecurity": {

            "sexual_content": false

        },

        "ptype": 0,

        "allow_all_comment": true,

        "avatar_large": "http://tvax3.sinaimg.cn/default/images/default_avatar_male_180.gif",

        "avatar_hd": "http://tvax3.sinaimg.cn/default/images/default_avatar_male_180.gif",

        "verified_reason": "",

        "verified_trade": "",

        "verified_reason_url": "",

        "verified_source": "",

        "verified_source_url": "",

        "follow_me": false,

        "like": false,

        "like_me": false,

        "online_status": 0,

        "bi_followers_count": 0,

        "lang": "zh-cn",

        "star": 0,

        "mbtype": 2,

        "mbrank": 1,

        "block_word": 0,

        "block_app": 0,

        "credit_score": 80,

        "user_ability": 0,

        "urank": 0,

        "story_read_state": -1,

        "vclub_member": 0

    }

     

    小红书登录

    POST https://www.xiaohongshu.com/api/sns/v2/user/login HTTP/1.1

    User-Agent: Dalvik/1.6.0 (Linux; U; Android 4.4.4; ZUK Z2121 Build/KTU84P) Resolution/720*1280 Version/5.2.1 Build/502001 Device/(ZUK;ZUK Z2121)

    Content-Type: application/x-www-form-urlencoded

    Content-Length: 585

    Host: www.xiaohongshu.com

    Connection: Keep-Alive

    Accept-Encoding: gzip

     

    android_id=3024047621650843&nickname=%E6%80%9D%E6%B0%B8negative&token=2.00w3N4wG0B2GMf43ca4b5de2aPvs_E&imei=861032536407241&imageb=http%3A%2F%2Ftvax3.sinaimg.cn%2Fdefault%2Fimages%2Fdefault_avatar_male_180.gif&tokenExireTime=1970-01-01%2008%3A00%3A00&gender=0&images=http%3A%2F%2Ftvax3.sinaimg.cn%2Fdefault%2Fimages%2Fdefault_avatar_male_180.gif&verifyReason=none&openid=6359357418&type=weibo&verifyType=-1&url=u%2F6359357418&platform=Android&deviceId=87cba87d-e724-3963-acbe-7b8113ed6262&versionName=5.2.1&channel=Store360&lang=zh-CN&t=1508990190&sign=d81c6e0dca7c88c2693527509ce0ca0c

     

    参数列表

    android_id 3024047621650843

    nickname 思永negative

    token 2.00w3N4wG0B2GMf43ca4b5de2aPvs_E

    imei 861032536407241

    imageb http://tvax3.sinaimg.cn/default/images/default_avatar_male_180.gif

    tokenExireTime 1970-01-01 08:00:00

    gender 0

    images http://tvax3.sinaimg.cn/default/images/default_avatar_male_180.gif

    verifyReason none

    openid 6359357418

    type weibo

    verifyType -1

    url u/6359357418

    platform Android

    deviceId 87cba87d-e724-3963-acbe-7b8113ed6262

    versionName 5.2.1

    channel Store360

    lang zh-CN

    t 1508990190

    sign d81c6e0dca7c88c2693527509ce0ca0c

     

    签名算法

    请联系我索取

     

    响应内容

    {

        "data": {

            "bstatus": "",

            "comments": 0,

            "desc": "还没有信息耶~",

            "easemob_password": "55fea16f3c3f6cf9ec6f96d57ed6ae17",

            "fans": 0,

            "follows": 0,

            "gender": 0,

            "historyscore": 0,

            "imageb": "https://img.xiaohongshu.com/avatar/59ed588682ec391730ffa604.jpg@160w_160h_92q_1e_1c_1x.jpg",

            "images": "https://img.xiaohongshu.com/avatar/59ed588682ec391730ffa604.jpg@160w_160h_92q_1e_1c_1x.jpg",

            "isgroupmember": false,

            "level": {

                "image": "",

                "name": "无名小薯",

                "number": 0

            },

            "location": "",

            "n_dolikes": 0,

            "nboards": 0,

            "ndiscovery": 0,

            "need_phone": false,

            "need_show_tag_guide": false,

            "need_verify_id": true,

            "new_fans": 0,

            "nickname": "思永negative",

            "nlikes": 0,

            "openid": "6359357418",

            "order_list_link": "http://www.xiaohongshu.com/order/list?sid=1193486191771775896",

            "pokes": 0,

            "red_club": false,

            "red_club_level": 0,

            "redclubscore": 0,

            "register_time": "1508726918",

            "score": 0,

            "sessionid": "session.1193486191771775896",

            "share_link": "http://www.xiaohongshu.com/mobile/profile/index?oid=user.59ed588682ec391730ffa604",

            "token": "2.00w3N4wG0B2GMf43ca4b5de2aPvs_E",

            "type": "weibo",

            "user_exists": true,

            "user_token": "55fea16f3c3f6cf9ec6f96d57ed6ae17",

            "userid": "59ed588682ec391730ffa604"

        },

        "result": 0

    }

     

    小红书App授权检测

    GET https://www.xiaohongshu.com/api/sns/v1/user/me/authority?platform=Android&deviceId=87cba87d-e724-3963-acbe-7b8113ed6262&versionName=5.2.1&channel=Store360&sid=session.1193486191771775896&lang=zh-CN&t=1508990191&sign=2dc825931faa7b4a5ef901e0ad5e8121 HTTP/1.1

    Authorization: session.1193486191771775896

    User-Agent: Dalvik/1.6.0 (Linux; U; Android 4.4.4; ZUK Z2121 Build/KTU84P) Resolution/720*1280 Version/5.2.1 Build/502001 Device/(ZUK;ZUK Z2121)

    Host: www.xiaohongshu.com

    Connection: Keep-Alive

    Accept-Encoding: gzip

     

    参数列表

    platform Android

    deviceId 87cba87d-e724-3963-acbe-7b8113ed6262

    versionName 5.2.1

    channel Store360

    sid session.1193486191771775896

    lang zh-CN

    t 1508990191

    sign 2dc825931faa7b4a5ef901e0ad5e8121

     

    响应内容

    {"data":"9cm538gDnOyQ2+7gwjH2Dtpvgx6UWPtbaJw4p28/7hnZUuFabrnC/NFgFIMZ6mIQzWY9KfZbVKNvKSis5VOmI/3vGlPrOPDjNThslTRXMDPHOoGFpdSFTi24i1quArb5","result":0}

     

    解密方式

    请联系我索取

     

    解密内容

    {"emoticon_keyboard":false,"is_seller":false,"max_tags_in_post":10,"post_video":true}

     

     

     =================================================================================================

     

    打开文章页面:

    https://www.xiaohongshu.com/api/sns/v8/note/{noteId}

    检查关注

    data.user.fstatus:”none”|”follows”

    检查点赞:

    data.inlikes: true,

    检查收藏:

    data.infavs: true, 

     

    执行关注操作:

    POST https://www.xiaohongshu.com/api/sns/v1/user/follow HTTP/1.1

    执行点赞操作:

    https://www.xiaohongshu.com/api/v1/discovery/like

    执行收藏操作:

    POST https://www.xiaohongshu.com/api/sns/v1/note/collect HTTP/1.1

     

     关键词:libweibosdkcore.so weibosdk xhs com.xingin.xhs JNIEnv

     

    转载于:https://www.cnblogs.com/mrtiny/p/7799313.html

    展开全文
  • 模拟登录抖音,输入账号密码登录的方式会出现给手机发验证码,只能先把微信登好,登录抖音时选择微信登录的方式 GetScreenPostion.apk可以用来获取手机屏幕坐标 from time import sleep import time import random ...

    在这里插入图片描述
    完成之后,cmd里会出现很多apk的信息,待会儿代码里会用到

    模拟登录抖音,输入账号密码登录的方式会出现给手机发验证码,只能先把微信登好,登录抖音时选择微信登录的方式

    其中可以安装使用GetScreenPostion.apk,它可以用来获取手机屏幕坐标

    from time import sleep
    import time
    import random
    from appium import webdriver
    from selenium.webdriver.common.by import By
    from selenium.webdriver.support.ui import WebDriverWait
    from appium.webdriver.common.touch_action import TouchAction
    from selenium.webdriver.support import expected_conditions as EC
    
    desired_caps = {
        #设备系统1.platformName:这里是android的apk
        'platformName': 'Android',
        #设备名称2.deviceName:手机设备名称,通过adb devices查看
        'deviceName': '127.0.0.1:52001',
        #安卓版本3.platformVersion:android系统的版本号 cmd里找targetsdkversion
        'platformVersion': '26',
        # apk包名4.appPackage:apk包名  cmd里找package:name= 
        'appPackage': 'com.ss.android.ugc.aweme',
        #apk的launcherActivity    cmd里找laucher-activity:name=
        'appActivity':'com.ss.android.ugc.aweme.main.MainActivity',
        'unicodeKeyboard': True,  # 绕过手机键盘操作,unicodeKeyboard是使用unicode编码方式发送字符串
         'resetKeyboard':True,# 绕过手机键盘操作,resetKeyboard是将键盘隐藏起来
    
    }
    
    
    #启动app
    driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', desired_caps)
    sleep(40)
    
    def into_user_():
        try:
            # 点击‘我’,进入个人中心
            TouchAction(driver).press(x=647, y=1229).release().perform()
            sleep(6)
            print('dingweiwo')
            #点击‘选项’,(三个横线)
            driver.find_element_by_id("com.ss.android.ugc.aweme:id/bnk").click()
            sleep(6)
            # 点击‘设置’
            driver.find_element_by_id("com.ss.android.ugc.aweme:id/dra").click()
            sleep(6)
            #屏幕下拉
            # TouchAction(driver).press(x=354, y=365).move_to(x=354, y=1083).release().perform()
            driver.swipe(354,1083,354,365,1000)
            sleep(6)
            # 点击‘退出登录’
            driver.find_element_by_id("com.ss.android.ugc.aweme:id/bkm").click()
            sleep(6)
            #确定退出
            try:
                #id定位
                driver.find_element_by_id("com.ss.android.ugc.aweme:id/pi").click()
                sleep(6)
            except:
                # 坐标定位
                TouchAction(driver).press(x=594, y=694).release().perform()
        except Exception as f:
            print(f)
    
    def out_login():
        try:
            try:
                try:
                    # 登录之后容易出现推送消息,点击取消
                    driver.find_element_by_id("com.ss.android.ugc.aweme:id/q2").click()
                    print('关闭了推送')
                    sleep(6)
                    into_user_()
                except:
                    #有可能会让更换头像,点击关闭
                    TouchAction(driver).press(x=537, y=395).release().perform()
                    print('关闭了更换头像')
                    sleep(6)
                    into_user_()
            except:
                #上面两种可能都不存在是,运行进入用户中心
                into_user_()
        except Exception as f:
            print(f)
    
    def login():
        try:
            print(4)
            #点击点赞,弹出选择登录方式,也有可能直接弹出微信登录
            driver.find_element_by_id("com.ss.android.ugc.aweme:id/a4x").click()
            sleep(6)
            #没有直接弹出微信登录时
            try:
                print(5)
                #选择其他方式登录
                driver.find_element_by_id("com.ss.android.ugc.aweme:id/dn9").click()
                sleep(6)
                # 选择微信登录
                driver.find_element_by_id("com.ss.android.ugc.aweme:id/ata").click()
                sleep(6)
            # 直接弹出微信登录时
            except:
                print(6)
                #直接登录
                driver.find_element_by_id("com.ss.android.ugc.aweme:id/bkh").click()
        except Exception as f:
            print('f',f)
    if __name__=='__main__':
    
        login()
        time.sleep(40)
        out_login()
    
    展开全文
  • 转载请注明出处:python–爬虫–模拟登录全面介绍和简例–以抓取雅卓app为例 我们在前面的文章中已经学习了如果使用python进行数据抓取。 但我们常常会遇到一种场景,就是想要获取的页面内容或者接口内容是需要我们...
  • jmeter通过app脚本模拟APP购物车下单付款全流程

    千次阅读 热门讨论 2018-04-19 14:05:25
    1,涉及主要接口:登录,挑选商品,商品加入购物车,支付,如下:2,录制脚本之后,通过删减修改请求,保留必要的请求,以确保流程可正常走通,将请求名称改为中文名便于梳理,在对应分之下根据自己需要删减不同原件...
  • 工具与环境 Xposed IDA 6.8 JEB 2.2.5 Fiddler2 010Editor ...好久不玩逆向怕调试器生锈,拿出来磨磨!...在我们拿到一个APP准备破解时一般得安装运行,程序运行后须要注册用户,随便注册一个用户登录,以下...
  • 这是一款效果非常炫酷的模拟手机APP登录界面的jQuery和CSS3用户登录动画特效。该特效使用扁平化设计风格,采用SVG作为图标,并使用CSS3制作各种页面切换时的炫酷动画效果。
  • 利用python3.4爬取学校教务系统,并封装成api供app调用(二)之不带验证码模拟登录做完了之前对学校新闻的页的爬取,对于python3.x的urllib库有了一定的了解,于是就开始了学校教务系统的爬取,这里就牵涉到了模拟...
  • UPR教务系统模拟登录

    2016-09-15 22:19:42
    一个实现教务系统模拟登录APP Demo
  • 用户在登录系统时,判断用户的权限,根据用户的权限登录到不同的页面。考生登录后,系统根据用户的角色随机在试题库中选择一套试卷,让考生在规定的时间内作答,考生在考试完毕后系统自动评阅并给出成绩,这样既方便...
  • 使用Chrome模拟手机app打开页面

    千次阅读 2020-04-17 15:22:12
    环境准备: chrome浏览器 步骤: 1、打开chrome无痕窗口,输入网址 2、编辑 ... 4、完成编辑后,选择添加的访问即可 ...注意:页面需要token,又没有提示登录时,可在cookie里面手动输入token,如下: 完成! ...
  • 用户在登录系统时,判断用户的权限,根据用户的权限登录到不同的页面。考生登录后,系统根据用户的角色随机在试题库中选择一套试卷,让考生在规定的时间内作答,考生在考试完毕后系统自动评阅并给出成绩,这样既方便...
  • 这个模拟的手机银行app模拟了市场上手机银行app提供的几个基本服务,如账户注册和登录、转账和收款人维护。 存储库包含完整的开发文档,如(需求陈述的开发流程、需求分析、总体设计和详细设计)和完整的源代码。 源...
  • 时常去训练模拟登录一些网站,这次整理了一下豆瓣网的模拟登录,自己感觉结构清晰多了(看后如果觉得OK,记得给好评哦!)适合爬虫初学者参考,抓包分析还是得看自己了,一般我用谷歌浏览器自带的抓包工具,但特殊...
  • 利用JSoup模拟登录校园内网和新版正方教务系统,然后爬取成绩和课表等信息,并展示在APP上。
  • 用户在登录系统时,判断用户的权限,根据用户的权限登录到不同的页面。考生登录后,系统根据用户的角色随机在试题库中选择一套试卷,让考生在规定的时间内作答,考生在考试完毕后系统自动评阅并给出成绩,这样既方便...
  • Python模拟Tim登录界面

    千次阅读 2018-05-30 18:05:52
    先上效果图:  具体代码实现: #模拟Tim登录界面,账号为‘123456’,密码为‘654321’正确 import wx class App9_3(wx.Frame): #初始化上半部分Bar def topPanelInit(self): ...
  • 淘宝模拟登录

    千次阅读 2020-04-23 11:51:02
    基于猪哥66的基础上,根据淘宝反爬策略进行了部分修改。 验证淘宝用户名密码url进行了修改 原 self.verify_password_url = ... 现 self.verify_password_url = "https://login.taobao.com/newlogin/login.do?appNa...
  • SSM模拟登录验证

    2020-06-06 23:38:58
    只配置了前端控制器和字符过滤器,没有配置spring相关的监听(读取spring配置文件)和上下文配置(spring配置文件classpath),模拟登录验证并没有从数据库查询用户信息,只是在控制器中模拟做了信息验证。 <?xml ...
  • golang websocket 模拟pc扫码登录

    千次阅读 2017-05-20 08:14:23
    模拟PC浏览器二维码扫描登录的过程,手机APP端用 微信 模拟,简单起见,APP端只要发送token给服务端就算登录,服务端主动提示登录成功信息。依赖包 用到了 websocket 和 二维码 * golang 1.5 version * gol
  • APP记录——登录窗口

    2020-12-22 21:49:55
    客户使用的业务服务:PC端,小程序,移动web,移动app 管理员使用的业务服务:PC后台管理端。 PC后台管理端的功能:管理用户账号(登录,退出,用户管理,权限管理),商品管理(商品分类,分类参数,商品信息,订单...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 477
精华内容 190
关键字:

模拟app登录