京东快速提取 cookie 工具 golang版本

Related tags

Storage cookie jd
Overview

Build Status

说明

v1.x 版本(tag) 本地运行,本地提取

京东的cookie 本地提取工具(小白专用)

双击exe文件,运行服务,后用本地的浏览器打开 http://127.0.0.1:29099

来辅助提取你的cookie

v2.x 版本(tag) 服务器运行,客户端自行扫码提取,服务端自动更新cookie

已不受服务端和客户端在同ip的限制

客户端通过浏览器打开, http://公网ip或者域名:29099/

然后扫码即可提取。

## linux/macos下
chmod +x jdcookie
## 加上-d 代表后台运行
./jdcookie -d
## windows 下
## 可以直接双击运行。也可以cmd中运行
## cmd 中运行 参数和linux一样
.\jdcookie.exe -d

v2.0.5

应网友 @king6207 的要求,前端页面,提取cookie成功后增加一个直接复制cookie的按钮。

v2.0.4

调整更新的sql语法,将replace into替换为 INSERT .... ON DUPLICATE KEY UPDATE。修复更新cookie引发id变更的问题(replace更新是先删在insert)。因小伙伴要求id顺序不能变。

v2.0.3

数据库做调整、主键变更为id字段,方便一些用户做排序。

v2.0.2

增加了cookie存入db的支持

v 2.0.1

环境变量 UPSAVE cookie的推送地址。

简单做了一个docker镜像 scjtqs/jd_cookie:latest

支持 arm/arm64/i386/amd64

编译方法 (For v2.x tag)

#安装编译工具,用于打包html到二进制
go get -u github.com/gobuffalo/packr/v2/packr2
#build和go build一样,交叉编译的方式也是一样的
CGO_ENABLED=0 GOOS=linux GOARCH=arm packr2 build  -o jdcookie
#简单点的
packr2 build  -o jdcookie
# 编译windows x86版本
CGO_ENABLED=0 GOOS=windows GOARCH=386 packr2 build  -o jdcookie_windows_x86.exe
# 编译windows x64版本
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 packr2 build  -o jdcookie_windows_x64.exe
# 编译mac arm64 (m1)版本
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 packr2 build  -o jdcookie_darwin_arm64
# 编译mac amd64 x64版本
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 packr2 build  -o jdcookie_darwin_x64

v3.x版本(tag) 服务端运行,db多类型支持。同样支持直接下载release中的exe文件本地运行。

DB_TYPE 可以选择 mysql、postgres、sqlite3、mssql

因为增加了sqlite3的支持,引入了cgo。不方便直接交叉编译了。于是 v3.x版本开始,就主要docker版了。docker支持 linux/amd64、linux/arm/v7、linux/arm64、linux/386。这4种架构平台。

release中的下载二进制包,无法使用sqlite3数据库(为了交叉编译,关闭了cgo)(仅linux_amd64的预编译包可以使用sqlite3),要使用sqlite3数据库的,请自行在需要运行的机器上编译。或者使用docker版本。

v3.0.3

使用golang 1.16新特性,静态文件打包采用 embed包处理,直接go build就可以了。不再依赖packr2。直接go build即可。不过需要安装 go 1.16+版本。

v3.0.2

修复ua失效问题

v3.0.1

除了mysql外,应hcl要求,增加了其他db类型支持: postgres、sqlite3、mssql

编译方法 (For v3.x tag)

#安装golang环境
#安装gcc等编译环境
## for alpine
apk add --update gcc musl-dev sqlite-static sqlite-dev
## for Fedora
sudo yum groupinstall "Development Tools" "Development Libraries"
## for Ubuntu
sudo apt-get install build-essential
## for Mac OSX
brew install sqlite3
brew upgrade icu4c
go install github.com/mattn/go-sqlite3
#linux/mac/UNIX下
CGO_ENABLED=1 go build  -o jdcookie
#查看帮助
./jdcookie -h 
#windows下
CGO_ENABLED=1 go build  -o jdcookie.exe
#查看帮助
.\jdcookie.exe -h

docker 使用示例

quick start

docker run -d -p 29099:29099  scjtqs/jd_cookie:latest

with environment

## 更新镜像
docker pull jd_cookie scjtqs/jd_cookie:latest
## UPSAVE 默认是空,不会推送到其他地址;DB_ENABLE默认为false,不会记录cookie到db。
docker run -d \
-p 29099:29099 \
-e UPSAVE="http://192.168.0.12:8080/savecookie" \
-e DB_ENABLE="true" \
-e DB_HOST="192.168.0.13" \
-e DB_PORT="3306" \
-e DB_USER="root" \
-e DB_PASS="abcde" \
-e DB_DATABASE="cookies" \
-e DB_TYPE="mysql" \
--name jd_cookie scjtqs/jd_cookie:latest

for sqlite3 usage

docker run -d \
-p 29099:29099 \
-v `pwd`/db/:/opt/app/db/ \
-e UPSAVE="http://192.168.0.12:8080/savecookie" \
-e DB_ENABLE="true" \
-e DB_HOST="./db/cookies.db" \
-e DB_TYPE="sqlite3" \
--name jd_cookie scjtqs/jd_cookie:latest

佛系更新,够用就行。欢迎pr和建议。欢迎start

You might also like...

React.js Login, Logout, Registration example with JWT and HttpOnly Cookie

React Login and Registration example with JWT and HttpOnly cookie For more detail, please visit: React Login and Registration example with JWT and Htt

Dec 24, 2022

A browser extension to simplify web pages and hide distracting things like hide cookie banners, auto-playing videos, sidebars, etc

A browser extension to simplify web pages and hide distracting things like hide cookie banners, auto-playing videos, sidebars, etc

Unclutter Browser Extension A browser extension to simplify web pages and hide distracting things like hide cookie banners, auto-playing videos, sideb

Jan 9, 2023

A cookie banner for Bootstrap 5 websites

A cookie banner for Bootstrap 5 websites

Bootstrap cookie banner A cookie banner for websites using Bootstrap 5. Demo: Bootstrap Version used: 5.1.3 Usage Include the CSS and js files. !-- C

Dec 3, 2022

Angular 14 JWT Authentication & Authorization with Web API and HttpOnly Cookie - Token Based Auth, Router, Forms, HttpClient, BootstrapBootstrap

Angular 14 JWT Authentication & Authorization with Web API and HttpOnly Cookie - Token Based Auth, Router, Forms, HttpClient, BootstrapBootstrap

Angular 14 JWT Authentication with Web API and HttpOnly Cookie example Build Angular 14 JWT Authentication & Authorization example with Web Api, HttpO

Dec 26, 2022

Dead simple cookie-based session for Deno Fresh.

Fresh Session 🍋 Dead simple cookie-based session for Deno Fresh. Get started Fresh Session comes with a simple middleware to add at the root of your

Jan 5, 2023

Vanilla JS that seamlessly add a notice for the European Cookie Law to any website

Notice: CookieNoticeJS is not under active development for the time being (and not GDPR compliant for what I know). Check AOEPeople fork instead. Cook

Aug 26, 2022

A simple cookie consent plugin for jQuery

jquery.cookie-consent A simple jQuery plugin for requesting consent for cookie usage. Live demo See a live demo on CodePen Installation Using npm npm

Nov 29, 2022

A utility package to help implement stateless CSRF protection using the Double Submit Cookie Pattern in express.

Double CSRF A utility package to help implement stateless CSRF protection using the Double Submit Cookie Pattern in express. Dos and Don'ts • Getting

Dec 28, 2022

MERN authentication using JWT and HTTP-Only cookie

MERN authentication using JWT and HTTP-Only cookie

MERN Authentication Starter This is a starter app for a MERN stack application with authentication. This is for a SPA (Single Page Application) workfl

Aug 13, 2023
Releases(v3.0.6)
Owner
scjtqs
前世今生,再聚首。
scjtqs
JavaScript Client-Side Cookie Manipulation Library

Cookies.js Cookies.js is a small client-side javascript library that makes managing cookies easy. Features Browser Compatibility Getting the Library U

Scott Hamper 1.8k Oct 7, 2022
An AngularJS module that gives you access to the browsers local storage with cookie fallback

angular-local-storage An Angular module that gives you access to the browsers local storage Table of contents: Get Started Video Tutorial Development

Gregory Pike 2.9k Dec 25, 2022
JDsms Cookie

京东短信获取Cookie PHP 环境运行(请确定运行环境). 自行修改 /api/sendNotify.php 里的 企业微信推送 参数 /images目录下 wx.png和qq.png 替换自己微信和QQ群 二维码图片 自用 仅用于测试和学习研究,禁止用于商业用途,您必须在下载后的24小时内从计

null 2 Feb 14, 2022
Vanilla JS that seamlessly add a notice for the European Cookie Law to any website

Notice: CookieNoticeJS is not under active development for the time being (and not GDPR compliant for what I know). Check AOEPeople fork instead. Cook

Alessandro Benoit 44 Aug 26, 2022
No longer maintained, superseded by JS Cookie:

IMPORTANT! This project was moved to https://github.com/js-cookie/js-cookie, check the discussion. New issues should be opened at https://github.com/j

Klaus Hartl 8.6k Jan 5, 2023
JavaScript Client-Side Cookie Manipulation Library

Cookies.js Cookies.js is a small client-side javascript library that makes managing cookies easy. Features Browser Compatibility Getting the Library U

Scott Hamper 1.8k Oct 7, 2022
An AngularJS module that gives you access to the browsers local storage with cookie fallback

angular-local-storage An Angular module that gives you access to the browsers local storage Table of contents: Get Started Video Tutorial Development

Gregory Pike 2.9k Dec 25, 2022
IDLIX Scrapper API with cookie

IDLIX Scrapper About IDLIX Scrapper, IDLIX API Hak Cipta Projek ini dilindungi oleh MIT yang dimana penggunanya boleh menggunakan, mendistribusikan, m

Annurdien Rasyid 9 Dec 16, 2022
JDsms Cookie

京东短信获取Cookie PHP 环境运行(请确定运行环境). 自行修改 /api/sendNotify.php 里的 企业微信推送 参数 /images目录下 wx.png和qq.png 替换自己微信和QQ群 二维码图片 自用 仅用于测试和学习研究,禁止用于商业用途,您必须在下载后的24小时内从计

null 2 Feb 14, 2022
Netlify functions session cookie 🍪

netlify-functions-session-cookie ?? Cryptographically-signed session cookies for Netlify functions. Summary Install Concept and Usage API Environment

Matteo Cargnelutti 7 Jun 8, 2022