Skip to content

Instantly share code, notes, and snippets.

@zz-chen
zz-chen / CVE-2018-0691.md
Created October 15, 2018 01:37 — forked from mala/CVE-2018-0691.md
CVE-2018-0691 プラスメッセージにおける証明書検証不備について

CVE-2018-0691 プラスメッセージにおける証明書検証不備について

  • https://jvn.jp/jp/JVN37288228/

  • 平日の業務時間内に見つけた問題である関係で(自分ルールで)所属を入れていますが、他社サービスに対する調査や報告は業務とは一切関係のない個人の活動として行っています。

  • 文責はmala個人にあります。お問い合わせなどありましたら個人宛にどうぞ。TwitterのDMや任意の文字列 @ma.la

概要

@zz-chen
zz-chen / TG: share
Created March 1, 2018 08:07 — forked from PhilippBaranovskiy/TG: share
Telegram share bookmarklet
javascript:location.href='https://telegram.me/share/url?url='+encodeURIComponent(location.href)+'&text='+encodeURIComponent(document.title);
@zz-chen
zz-chen / archive-commit-mac.sh
Created May 30, 2017 05:44 — forked from hereswhatidid/archive-commit-mac.sh
Custom file deployment actions for SourceTree. The zip archives generated retain directory structure so you can FTP them to a remote server in one shot. Actions are set up under Preferences -> Custom Actions and all have the Parameters set to "$REPO, $SHA"
#!/bin/sh
# creates a zip archive of the files modified in a merge.
args=("$@")
git archive -o deploy/deploy-${args[1]:0:7}.zip HEAD $(git diff-tree --no-commit-id --name-only -r ${args[1]})
import sys
import os
import subprocess
def git(args, **kwargs):
environ = os.environ.copy()
if 'repo' in kwargs:
environ['GIT_DIR'] = kwargs['repo']
if 'work' in kwargs:
environ['GIT_WORK_TREE'] = kwargs['work']
@zz-chen
zz-chen / wechat-useragent.js
Created May 24, 2016 08:08 — forked from GiaoGiaoCat/wechat-useragent.js
微信内置浏览器UserAgent的判断
// 检测浏览器的 User Agent 应该是非常简单的事情
// 微信在 Android 下的 User Agent
mozilla/5.0 (linux; u; android 4.1.2; zh-cn; mi-one plus build/jzo54k) applewebkit/534.30 (khtml, like gecko) version/4.0 mobile safari/534.30 micromessenger/5.0.1.352
// 微信在 iPhone 下的 User Agent
mozilla/5.0 (iphone; cpu iphone os 5_1_1 like mac os x) applewebkit/534.46 (khtml, like gecko) mobile/9b206 micromessenger/5.0
// 通过javascript判断
// 很容易看出来,微信的 User Agent 都有‘micromessenger’字符串标示,我们判断是否含有这些字符串就OK了
function isWeixinBrowser(){
@zz-chen
zz-chen / 0_reuse_code.js
Last active September 10, 2015 07:32
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console