Giter Club home page Giter Club logo

wechat-emoticon's Introduction

微信表情轰炸器

终端版微信表情轰炸器

最新 *6000+*自定义表情(未整理,存在不可描述的福利表情,慎用,不要搞♂事,轰炸多了会被微信关小黑屋

运行

git clone https://github.com/spacelan/wechat-emoticon.git
cd wechat-emoticon
npm install
node index.js

如果轰炸失败,请运行DEBUG=core node index.js查看log

使用

见终端提示

原理

自定义表情资源来自emoticons.json,包括表情的URL和MD5

微信网页版发送自定义表情实际上是发送的表情的MD5

微信API由wechat4u支持

wechat4u可能是目前唯一能发送表情的JS库

如何抓自定义表情

微信网页版通过https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxsyncAPI获取新消息

返回数据中,一个微信消息主要由以下部分组成

{
"MsgId": "11973880366746079",
"FromUserName": "@7f29b95a33028240f631dda0eecb49f",
"ToUserName": "filehelper",
"MsgType": 47,
"Content": "<msg><emoji fromusername = \"23423asf\" tousername = \"filehelper\" type=\"2\" idbuffer=\"media:0_0\" md5=\"325e6f67bf0bf95b58ca1e0d7cc51821\" len = \"494186\" productid=\"\" androidmd5=\"325e6f67bf0bf95b58ca1e0d7cc51821\" androidlen=\"494186\" s60v3md5 = \"325e6f67bf0bf95b58ca1e0d7cc51821\" s60v3len=\"494186\" s60v5md5 = \"325e6f67bf0bf95b58ca1e0d7cc51821\" s60v5len=\"494186\" cdnurl = \"http://emoji.qpic.cn/wx_emoji/xmrm0xnjtnahibtFOjQ7ywClrojsNQYOPyickj9Yo7D0NEa16DBl5GJA/\" designerid = \"\" thumburl = \"\" encrypturl = \"http://emoji.qpic.cn/wx_emoji/CvEmibBOcGYhrj1gCOCs48L4OdgAtuuyJueljF440oic4r8j6KPRkDfw/\" aeskey= \"caee1393b6427c72e35fef94d277d00b\" width= \"85\" height= \"85\" ></emoji> <gameext type=\"0\" content=\"0\" ></gameext></msg>",
...
}

MsgType == 47为表情消息

然后可以从Content中提取md5cdnurl(商店表情无法提取)

md5用来向别人发送表情

cdnurl用来直接下载表情,不需要认证

更详细的请查看代码index.js

各种表情下载脚本

https://www.v2ex.com/t/313382 https://github.com/spacelan/wechat-emoticon/issues

wechat-emoticon's People

Contributors

spacelan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wechat-emoticon's Issues

对Node的版本好像有限制

试验了下,OSX,默认brew装了0.12.7的node,会报错
用nvm装了一个新的4.6.1的node,才能跑
有空看下是什么情况?

php版本下载

<?php

define("CURRENT_PATH", dirname(__FILE__));

$jsonUrl = "https://raw.githubusercontent.com/spacelan/wechat-emoticon/master/emoticons.json";

$dirName = 'images';

if (!is_dir(CURRENT_PATH . '/' . $dirName)) {
	if (mkdir(CURRENT_PATH . '/' . $dirName) == true) {
        	echo $dirName . ' create success!' . PHP_EOL;
	} else {
        	echo $dirName . ' create failed!' . PHP_EOL;
		die;
	}
}

$urlList = json_decode(file_get_contents($jsonUrl), true);

if (!is_array($urlList)) {
	echo 'json file fetch failed!' . PHP_EOL;
	die;
}

foreach($urlList as $key=>$url) {
	$filename = CURRENT_PATH . '/' . $dirName . '/image_' . $key . '.gif';

	echo 'Info :' . $filename . ' downloading' . PHP_EOL;

        $fp = fopen($filename, 'w');

	if ($fp === false) {
		echo 'Notice: ' . $filename . ' Open failed!' . PHP_EOL;
		continue;
	}

	$ret = fwrite($fp, file_get_contents(($url['url'])));

	if ($ret === false) {
		echo 'Notice: ' . $filename . ' Write failed!' . PHP_EOL;
	}

	fclose($fp);
}

LZ : 这个是什么意思 ..~

选择你要轰炸的对象,直接在手机上向TA发送"科科",取消发送"拜拜"
开始轰炸 @c6c29f9bb2a89cc3f593544232337ca94a3a09fe7a31f2fb2312aa5c84a03c21
(node:7514) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): [object Object]
(node:7514) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): [object Object]
(node:7514) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): [object Object]
(node:7514) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): [object Object]
(node:7514) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 5): [object Object]
(node:7514) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 6): [object Object]
(node:7514) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 7): [object Object]
(node:7514) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 8): [object Object]
(node:7514) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 9): [object Object]
(node:7514) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 10): [object Object]
(node:7514) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 11): [object Object]
(node:7514) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 12): [object Object]
(node:7514) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 13): [object Object]
(node:7514) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 14): [object Object]
取消轰炸 @c6c29f9bb2a89cc3f593544232337ca94a3a09fe7a31f2fb2312aa5c84a03c21

java版本下载

public static void main(String[] args) throws IOException {
String jsonUrl = "https://raw.githubusercontent.com/spacelan/wechat-emoticon/master/emoticons.json";
URL url = new URL(jsonUrl);
InputStream is = url.openConnection().getInputStream();
InputStreamReader isr = new InputStreamReader(is, "utf-8");
BufferedReader br = new BufferedReader(isr);
String line = "";
String json = "";
while ((line = br.readLine()) != null) {
json += line;
}
System.out.println(json);
isr.close();
is.close();
JSONArray ja = JSONArray.parseArray(json);

    FileOutputStream fileOutputStream = null;
    DataInputStream dis = null;
    System.out.println("预计下载图片数count=" + ja.size());
    for (int i = 0; i < ja.size(); i++) {


        JSONObject jo = (JSONObject) ja.get(i);
        URL imgUrl = new URL((String) jo.get("url"));
        byte[] buffer = new byte[1024];
        dis = new DataInputStream(imgUrl.openConnection().getInputStream());
        File file = new File("d://wechat//img_" + i + ".gif");
        fileOutputStream = new FileOutputStream(file);
        int len = 0;
        System.out.println("正在下载第"+i+"张图片............");
        while ((len = dis.read(buffer)) > 0) {
            fileOutputStream.write(buffer, 0, len);
        }
    }
    fileOutputStream.close();
    dis.close();
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.