如何获取微信小程序前端源码

栏目:资讯发布:2023-11-10浏览:1收藏

如何获取微信小程序前端源码,第1张

微信小程序都是在本地运行的,所以我们可以在我们的手机内存中找到小程序的源码文件。

如果你的手机已经root了,那么可以直接查找/data/data/comtencentmm/MicroMsg//appbrand/pkg/ 路径中有一段,这里表示不确定具体一个,一般是很长的数字和字母组成的文件 ,可以先将所有的小程序文件夹删除,然后重新进入你想要的小程序,这样就可以确定是哪个文件了,当然,如果没有root可以使用模拟器来拿,建议还是使用模拟器,更方便一些。

拿到了wxpkg文件,但是我们还差一步,需要将这个文件进行反编译得到内部的各个文件才可以。

wxpkg 是经过微信加密的文件,无法直接通过解压来获得,如果开发比较深入的话,可以直接拿到github的star比较多的wxunpkg ,然后安装运行去解压,如果不是很擅长的话,可以直接使用已经做好的傻瓜式的桌面软件,直接进行反编译处理 。

原理介绍:网页链接

软件获取:网页链接

我的建议还是直接去看下github的源码,了解下反编译原理,然后nodejs语言不擅长可以拿其他的语言来尝试处理下,算是学习也可以。

学习“推箱子”C语言编码:

#include <stdioh>

#include <conioh>

#include<stdlibh>

#include<windowsh>

int m =0;  //m代表第几关

struct maps{short a[9][11]; };

struct maps map[5]={ 0,0,0,0,0,0,0,0,0,0,0,  //共5关,每关9行

                  0,1,1,1,1,1,1,1,0,0,0,

                  0,1,0,0,0,0,0,1,1,1,0,

                  1,1,4,1,1,1,0,0,0,1,0,  //0空地,1墙

                  1,5,0,0,4,0,0,4,0,1,0,  //4是箱子,5是人

                  1,0,3,3,1,0,4,0,1,1,0,  //3是目的地

                  1,1,3,3,1,0,0,0,1,0,0,  //7是箱子在目的地(4+3)

                  0,1,1,1,1,1,1,1,1,0,0,  //8是人在目的地(5+3)

                  0,0,0,0,0,0,0,0,0,0,0,

                  0,0,0,0,0,0,0,0,0,0,0,

                  0,0,1,1,1,1,0,0,0,0,0,

                  0,0,1,5,0,1,1,1,0,0,0,

                  0,0,1,0,4,0,0,1,0,0,0,

                  0,1,1,1,0,1,0,1,1,0,0,

                  0,1,3,1,0,1,0,0,1,0,0,

                  0,1,3,4,0,0,1,0,1,0,0,

                  0,1,3,0,0,0,4,0,1,0,0,

                  0,1,1,1,1,1,1,1,1,0,0,

                  0,0,0,0,0,0,0,0,0,0,0,

                  0,0,0,1,1,1,1,1,1,1,0,

                  0,0,1,1,0,0,1,0,5,1,0,

                  0,0,1,0,0,0,1,0,0,1,0,

                  0,0,1,4,0,4,0,4,0,1,0,

                  0,0,1,0,4,1,1,0,0,1,0,

                  1,1,1,0,4,0,1,0,1,1,0,

                  1,3,3,3,3,3,0,0,1,0,0,

                  1,1,1,1,1,1,1,1,1,0,0,

                  0,1,1,1,1,1,1,1,1,1,0,

                  0,1,0,0,1,1,0,0,0,1,0,

                  0,1,0,0,0,4,0,0,0,1,0,

                  0,1,4,0,1,1,1,0,4,1,0,

                  0,1,0,1,3,3,3,1,0,1,0,

                  1,1,0,1,3,3,3,1,0,1,1,

                  1,0,4,0,0,4,0,0,4,0,1,

                  1,0,0,0,0,0,1,0,5,0,1,

                  1,1,1,1,1,1,1,1,1,1,1,

                  0,0,0,0,0,0,0,0,0,0,0,

                  0,0,0,1,1,1,1,1,1,0,0,

                  0,1,1,1,0,0,0,0,1,0,0,

                  1,1,3,0,4,1,1,0,1,1,0,

                  1,3,3,4,0,4,0,0,5,1,0,

                  1,3,3,0,4,0,4,0,1,1,0,

                  1,1,1,1,1,1,0,0,1,0,0,

                  0,0,0,0,0,1,1,1,1,0,0,

                  0,0,0,0,0,0,0,0,0,0,0 };

void DrMap( )  //绘制地图

{ CONSOLE_CURSOR_INFO cursor_info={1,0};   //隐藏光标的设置

 SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE),&cursor_info);

 printf("\n\n \t\t\b推箱子");

 printf("\n \t");

for (int i = 0; i < 9; i++)

    {for (int j = 0; j < 11; j++)

       {switch (map[m]a[i][j])

          {case 0:  printf("  "); break;

           case 1:  printf("■"); break;

           case 3:  printf("◎");break;

           case 4:  printf("□"); break;

           case 5:  printf("♀"); break;   //5是人

           case 7:  printf("□"); break;  //4 + 3箱子在目的地中

           case 8:  printf("♀");break;   // 5 + 3人在目的地中

          }

       }

      printf("\n\t");

   }

}

 

void gtxy(int x, int y)  //控制光标位置的函数

{ COORD coord;

 coordX = x;

 coordY = y;

 SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);

}

 

void start( )  //开始游戏

{ int r, c;    //r,c用于记录人的下标

 for (int i = 0; i < 9; i++)

   { for (int j = 0; j < 11; j++)

       {if (map[m]a[i][j] == 5||map[m]a[i][j]==8) { r = i;  c = j; } } //i j 人的下标

   }

char key; 

 key = getch( );

 switch (key)

   {case 'W':

    case 'w':

    case 72:

      if (map[m] a[r - 1][c] == 0|| map[m] a [r - 1][c] == 3)

        { gtxy(2c+8,r-1+3); printf("♀");   // gtxy(2c+8,r-1+3)是到指定位置输出字符

          if(map[m] a[r ][c] == 5){gtxy(2c+8,r+3); printf("  "); }

         if(map[m] a[r ][c] == 8){gtxy(2c+8,r+3); printf("◎");}

         map[m] a [r - 1][c] += 5;  map[m] a [r][c] -= 5; }

      else  if (map[m] a [r - 1][c] == 4 || map[m] a [r - 1][c] == 7)

         { if (map[m] a [r - 2][c] == 0 || map[m] a [r - 2][c] == 3)

           { gtxy(2c+8,r-2+3); printf("□"); gtxy(2c+8,r-1+3); printf("♀");

             if(map[m] a[r ][c] == 5){gtxy(2c+8,r+3); printf("  "); }

             if(map[m] a[r ][c] == 8){gtxy(2c+8,r+3); printf("◎");}

             map[m] a [r - 2][c] += 4;  map[m] a [r - 1][c] += 1;

             map[m] a [r][c] -= 5; }

        } break;

    case 'S':

    case 's':

    case 80:

        if (map[m] a [r + 1][c] == 0 || map[m] a [r + 1][c] == 3)

         { gtxy(2c+8,r+1+3); printf("♀");

           if(map[m] a[r ][c] == 5){gtxy(2c+8,r+3); printf("  "); }

          if(map[m] a[r ][c] == 8){gtxy(2c+8,r+3); printf("◎");}

          map[m] a [r + 1][c] += 5;  map[m] a [r][c] -= 5; }

       else if (map[m] a [r + 1][c] == 4 || map[m] a [r+ 1][c] == 7)

           { if (map[m] a [r + 2][c] == 0 || map[m] a [r + 2][c] == 3)

             { gtxy(2c+8,r+2+3); printf("□"); gtxy(2c+8,r+1+3); printf("♀");

               if(map[m] a[r ][c] == 5){gtxy(2c+8,r+3); printf("  "); }

              if(map[m] a[r ][c] == 8){gtxy(2c+8,r+3); printf("◎");}

              map[m] a [r + 2][c] += 4; map[m] a [r + 1][c] += 1;

             map[m] a [r][c] -= 5; }

          }break;

    case 'A':

    case 'a':

    case 75:

        if (map[m] a [r ][c - 1] == 0 || map[m] a [r ][c - 1] == 3)

          { gtxy(2(c-1)+8,r+3); printf("♀");

           if(map[m] a[r ][c] == 5){gtxy(2c+8,r+3); printf("  "); }

          if(map[m] a[r ][c] == 8){gtxy(2c+8,r+3); printf("◎");}

           map[m] a [r ][c - 1] += 5; map[m] a [r][c] -= 5; }

       else if (map[m] a [r][c - 1] == 4 || map[m] a [r][c - 1] == 7)

          {if (map[m] a [r ][c - 2] == 0 || map[m] a [r ][c - 2] == 3)

            { gtxy(2(c-2)+8,r+3); printf("□"); gtxy(2(c-1)+8,r+3); printf("♀");

              if(map[m] a[r ][c] == 5){gtxy(2c+8,r+3); printf("  "); }

              if(map[m] a[r ][c] == 8){gtxy(2c+8,r+3); printf("◎");}

              map[m] a [r ][c - 2] += 4; map[m] a [r ][c - 1] += 1;

              map[m] a [r][c] -= 5; }

         }break;

    case 'D':

    case 'd':

    case 77:

        if (map[m] a [r][c + 1] == 0 || map[m] a [r][c + 1] == 3)

         { gtxy(2(c+1)+8,r+3); printf("♀");

           if(map[m] a[r ][c] == 5){gtxy(2c+8,r+3); printf("  "); }

           if(map[m] a[r ][c] == 8) {gtxy(2c+8,r+3); printf("◎");}

          map[m] a [r][c + 1] += 5;  map[m] a [r][c] -= 5; }

      else if (map[m] a [r][c + 1] == 4 || map[m] a [r][c + 1] == 7)

          { if (map[m] a [r][c + 2] == 0 || map[m] a [r][c + 2] == 3)

            { gtxy(2(c+2)+8,r+3); printf("□"); gtxy(2(c+1)+8,r+3); printf("♀");

              if(map[m] a[r ][c] == 5){gtxy(2c+8,r+3); printf("  "); }

             if(map[m] a[r ][c] == 8){gtxy(2c+8,r+3); printf("◎");}

             map[m] a [r][c + 2] += 4; map[m] a [r][c + 1] += 1;

             map[m] a [r][c] -= 5; }

         }break;

    }

}

int ifwan( )  //是否完成(1是0否)

{ if(m==0){if(map[m]a[5][2]==7&& map[m]a[5][3]==7&&

                  map[m]a[6][2]==7&& map[m]a[6][3]==7) return 1;}

 if(m==1){if(map[m]a[5][2]==7&& map[m]a[6][2]==7&&

                  map[m]a[7][2]==7) return 1;}

 if(m==2){if(map[m]a[7][1]==7&& map[m]a[7][2]==7&& map[m]a[7][3]==7&&

                 map[m]a[7][4]==7&& map[m]a[7][5]==7) return 1;}

if(m==3){if(map[m]a[4][4]==7&& map[m]a[4][5]==7&& map[m]a[4][6]==7&&

        map[m]a[5][4]==7&& map[m]a[5][5]==7&& map[m]a[5][6]==7) return 1;}

if(m==4){if(map[m]a[3][2]==7&& map[m]a[4][1]==7&& map[m]a[4][2]==7&&

                map[m]a[5][1]==7&& map[m]a[5][2]==7) return 1;}

 return 0;

}

 

int main( )  //主函数

{ while (1)

     { system("cls");

       DrMap( );

       while (1)

           { start( );

             if(ifwan()){printf("\007");break;} //完成后响铃

          }

       m+=1;

    }

  return 0;

}

1:仿豆瓣**微信小程序

https://githubcom/zce/weapp-demo

2:微信小程序移动端商城

https://githubcom/liuxuanqiang/wechat-weapp-mall

3:Gank微信小程序

https://githubcom/lypeer/wechat-weapp-gank

4:微信小程序高仿QQ应用

https://githubcom/xiehui999/SmallAppForQQ

5:微信中的知乎

https://githubcom/RebeccaHanjw/weapp-wechat-zhihu

6:实现一个移动端小商城

https://githubcom/skyvow/m-mall

7:微信小程序demo

https://githubcom/web-Marker/wechat-Development

8: 跑步微信小程序Demo

https://githubcom/alanwangmodify/weChatApp-Run

9:简单的v2ex微信小程序

https://githubcom/jectychen/wechat-v2ex

10:腾讯云微信小程序

https://githubcom/tencentyun/weapp-client-demo

11:微信小程序-微票

https://githubcom/wangmingjob/weapp-weipiao

12:微信小程序demo 仿手机淘宝

https://githubcom/ChangQing666/wechat-weapp-taobao

13:一个为微信小程序开发准备的基础骨架

https://githubcom/zce/weapp-boilerplate

14:巴爷微信商城的简单版本

https://githubcom/bayetech/wechat_mall_applet

15:微信小程序 - **推荐

https://githubcom/yesifeng/wechat-weapp-movie

16:微信小程序-知乎日报

https://githubcom/myronliu347/wechat-app-zhihudaily

17:微信小程序: 音乐播放器

https://githubcom/eyasliu/wechat-app-music

18:使用微信小程序实现分答这款APP的基础功能

https://githubcom/davedavehong/fenda-mock

19:微信小程序开发demo-地图定位

https://githubcom/giscafer/wechat-weapp-mapdemo

:20:微信小程序 - 豆瓣**

https://githubcom/hingsir/weapp-douban-film

21:wepy仿微信聊天界面

https://githubcom/wepyjs/wepy-wechat-demo

22:仿 「ONE · 一个」 的微信小程序

https://githubcom/ahonn/weapp-one

23:微信小程序集成Redux实现的Todo list

https://githubcom/charleyw/wechat-weapp-redux-todos

24: 基于Zhihu Live数据的微信小程序

https://githubcom/dongweiming/weapp-zhihulive

25:微信小程序之小熊の日记

https://githubcom/harveyqing/BearDiary

26:仿网易云音乐APP的微信小程序

https://githubcom/sqaiyan/netmusic-app

27:微信小程序的Flex布局demo

https://githubcom/icindy/wxflex

28:番茄时钟微信小程序版

https://githubcom/kraaas/timer

29:Wafer 服务端 Demo

https://githubcom/tencentyun/weapp-node-server-demo

30:微信小程序版聊天室

https://githubcom/ericzyh/wechat-chat

31:微信小程序版简易计算器,适合入门练手

https://githubcom/dunizb/wxapp-sCalc

32:微信小程序示例一笔到底

https://githubcom/CFETeam/weapp-demo-session

33:基于面包旅行 API 制作的微信小程序示例

https://githubcom/romoo/weapp-demo-breadtrip

34:新闻阅读器

https://githubcom/vace/wechatapp-news-reader

35:一个简单的微信小程序购物车DEMO

https://githubcom/SeptemberMaples/wechat-weapp-demo

36:微信小程序-公众号热门文章信息流

https://githubcom/hijiangtao/weapp-newsapp

37:通过Nodejs实现的妹子照片爬虫微信小程序

https://githubcom/litt1e-p/weapp-girls

38:从FlexLayout布局开始学习微信小程序

https://githubcom/hardog/wechat-app-flexlayout

39:HiApp 微信小程序版

https://githubcom/BelinChung/wxapp-hiapp

40:微信小程序的简单尝试

https://githubcom/zhengxiaowai/weapp-github

41:集美大学图书馆的便捷工具

https://githubcom/ToadWoo/bookbox-wxapp

42:微信小程序版妹纸图

https://githubcom/brucevanfdm/WeChatMeiZhi

43:V2ex 微信小程序版

https://githubcom/bestony/weapp-V2ex

44:微信小程序仿百思不得姐

https://githubcom/SureZhangHW/WXBaiSi

45:微信小程序音乐播放器应用

https://githubcom/xingbofeng/wx-audio

46:医药网原生APP的微信小程序DEMO

https://githubcom/jiabinxu/yiyaowang-wx

47:微信小程序跟读

https://githubcom/gxmzjxk/wxreading

48:微信小程序瀑布流布局模式

https://githubcom/icindy/WxMasonry

49:微信小程序HotApp云笔记

https://githubcom/hotapp888/hotapp-notepad

50:小程序模仿——网易云音乐

https://githubcom/MengZhaoFly/wechatApp-netease_cloudmusic

51:微信小程序商城demo

https://githubcom/lin-xin/wxapp-mall

52:微信小程序版的扫雷

https://githubcom/jsongo/wx-mime

53:专注管理时间的微信小程序

https://githubcom/SeaHub/PigRaising

54:微信小程序版干货集中营

https://githubcom/iwgang/GankCamp-WechatAPP

55:英雄联盟(LOL)战绩查询

https://githubcom/xiaowenxia/weapp-lolgame

56:微信小程序首字母排序选择表

https://githubcom/icindy/wxSortPickerView

57:微信小程序版豆瓣**

https://githubcom/David-Guo/weapp-douban-movie

58:简单的实现了1024的游戏规则

https://githubcom/RedLove/WexinApp_1024

59:微信小程序试玩

https://githubcom/uniquexiaobai/wechat-app-githubfeed

60:微信小程序逗乐

https://githubcom/mkxiansheng/doule

61:一步步开发微信小程序

https://githubcom/Gavin-YYC/wxApp

62:一个 meteor 的 React todo list 例子

https://githubcom/leijing7/wx-mina-meteor

63:微信小程序健康菜谱

https://githubcom/bestTao/caipu_weixin

64: jspapa微信小程序版本

https://githubcom/biggerV/jspapa-wx

65:微信小程序版的CNodeJs中文社区

https://githubcom/Shaman05/CNodeJs-WXAPP

66:LeanCloud 的微信小程序用户登陆Demo

https://githubcom/bestony/weapp-LeanCloud

67: 微笑话微信小程序

https://githubcom/zszdevelop/wejoke

68:微信小程序开发的App

https://githubcom/chongbenben/liwushuoapp

69:体育新闻微信小程序

https://githubcom/havenxie/weapp-sportsnews

70:基于Labrador和mobx构建的小程序开发demo

https://githubcom/spacedragon/labrador_mobx_example

如何获取微信小程序前端源码

微信小程序都是在本地运行的,所以我们可以在我们的手机内存中找到小程序的源码文件。如果你的手机已经root了,那么可以直接查找/data/data...
点击下载
热门文章
    确认删除?
    回到顶部