├── .gitignore ├── CHANGE_LOGS.md ├── LICENSE ├── README.md ├── bnd ├── .gitignore ├── aria2c.zip ├── bnd.exe.manifest ├── browser.go ├── browser_windows.go ├── build.bat ├── build.sh ├── icon.ico ├── icon.png ├── main.go ├── vendor │ ├── github.com │ │ ├── GeertJohan │ │ │ └── go.rice │ │ │ │ ├── .gitignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── AUTHORS │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── appended.go │ │ │ │ ├── box.go │ │ │ │ ├── config.go │ │ │ │ ├── debug.go │ │ │ │ ├── embedded.go │ │ │ │ ├── embedded │ │ │ │ └── embedded.go │ │ │ │ ├── file.go │ │ │ │ ├── http.go │ │ │ │ ├── sort.go │ │ │ │ ├── virtual.go │ │ │ │ └── walk.go │ │ ├── andlabs │ │ │ └── ui │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── TODO.md │ │ │ │ ├── area.go │ │ │ │ ├── areahandler.go │ │ │ │ ├── bindTODO │ │ │ │ ├── box.go │ │ │ │ ├── button.go │ │ │ │ ├── checkbox.go │ │ │ │ ├── combobox.go │ │ │ │ ├── control.go │ │ │ │ ├── datetimepicker.go │ │ │ │ ├── draw.go │ │ │ │ ├── dummy_windows.cpp │ │ │ │ ├── entry.go │ │ │ │ ├── fontbutton.go │ │ │ │ ├── group.go │ │ │ │ ├── label.go │ │ │ │ ├── libui_darwin_amd64.a │ │ │ │ ├── libui_linux_386.a │ │ │ │ ├── libui_linux_amd64.a │ │ │ │ ├── libui_windows_386.a │ │ │ │ ├── libui_windows_386.res.o │ │ │ │ ├── libui_windows_amd64.a │ │ │ │ ├── libui_windows_amd64.res.o │ │ │ │ ├── link_darwin_amd64.go │ │ │ │ ├── link_linux_386.go │ │ │ │ ├── link_linux_amd64.go │ │ │ │ ├── link_windows_386.go │ │ │ │ ├── link_windows_amd64.go │ │ │ │ ├── main.go │ │ │ │ ├── progressbar.go │ │ │ │ ├── radiobuttons.go │ │ │ │ ├── separator.go │ │ │ │ ├── slider.go │ │ │ │ ├── spinbox.go │ │ │ │ ├── static.manifest │ │ │ │ ├── static.rc │ │ │ │ ├── static_windows_386.syso │ │ │ │ ├── static_windows_amd64.syso │ │ │ │ ├── stddialogs.go │ │ │ │ ├── tab.go │ │ │ │ ├── ui.h │ │ │ │ ├── util.go │ │ │ │ └── window.go │ │ ├── astaxie │ │ │ └── beego │ │ │ │ ├── LICENSE │ │ │ │ ├── session │ │ │ │ ├── README.md │ │ │ │ ├── sess_cookie.go │ │ │ │ ├── sess_file.go │ │ │ │ ├── sess_mem.go │ │ │ │ ├── sess_utils.go │ │ │ │ └── session.go │ │ │ │ └── utils │ │ │ │ ├── caller.go │ │ │ │ ├── captcha │ │ │ │ └── LICENSE │ │ │ │ ├── debug.go │ │ │ │ ├── file.go │ │ │ │ ├── mail.go │ │ │ │ ├── rand.go │ │ │ │ ├── safemap.go │ │ │ │ ├── slice.go │ │ │ │ └── utils.go │ │ ├── bitly │ │ │ └── go-simplejson │ │ │ │ ├── .travis.yml │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── simplejson.go │ │ │ │ ├── simplejson_go10.go │ │ │ │ └── simplejson_go11.go │ │ ├── corpix │ │ │ └── uarand │ │ │ │ ├── LICENSE │ │ │ │ ├── Makefile │ │ │ │ ├── README.md │ │ │ │ ├── glide.lock │ │ │ │ ├── glide.yaml │ │ │ │ ├── uarand.go │ │ │ │ ├── useragents.go │ │ │ │ └── useragents.mk │ │ ├── daaku │ │ │ └── go.zipexe │ │ │ │ ├── license │ │ │ │ ├── readme.md │ │ │ │ └── zipexe.go │ │ ├── denisbrodbeck │ │ │ └── machineid │ │ │ │ ├── LICENSE.md │ │ │ │ ├── README.md │ │ │ │ ├── helper.go │ │ │ │ ├── id.go │ │ │ │ ├── id_bsd.go │ │ │ │ ├── id_darwin.go │ │ │ │ ├── id_linux.go │ │ │ │ ├── id_windows.go │ │ │ │ ├── logo.png │ │ │ │ └── makefile │ │ ├── elazarl │ │ │ └── goproxy │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── actions.go │ │ │ │ ├── all.bash │ │ │ │ ├── ca.pem │ │ │ │ ├── certs.go │ │ │ │ ├── chunked.go │ │ │ │ ├── counterecryptor.go │ │ │ │ ├── ctx.go │ │ │ │ ├── dispatcher.go │ │ │ │ ├── doc.go │ │ │ │ ├── https.go │ │ │ │ ├── key.pem │ │ │ │ ├── proxy.go │ │ │ │ ├── responses.go │ │ │ │ └── signer.go │ │ ├── fatih │ │ │ └── color │ │ │ │ ├── .travis.yml │ │ │ │ ├── LICENSE.md │ │ │ │ ├── README.md │ │ │ │ ├── color.go │ │ │ │ └── doc.go │ │ ├── gorilla │ │ │ ├── rpc │ │ │ │ ├── LICENSE │ │ │ │ └── v2 │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── compression_selector.go │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── encoder_selector.go │ │ │ │ │ ├── json2 │ │ │ │ │ ├── client.go │ │ │ │ │ ├── error.go │ │ │ │ │ └── server.go │ │ │ │ │ ├── map.go │ │ │ │ │ └── server.go │ │ │ └── websocket │ │ │ │ ├── AUTHORS │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── client.go │ │ │ │ ├── conn.go │ │ │ │ ├── doc.go │ │ │ │ ├── json.go │ │ │ │ ├── server.go │ │ │ │ └── util.go │ │ ├── iikira │ │ │ ├── Baidu-Login │ │ │ │ ├── .gitignore │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── bdcrypto │ │ │ │ │ ├── aes.go │ │ │ │ │ ├── archive.go │ │ │ │ │ ├── base64.go │ │ │ │ │ ├── bdcrypto.go │ │ │ │ │ ├── ecb │ │ │ │ │ │ └── ecb.go │ │ │ │ │ ├── hmac.go │ │ │ │ │ ├── reverse.go │ │ │ │ │ └── rsa.go │ │ │ │ ├── config.go │ │ │ │ ├── http_request.go │ │ │ │ ├── http_server.go │ │ │ │ ├── http_server_page.go │ │ │ │ ├── util.go │ │ │ │ └── version.go │ │ │ ├── BaiduPCS-Go │ │ │ │ ├── .github │ │ │ │ │ └── RELEASE_TEMPLATE.md │ │ │ │ ├── .gitignore │ │ │ │ ├── BaiduPCS-Go.exe.manifest │ │ │ │ ├── Gopkg.lock │ │ │ │ ├── Gopkg.toml │ │ │ │ ├── Info.plist │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── assets │ │ │ │ │ ├── BaiduPCS-Go.ico │ │ │ │ │ ├── caution.png │ │ │ │ │ └── donate │ │ │ │ │ │ └── alipay.jpg │ │ │ │ ├── baidupcs │ │ │ │ │ ├── baidupcs.go │ │ │ │ │ ├── cloud_dl.go │ │ │ │ │ ├── cp_mv_rename.go │ │ │ │ │ ├── download.go │ │ │ │ │ ├── error.go │ │ │ │ │ ├── file_directory.go │ │ │ │ │ ├── jsontable.go │ │ │ │ │ ├── prepare.go │ │ │ │ │ ├── quota.go │ │ │ │ │ ├── rm_mkdir.go │ │ │ │ │ ├── upload.go │ │ │ │ │ └── util.go │ │ │ │ ├── build.sh │ │ │ │ ├── build_linux.sh │ │ │ │ ├── debian │ │ │ │ │ ├── Packages.sh │ │ │ │ │ ├── copyright │ │ │ │ │ ├── iphoneos-arm │ │ │ │ │ │ └── control │ │ │ │ │ └── linux-amd64 │ │ │ │ │ │ └── control │ │ │ │ ├── docs │ │ │ │ │ ├── file_data_apis_error.md │ │ │ │ │ ├── file_data_apis_list.md │ │ │ │ │ ├── overview.md │ │ │ │ │ ├── structured_data_api_list.md │ │ │ │ │ ├── structured_data_apis_error.md │ │ │ │ │ └── structured_data_apis_overview.md │ │ │ │ ├── internal0 │ │ │ │ │ ├── pcscommand │ │ │ │ │ │ ├── aria2.go │ │ │ │ │ │ ├── aria2_windows.go │ │ │ │ │ │ ├── cd.go │ │ │ │ │ │ ├── cloud_dl.go │ │ │ │ │ │ ├── conf.go │ │ │ │ │ │ ├── cp_mv.go │ │ │ │ │ │ ├── crypt.go │ │ │ │ │ │ ├── download.go │ │ │ │ │ │ ├── export.go │ │ │ │ │ │ ├── login.go │ │ │ │ │ │ ├── ls.go │ │ │ │ │ │ ├── meta.go │ │ │ │ │ │ ├── pcscommand.go │ │ │ │ │ │ ├── quota.go │ │ │ │ │ │ ├── rm_mkdir.go │ │ │ │ │ │ ├── stat.go │ │ │ │ │ │ ├── tree.go │ │ │ │ │ │ ├── ui.go │ │ │ │ │ │ ├── upload.go │ │ │ │ │ │ └── util.go │ │ │ │ │ ├── pcsconfig │ │ │ │ │ │ ├── baidu.go │ │ │ │ │ │ ├── errors.go │ │ │ │ │ │ ├── export.go │ │ │ │ │ │ ├── maniper.go │ │ │ │ │ │ └── pcsconfig.go │ │ │ │ │ └── pcsweb │ │ │ │ │ │ ├── errors.go │ │ │ │ │ │ ├── middleware.go │ │ │ │ │ │ ├── pcsfile.go │ │ │ │ │ │ ├── pcsweb.go │ │ │ │ │ │ ├── static │ │ │ │ │ │ ├── css │ │ │ │ │ │ │ ├── bootstrap-3.3.7.min.css │ │ │ │ │ │ │ ├── font-awesome-4.7.0.min.css │ │ │ │ │ │ │ └── main.css │ │ │ │ │ │ ├── favicon.ico │ │ │ │ │ │ ├── fonts │ │ │ │ │ │ │ ├── FontAwesome.otf │ │ │ │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ │ │ │ ├── fontawesome-webfont.svg │ │ │ │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ │ │ │ └── fontawesome-webfont.woff2 │ │ │ │ │ │ └── js │ │ │ │ │ │ │ ├── bootstrap-3.3.7.min.js │ │ │ │ │ │ │ ├── jquery-3.2.1.min.js │ │ │ │ │ │ │ └── nano.js │ │ │ │ │ │ ├── template │ │ │ │ │ │ ├── 404.html │ │ │ │ │ │ ├── about.html │ │ │ │ │ │ ├── baidu │ │ │ │ │ │ │ └── userinfo.html │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── template.html │ │ │ │ │ │ └── utils.go │ │ │ │ ├── main.go │ │ │ │ ├── pcscache │ │ │ │ │ ├── dir_cache.go │ │ │ │ │ └── pcscache.go │ │ │ │ ├── pcsinit │ │ │ │ │ └── pcsinit.go │ │ │ │ ├── pcsliner │ │ │ │ │ ├── linehistory.go │ │ │ │ │ └── pcsliner.go │ │ │ │ ├── pcspath │ │ │ │ │ ├── match.go │ │ │ │ │ ├── match_test.go │ │ │ │ │ ├── pcspath.go │ │ │ │ │ ├── regexp.go │ │ │ │ │ ├── util.go │ │ │ │ │ └── util_test.go │ │ │ │ ├── pcstable │ │ │ │ │ └── pcstable.go │ │ │ │ ├── pcsutil │ │ │ │ │ ├── addr.go │ │ │ │ │ ├── converter │ │ │ │ │ │ ├── converter.go │ │ │ │ │ │ └── unsafe_strconv_test.go │ │ │ │ │ ├── crypto.go │ │ │ │ │ ├── error.go │ │ │ │ │ ├── file.go │ │ │ │ │ ├── getip │ │ │ │ │ │ ├── getip.go │ │ │ │ │ │ └── getip_test.go │ │ │ │ │ ├── log_colorable_prefix.go │ │ │ │ │ ├── pcstime │ │ │ │ │ │ └── time.go │ │ │ │ │ ├── pcsutil.go │ │ │ │ │ ├── regexp_pre.go │ │ │ │ │ └── waitgroup │ │ │ │ │ │ ├── wait_group.go │ │ │ │ │ │ └── wait_group_test.go │ │ │ │ ├── pcsverbose │ │ │ │ │ ├── pcsdebug │ │ │ │ │ │ └── cpu.go │ │ │ │ │ ├── pcsverbose.go │ │ │ │ │ └── utils.go │ │ │ │ ├── requester │ │ │ │ │ ├── dial.go │ │ │ │ │ ├── downloader │ │ │ │ │ │ ├── cachepool │ │ │ │ │ │ │ ├── cachepool.go │ │ │ │ │ │ │ └── idcachepool.go │ │ │ │ │ │ ├── config.go │ │ │ │ │ │ ├── download_test.go │ │ │ │ │ │ ├── downloader.go │ │ │ │ │ │ ├── example.go │ │ │ │ │ │ ├── instance_state.go │ │ │ │ │ │ ├── monitor.go │ │ │ │ │ │ ├── range.go │ │ │ │ │ │ ├── status.go │ │ │ │ │ │ ├── utils.go │ │ │ │ │ │ └── worker.go │ │ │ │ │ ├── fetch.go │ │ │ │ │ ├── http_client.go │ │ │ │ │ ├── multipartreader │ │ │ │ │ │ └── multipartreader.go │ │ │ │ │ ├── requester.go │ │ │ │ │ ├── rio │ │ │ │ │ │ ├── file.go │ │ │ │ │ │ ├── multi.go │ │ │ │ │ │ ├── multi_test.go │ │ │ │ │ │ ├── rio.go │ │ │ │ │ │ └── speeds │ │ │ │ │ │ │ └── speeds.go │ │ │ │ │ ├── tcpaddr_cache.go │ │ │ │ │ └── uploader │ │ │ │ │ │ ├── example.go │ │ │ │ │ │ ├── readed.go │ │ │ │ │ │ ├── status.go │ │ │ │ │ │ └── uploader.go │ │ │ │ ├── resource_windows.syso │ │ │ │ ├── vendor │ │ │ │ │ └── github.com │ │ │ │ │ │ ├── GeertJohan │ │ │ │ │ │ └── go.rice │ │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ │ ├── AUTHORS │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── appended.go │ │ │ │ │ │ │ ├── box.go │ │ │ │ │ │ │ ├── config.go │ │ │ │ │ │ │ ├── debug.go │ │ │ │ │ │ │ ├── embedded.go │ │ │ │ │ │ │ ├── embedded │ │ │ │ │ │ │ └── embedded.go │ │ │ │ │ │ │ ├── file.go │ │ │ │ │ │ │ ├── http.go │ │ │ │ │ │ │ ├── sort.go │ │ │ │ │ │ │ ├── virtual.go │ │ │ │ │ │ │ └── walk.go │ │ │ │ │ │ ├── astaxie │ │ │ │ │ │ └── beego │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ ├── session │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── sess_cookie.go │ │ │ │ │ │ │ ├── sess_file.go │ │ │ │ │ │ │ ├── sess_mem.go │ │ │ │ │ │ │ ├── sess_utils.go │ │ │ │ │ │ │ └── session.go │ │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ ├── caller.go │ │ │ │ │ │ │ ├── captcha │ │ │ │ │ │ │ └── LICENSE │ │ │ │ │ │ │ ├── debug.go │ │ │ │ │ │ │ ├── file.go │ │ │ │ │ │ │ ├── mail.go │ │ │ │ │ │ │ ├── rand.go │ │ │ │ │ │ │ ├── safemap.go │ │ │ │ │ │ │ ├── slice.go │ │ │ │ │ │ │ └── utils.go │ │ │ │ │ │ ├── bitly │ │ │ │ │ │ └── go-simplejson │ │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── simplejson.go │ │ │ │ │ │ │ ├── simplejson_go10.go │ │ │ │ │ │ │ └── simplejson_go11.go │ │ │ │ │ │ ├── daaku │ │ │ │ │ │ └── go.zipexe │ │ │ │ │ │ │ ├── license │ │ │ │ │ │ │ ├── readme.md │ │ │ │ │ │ │ └── zipexe.go │ │ │ │ │ │ ├── fatih │ │ │ │ │ │ └── color │ │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ │ ├── LICENSE.md │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── color.go │ │ │ │ │ │ │ └── doc.go │ │ │ │ │ │ ├── iikira │ │ │ │ │ │ ├── Baidu-Login │ │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── bdcrypto │ │ │ │ │ │ │ │ ├── aes.go │ │ │ │ │ │ │ │ ├── archive.go │ │ │ │ │ │ │ │ ├── base64.go │ │ │ │ │ │ │ │ ├── bdcrypto.go │ │ │ │ │ │ │ │ ├── ecb │ │ │ │ │ │ │ │ │ └── ecb.go │ │ │ │ │ │ │ │ ├── hmac.go │ │ │ │ │ │ │ │ ├── reverse.go │ │ │ │ │ │ │ │ └── rsa.go │ │ │ │ │ │ │ ├── config.go │ │ │ │ │ │ │ ├── http_request.go │ │ │ │ │ │ │ ├── http_server.go │ │ │ │ │ │ │ ├── http_server_page.go │ │ │ │ │ │ │ ├── util.go │ │ │ │ │ │ │ └── version.go │ │ │ │ │ │ ├── args │ │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ └── args.go │ │ │ │ │ │ └── baidu-tools │ │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── baidu.go │ │ │ │ │ │ │ ├── randominfo │ │ │ │ │ │ │ ├── phone.go │ │ │ │ │ │ │ ├── phone_table.go │ │ │ │ │ │ │ └── randominfo.go │ │ │ │ │ │ │ ├── tieba │ │ │ │ │ │ │ ├── bar.go │ │ │ │ │ │ │ ├── tieba.go │ │ │ │ │ │ │ ├── tieba_info.go │ │ │ │ │ │ │ ├── tieba_login.go │ │ │ │ │ │ │ ├── tieba_sign.go │ │ │ │ │ │ │ └── tiebautil │ │ │ │ │ │ │ │ └── client_signature.go │ │ │ │ │ │ │ └── version.go │ │ │ │ │ │ ├── json-iterator │ │ │ │ │ │ └── go │ │ │ │ │ │ │ ├── .codecov.yml │ │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ │ ├── Gopkg.lock │ │ │ │ │ │ │ ├── Gopkg.toml │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── adapter.go │ │ │ │ │ │ │ ├── any.go │ │ │ │ │ │ │ ├── any_array.go │ │ │ │ │ │ │ ├── any_bool.go │ │ │ │ │ │ │ ├── any_float.go │ │ │ │ │ │ │ ├── any_int32.go │ │ │ │ │ │ │ ├── any_int64.go │ │ │ │ │ │ │ ├── any_invalid.go │ │ │ │ │ │ │ ├── any_nil.go │ │ │ │ │ │ │ ├── any_number.go │ │ │ │ │ │ │ ├── any_object.go │ │ │ │ │ │ │ ├── any_str.go │ │ │ │ │ │ │ ├── any_uint32.go │ │ │ │ │ │ │ ├── any_uint64.go │ │ │ │ │ │ │ ├── build.sh │ │ │ │ │ │ │ ├── config.go │ │ │ │ │ │ │ ├── fuzzy_mode_convert_table.md │ │ │ │ │ │ │ ├── iter.go │ │ │ │ │ │ │ ├── iter_array.go │ │ │ │ │ │ │ ├── iter_float.go │ │ │ │ │ │ │ ├── iter_int.go │ │ │ │ │ │ │ ├── iter_object.go │ │ │ │ │ │ │ ├── iter_skip.go │ │ │ │ │ │ │ ├── iter_skip_sloppy.go │ │ │ │ │ │ │ ├── iter_skip_strict.go │ │ │ │ │ │ │ ├── iter_str.go │ │ │ │ │ │ │ ├── jsoniter.go │ │ │ │ │ │ │ ├── pool.go │ │ │ │ │ │ │ ├── reflect.go │ │ │ │ │ │ │ ├── reflect_array.go │ │ │ │ │ │ │ ├── reflect_dynamic.go │ │ │ │ │ │ │ ├── reflect_extension.go │ │ │ │ │ │ │ ├── reflect_json_number.go │ │ │ │ │ │ │ ├── reflect_json_raw_message.go │ │ │ │ │ │ │ ├── reflect_map.go │ │ │ │ │ │ │ ├── reflect_marshaler.go │ │ │ │ │ │ │ ├── reflect_native.go │ │ │ │ │ │ │ ├── reflect_optional.go │ │ │ │ │ │ │ ├── reflect_slice.go │ │ │ │ │ │ │ ├── reflect_struct_decoder.go │ │ │ │ │ │ │ ├── reflect_struct_encoder.go │ │ │ │ │ │ │ ├── stream.go │ │ │ │ │ │ │ ├── stream_float.go │ │ │ │ │ │ │ ├── stream_int.go │ │ │ │ │ │ │ ├── stream_str.go │ │ │ │ │ │ │ └── test.sh │ │ │ │ │ │ ├── kardianos │ │ │ │ │ │ └── osext │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── osext.go │ │ │ │ │ │ │ ├── osext_go18.go │ │ │ │ │ │ │ ├── osext_plan9.go │ │ │ │ │ │ │ ├── osext_procfs.go │ │ │ │ │ │ │ ├── osext_sysctl.go │ │ │ │ │ │ │ └── osext_windows.go │ │ │ │ │ │ ├── mattn │ │ │ │ │ │ └── go-runewidth │ │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ ├── README.mkd │ │ │ │ │ │ │ ├── runewidth.go │ │ │ │ │ │ │ ├── runewidth_js.go │ │ │ │ │ │ │ ├── runewidth_posix.go │ │ │ │ │ │ │ └── runewidth_windows.go │ │ │ │ │ │ ├── modern-go │ │ │ │ │ │ ├── concurrent │ │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── executor.go │ │ │ │ │ │ │ ├── go_above_19.go │ │ │ │ │ │ │ ├── go_below_19.go │ │ │ │ │ │ │ ├── log.go │ │ │ │ │ │ │ ├── test.sh │ │ │ │ │ │ │ └── unbounded_executor.go │ │ │ │ │ │ └── reflect2 │ │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ │ ├── Gopkg.lock │ │ │ │ │ │ │ ├── Gopkg.toml │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── go_above_17.go │ │ │ │ │ │ │ ├── go_above_19.go │ │ │ │ │ │ │ ├── go_below_17.go │ │ │ │ │ │ │ ├── go_below_19.go │ │ │ │ │ │ │ ├── reflect2.go │ │ │ │ │ │ │ ├── reflect2_amd64.s │ │ │ │ │ │ │ ├── reflect2_kind.go │ │ │ │ │ │ │ ├── relfect2_386.s │ │ │ │ │ │ │ ├── relfect2_amd64p32.s │ │ │ │ │ │ │ ├── relfect2_arm.s │ │ │ │ │ │ │ ├── relfect2_arm64.s │ │ │ │ │ │ │ ├── relfect2_mips64x.s │ │ │ │ │ │ │ ├── relfect2_mipsx.s │ │ │ │ │ │ │ ├── relfect2_ppc64x.s │ │ │ │ │ │ │ ├── relfect2_s390x.s │ │ │ │ │ │ │ ├── safe_field.go │ │ │ │ │ │ │ ├── safe_map.go │ │ │ │ │ │ │ ├── safe_slice.go │ │ │ │ │ │ │ ├── safe_struct.go │ │ │ │ │ │ │ ├── safe_type.go │ │ │ │ │ │ │ ├── type_map.go │ │ │ │ │ │ │ ├── unsafe_array.go │ │ │ │ │ │ │ ├── unsafe_eface.go │ │ │ │ │ │ │ ├── unsafe_field.go │ │ │ │ │ │ │ ├── unsafe_iface.go │ │ │ │ │ │ │ ├── unsafe_link.go │ │ │ │ │ │ │ ├── unsafe_map.go │ │ │ │ │ │ │ ├── unsafe_ptr.go │ │ │ │ │ │ │ ├── unsafe_slice.go │ │ │ │ │ │ │ ├── unsafe_struct.go │ │ │ │ │ │ │ └── unsafe_type.go │ │ │ │ │ │ ├── olekukonko │ │ │ │ │ │ └── tablewriter │ │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ │ ├── LICENCE.md │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── csv.go │ │ │ │ │ │ │ ├── table.go │ │ │ │ │ │ │ ├── table_with_color.go │ │ │ │ │ │ │ ├── util.go │ │ │ │ │ │ │ └── wrap.go │ │ │ │ │ │ ├── peterh │ │ │ │ │ │ └── liner │ │ │ │ │ │ │ ├── COPYING │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── bsdinput.go │ │ │ │ │ │ │ ├── common.go │ │ │ │ │ │ │ ├── fallbackinput.go │ │ │ │ │ │ │ ├── input.go │ │ │ │ │ │ │ ├── input_darwin.go │ │ │ │ │ │ │ ├── input_linux.go │ │ │ │ │ │ │ ├── input_windows.go │ │ │ │ │ │ │ ├── line.go │ │ │ │ │ │ │ ├── output.go │ │ │ │ │ │ │ ├── output_windows.go │ │ │ │ │ │ │ ├── unixmode.go │ │ │ │ │ │ │ └── width.go │ │ │ │ │ │ ├── shiena │ │ │ │ │ │ └── ansicolor │ │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── ansicolor.go │ │ │ │ │ │ │ ├── ansicolor_ansi.go │ │ │ │ │ │ │ └── ansicolor_windows.go │ │ │ │ │ │ └── urfave │ │ │ │ │ │ └── cli │ │ │ │ │ │ ├── .flake8 │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ ├── CHANGELOG.md │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── app.go │ │ │ │ │ │ ├── appveyor.yml │ │ │ │ │ │ ├── category.go │ │ │ │ │ │ ├── cli.go │ │ │ │ │ │ ├── command.go │ │ │ │ │ │ ├── context.go │ │ │ │ │ │ ├── errors.go │ │ │ │ │ │ ├── flag-types.json │ │ │ │ │ │ ├── flag.go │ │ │ │ │ │ ├── flag_generated.go │ │ │ │ │ │ ├── funcs.go │ │ │ │ │ │ ├── generate-flag-types │ │ │ │ │ │ ├── help.go │ │ │ │ │ │ └── runtests │ │ │ │ └── versioninfo.json │ │ │ ├── args │ │ │ │ ├── .gitignore │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ └── args.go │ │ │ ├── baidu-tools │ │ │ │ ├── .gitignore │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── baidu.go │ │ │ │ ├── ramdominfo │ │ │ │ │ ├── phone.go │ │ │ │ │ ├── phone_table.go │ │ │ │ │ └── randominfo.go │ │ │ │ ├── tieba │ │ │ │ │ ├── bar.go │ │ │ │ │ ├── tieba.go │ │ │ │ │ ├── tieba_info.go │ │ │ │ │ ├── tieba_login.go │ │ │ │ │ ├── tieba_sign.go │ │ │ │ │ └── tiebautil │ │ │ │ │ │ └── client_signature.go │ │ │ │ └── version.go │ │ │ └── osext │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── osext.go │ │ │ │ ├── osext_go18.go │ │ │ │ ├── osext_plan9.go │ │ │ │ ├── osext_procfs.go │ │ │ │ ├── osext_sysctl.go │ │ │ │ └── osext_windows.go │ │ ├── json-iterator │ │ │ └── go │ │ │ │ ├── .codecov.yml │ │ │ │ ├── .gitignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── Gopkg.lock │ │ │ │ ├── Gopkg.toml │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── adapter.go │ │ │ │ ├── any.go │ │ │ │ ├── any_array.go │ │ │ │ ├── any_bool.go │ │ │ │ ├── any_float.go │ │ │ │ ├── any_int32.go │ │ │ │ ├── any_int64.go │ │ │ │ ├── any_invalid.go │ │ │ │ ├── any_nil.go │ │ │ │ ├── any_number.go │ │ │ │ ├── any_object.go │ │ │ │ ├── any_str.go │ │ │ │ ├── any_uint32.go │ │ │ │ ├── any_uint64.go │ │ │ │ ├── build.sh │ │ │ │ ├── config.go │ │ │ │ ├── fuzzy_mode_convert_table.md │ │ │ │ ├── iter.go │ │ │ │ ├── iter_array.go │ │ │ │ ├── iter_float.go │ │ │ │ ├── iter_int.go │ │ │ │ ├── iter_object.go │ │ │ │ ├── iter_skip.go │ │ │ │ ├── iter_skip_sloppy.go │ │ │ │ ├── iter_skip_strict.go │ │ │ │ ├── iter_str.go │ │ │ │ ├── jsoniter.go │ │ │ │ ├── pool.go │ │ │ │ ├── reflect.go │ │ │ │ ├── reflect_array.go │ │ │ │ ├── reflect_dynamic.go │ │ │ │ ├── reflect_extension.go │ │ │ │ ├── reflect_json_number.go │ │ │ │ ├── reflect_json_raw_message.go │ │ │ │ ├── reflect_map.go │ │ │ │ ├── reflect_marshaler.go │ │ │ │ ├── reflect_native.go │ │ │ │ ├── reflect_optional.go │ │ │ │ ├── reflect_slice.go │ │ │ │ ├── reflect_struct_decoder.go │ │ │ │ ├── reflect_struct_encoder.go │ │ │ │ ├── stream.go │ │ │ │ ├── stream_float.go │ │ │ │ ├── stream_int.go │ │ │ │ ├── stream_str.go │ │ │ │ └── test.sh │ │ ├── kardianos │ │ │ └── osext │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── osext.go │ │ │ │ ├── osext_go18.go │ │ │ │ ├── osext_plan9.go │ │ │ │ ├── osext_procfs.go │ │ │ │ ├── osext_sysctl.go │ │ │ │ └── osext_windows.go │ │ ├── mattn │ │ │ └── go-runewidth │ │ │ │ ├── .travis.yml │ │ │ │ ├── LICENSE │ │ │ │ ├── README.mkd │ │ │ │ ├── runewidth.go │ │ │ │ ├── runewidth_js.go │ │ │ │ ├── runewidth_posix.go │ │ │ │ └── runewidth_windows.go │ │ ├── modern-go │ │ │ ├── concurrent │ │ │ │ ├── .gitignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── executor.go │ │ │ │ ├── go_above_19.go │ │ │ │ ├── go_below_19.go │ │ │ │ ├── log.go │ │ │ │ ├── test.sh │ │ │ │ └── unbounded_executor.go │ │ │ └── reflect2 │ │ │ │ ├── .gitignore │ │ │ │ ├── Gopkg.lock │ │ │ │ ├── Gopkg.toml │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── go_above_17.go │ │ │ │ ├── go_above_19.go │ │ │ │ ├── go_below_17.go │ │ │ │ ├── go_below_19.go │ │ │ │ ├── reflect2.go │ │ │ │ ├── reflect2_amd64.s │ │ │ │ ├── reflect2_kind.go │ │ │ │ ├── relfect2_386.s │ │ │ │ ├── relfect2_amd64p32.s │ │ │ │ ├── relfect2_arm.s │ │ │ │ ├── relfect2_arm64.s │ │ │ │ ├── relfect2_mips64x.s │ │ │ │ ├── relfect2_mipsx.s │ │ │ │ ├── relfect2_ppc64x.s │ │ │ │ ├── relfect2_s390x.s │ │ │ │ ├── safe_field.go │ │ │ │ ├── safe_map.go │ │ │ │ ├── safe_slice.go │ │ │ │ ├── safe_struct.go │ │ │ │ ├── safe_type.go │ │ │ │ ├── type_map.go │ │ │ │ ├── unsafe_array.go │ │ │ │ ├── unsafe_eface.go │ │ │ │ ├── unsafe_field.go │ │ │ │ ├── unsafe_iface.go │ │ │ │ ├── unsafe_link.go │ │ │ │ ├── unsafe_map.go │ │ │ │ ├── unsafe_ptr.go │ │ │ │ ├── unsafe_slice.go │ │ │ │ ├── unsafe_struct.go │ │ │ │ └── unsafe_type.go │ │ ├── moul │ │ │ └── http2curl │ │ │ │ ├── LICENSE │ │ │ │ ├── Makefile │ │ │ │ ├── README.md │ │ │ │ └── http2curl.go │ │ ├── olekukonko │ │ │ └── tablewriter │ │ │ │ ├── .travis.yml │ │ │ │ ├── LICENCE.md │ │ │ │ ├── README.md │ │ │ │ ├── csv.go │ │ │ │ ├── table.go │ │ │ │ ├── table_with_color.go │ │ │ │ ├── test.csv │ │ │ │ ├── test_info.csv │ │ │ │ ├── util.go │ │ │ │ └── wrap.go │ │ ├── parnurzeal │ │ │ └── gorequest │ │ │ │ ├── CHANGELOG │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── gorequest.go │ │ │ │ └── logger.go │ │ ├── peterh │ │ │ └── liner │ │ │ │ ├── COPYING │ │ │ │ ├── README.md │ │ │ │ ├── bsdinput.go │ │ │ │ ├── common.go │ │ │ │ ├── fallbackinput.go │ │ │ │ ├── input.go │ │ │ │ ├── input_darwin.go │ │ │ │ ├── input_linux.go │ │ │ │ ├── input_windows.go │ │ │ │ ├── line.go │ │ │ │ ├── output.go │ │ │ │ ├── output_windows.go │ │ │ │ ├── unixmode.go │ │ │ │ └── width.go │ │ ├── pkg │ │ │ └── errors │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── appveyor.yml │ │ │ │ ├── errors.go │ │ │ │ └── stack.go │ │ ├── shiena │ │ │ └── ansicolor │ │ │ │ ├── .gitignore │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── ansicolor.go │ │ │ │ ├── ansicolor_ansi.go │ │ │ │ └── ansicolor_windows.go │ │ ├── urfave │ │ │ └── cli │ │ │ │ ├── .flake8 │ │ │ │ ├── .gitignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── CHANGELOG.md │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── app.go │ │ │ │ ├── appveyor.yml │ │ │ │ ├── category.go │ │ │ │ ├── cli.go │ │ │ │ ├── command.go │ │ │ │ ├── context.go │ │ │ │ ├── errors.go │ │ │ │ ├── flag-types.json │ │ │ │ ├── flag.go │ │ │ │ ├── flag_generated.go │ │ │ │ ├── funcs.go │ │ │ │ ├── generate-flag-types │ │ │ │ ├── help.go │ │ │ │ └── runtests │ │ ├── zserge │ │ │ └── webview │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── appveyor.yml │ │ │ │ ├── webview.go │ │ │ │ ├── webview.h │ │ │ │ └── webview_test.cc │ │ └── zyxar │ │ │ └── argo │ │ │ ├── LICENSE │ │ │ └── rpc │ │ │ ├── README.md │ │ │ ├── call.go │ │ │ ├── client.go │ │ │ ├── const.go │ │ │ ├── notification.go │ │ │ ├── proto.go │ │ │ └── resp.go │ ├── golang.org │ │ └── x │ │ │ ├── net │ │ │ ├── LICENSE │ │ │ ├── PATENTS │ │ │ └── publicsuffix │ │ │ │ ├── gen.go │ │ │ │ ├── list.go │ │ │ │ └── table.go │ │ │ ├── sys │ │ │ ├── LICENSE │ │ │ ├── PATENTS │ │ │ └── windows │ │ │ │ ├── asm_windows_386.s │ │ │ │ ├── asm_windows_amd64.s │ │ │ │ ├── dll_windows.go │ │ │ │ ├── env_unset.go │ │ │ │ ├── env_windows.go │ │ │ │ ├── eventlog.go │ │ │ │ ├── exec_windows.go │ │ │ │ ├── memory_windows.go │ │ │ │ ├── mksyscall.go │ │ │ │ ├── race.go │ │ │ │ ├── race0.go │ │ │ │ ├── registry │ │ │ │ ├── key.go │ │ │ │ ├── mksyscall.go │ │ │ │ ├── syscall.go │ │ │ │ ├── value.go │ │ │ │ └── zsyscall_windows.go │ │ │ │ ├── security_windows.go │ │ │ │ ├── service.go │ │ │ │ ├── str.go │ │ │ │ ├── syscall.go │ │ │ │ ├── syscall_windows.go │ │ │ │ ├── types_windows.go │ │ │ │ ├── types_windows_386.go │ │ │ │ ├── types_windows_amd64.go │ │ │ │ └── zsyscall_windows.go │ │ │ └── text │ │ │ ├── LICENSE │ │ │ ├── PATENTS │ │ │ ├── encoding │ │ │ ├── encoding.go │ │ │ ├── internal │ │ │ │ ├── identifier │ │ │ │ │ ├── gen.go │ │ │ │ │ ├── identifier.go │ │ │ │ │ └── mib.go │ │ │ │ └── internal.go │ │ │ └── simplifiedchinese │ │ │ │ ├── all.go │ │ │ │ ├── gbk.go │ │ │ │ ├── hzgb2312.go │ │ │ │ ├── maketables.go │ │ │ │ └── tables.go │ │ │ └── transform │ │ │ └── transform.go │ └── vendor.json ├── versioninfo.json └── zip.go └── bnd2 ├── .gitignore ├── bnd2 ├── bnd2.exe ├── build.bat ├── command ├── canceltraverse.go ├── cmd.go ├── completedtasks.go ├── counttasks.go ├── delctask.go ├── delctaskall.go ├── deldownload.go ├── deldownloadall.go ├── download.go ├── ls.go ├── pause.go ├── pauseall.go ├── statistic.go ├── tasks.go ├── traverse.go ├── unpause.go └── unpauseall.go ├── electron ├── aria2c_darwin.zip ├── aria2c_windows.zip ├── bnd2 ├── bnd2.exe ├── build │ └── icon.icns ├── index.html ├── main.js ├── package-lock.json ├── package.json ├── renderer.js └── src │ └── utils.js ├── go.mod ├── go.sum ├── log └── logs.go ├── main.go ├── mock ├── mock.json └── status.json ├── react ├── README.md ├── package-lock.json ├── package.json ├── public │ ├── alipay-donate.jpg │ ├── index.html │ ├── logo.png │ └── wechat-donate.jpg └── src │ ├── App.js │ ├── index.js │ ├── pages │ ├── donate.js │ ├── downloading.js │ ├── finished.js │ ├── index.js │ └── welcome.js │ ├── styles │ ├── donate.js │ ├── font.js │ ├── index.js │ ├── list.js │ ├── side.js │ ├── utils.js │ └── welcome.js │ ├── utils.js │ └── withRoot.js └── util ├── aria2.go ├── conf.go ├── crypt.go ├── hacpai.go ├── hidewin.go ├── hidewin_windows.go ├── os.go ├── pcs.go ├── result.go ├── stat.go ├── ws.go └── zip.go /.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.dll 3 | *.so 4 | *.dylib 5 | 6 | # Test binary, build with `go test -c` 7 | *.test 8 | 9 | # Output of the go coverage tool, specifically when used with LiteIDE 10 | *.out 11 | 12 | # Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 13 | .glide/ 14 | 15 | # IDE 16 | .idea/ 17 | -------------------------------------------------------------------------------- /bnd/.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.dll 4 | *.so 5 | *.dylib 6 | bnd 7 | *.exe~ 8 | 9 | # Test binary, build with `go test -c` 10 | *.test 11 | 12 | # Output of the go coverage tool, specifically when used with LiteIDE 13 | *.out 14 | 15 | # Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 16 | .glide/ 17 | 18 | # IDE 19 | .idea/ 20 | 21 | # Baidu PCS Client 22 | pcs_command_history.txt 23 | pcs_config.json 24 | download/ 25 | 26 | # Test Resources 27 | a.js 28 | 29 | -------------------------------------------------------------------------------- /bnd/aria2c.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/aria2c.zip -------------------------------------------------------------------------------- /bnd/bnd.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /bnd/browser.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package main 4 | 5 | import ( 6 | "os/exec" 7 | "runtime" 8 | 9 | "github.com/andlabs/ui" 10 | ) 11 | 12 | func OpenBrowser(win *ui.Window, url string) { 13 | cmd := exec.Command(map[string]string{"darwin": "open", "linux": "xdg-open"}[runtime.GOOS], url) 14 | if err := cmd.Start(); nil != err { 15 | ui.MsgBoxError(win, "错误", "打开浏览器失败,请到论坛反馈问题,感谢!") 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /bnd/browser_windows.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "os/exec" 5 | "syscall" 6 | 7 | "github.com/andlabs/ui" 8 | ) 9 | 10 | func OpenBrowser(win *ui.Window, url string) { 11 | params := []string{"/C", "start", url} 12 | cmd := exec.Command("cmd", params...) 13 | cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true} 14 | if err := cmd.Start(); nil != err { 15 | ui.MsgBoxError(win, "错误", "打开浏览器失败,请到论坛反馈问题,感谢!") 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /bnd/build.bat: -------------------------------------------------------------------------------- 1 | set CGO_ENABLED=1 2 | set CC=D:\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\bin\gcc.exe 3 | set CXX=D:\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\bin\g++.exe 4 | set GOARCH=386 5 | set PATH=%GOROOT%\bin;D:\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\bin;%PATH% 6 | 7 | go build -v -o bnd.exe -ldflags "-s -w -H=windowsgui" 8 | -------------------------------------------------------------------------------- /bnd/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export CGO_ENABLED=1 4 | 5 | go build -o bnd -ldflags "-s -w" -------------------------------------------------------------------------------- /bnd/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/icon.ico -------------------------------------------------------------------------------- /bnd/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/icon.png -------------------------------------------------------------------------------- /bnd/vendor/github.com/GeertJohan/go.rice/.gitignore: -------------------------------------------------------------------------------- 1 | /example/example 2 | /example/example.exe 3 | /rice/rice 4 | /rice/rice.exe 5 | 6 | *.rice-box.go 7 | *.rice-box.syso 8 | .wercker 9 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/GeertJohan/go.rice/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - master 5 | - 1.x.x 6 | - 1.8.x 7 | - 1.7.x 8 | - 1.6.x 9 | - 1.5.x 10 | 11 | install: 12 | - go get -t ./... 13 | - env 14 | - if [ "${TRAVIS_GO_VERSION%.*}" != "1.5" ]; then go get github.com/golang/lint/golint; fi 15 | script: 16 | - go build -x ./... 17 | - go test -cover ./... 18 | - go vet ./... 19 | - if [ "${TRAVIS_GO_VERSION%.*}" != "1.5" ]; then golint .; fi 20 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/GeertJohan/go.rice/AUTHORS: -------------------------------------------------------------------------------- 1 | Geert-Johan Riemer 2 | Paul Maddox 3 | Vincent Petithory 4 | 5 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/GeertJohan/go.rice/debug.go: -------------------------------------------------------------------------------- 1 | package rice 2 | 3 | // Debug can be set to true to enable debugging. 4 | var Debug = false 5 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/GeertJohan/go.rice/http.go: -------------------------------------------------------------------------------- 1 | package rice 2 | 3 | import ( 4 | "net/http" 5 | ) 6 | 7 | // HTTPBox implements http.FileSystem which allows the use of Box with a http.FileServer. 8 | // e.g.: http.Handle("/", http.FileServer(rice.MustFindBox("http-files").HTTPBox())) 9 | type HTTPBox struct { 10 | *Box 11 | } 12 | 13 | // HTTPBox creates a new HTTPBox from an existing Box 14 | func (b *Box) HTTPBox() *HTTPBox { 15 | return &HTTPBox{b} 16 | } 17 | 18 | // Open returns a File using the http.File interface 19 | func (hb *HTTPBox) Open(name string) (http.File, error) { 20 | return hb.Box.Open(name) 21 | } 22 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/GeertJohan/go.rice/sort.go: -------------------------------------------------------------------------------- 1 | package rice 2 | 3 | import "os" 4 | 5 | // SortByName allows an array of os.FileInfo objects 6 | // to be easily sorted by filename using sort.Sort(SortByName(array)) 7 | type SortByName []os.FileInfo 8 | 9 | func (f SortByName) Len() int { return len(f) } 10 | func (f SortByName) Less(i, j int) bool { return f[i].Name() < f[j].Name() } 11 | func (f SortByName) Swap(i, j int) { f[i], f[j] = f[j], f[i] } 12 | 13 | // SortByModified allows an array of os.FileInfo objects 14 | // to be easily sorted by modified date using sort.Sort(SortByModified(array)) 15 | type SortByModified []os.FileInfo 16 | 17 | func (f SortByModified) Len() int { return len(f) } 18 | func (f SortByModified) Less(i, j int) bool { return f[i].ModTime().Unix() > f[j].ModTime().Unix() } 19 | func (f SortByModified) Swap(i, j int) { f[i], f[j] = f[j], f[i] } 20 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/andlabs/ui/TODO.md: -------------------------------------------------------------------------------- 1 | - document that Destroy cannot be called on Controls that have a parent 2 | - identify earliest tag for https://github.com/golang/go/commit/dba926d7a37bd6b3d740c132e8d6346214b6355c 3 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/andlabs/ui/bindTODO: -------------------------------------------------------------------------------- 1 | uiFontButton 2 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/andlabs/ui/dummy_windows.cpp: -------------------------------------------------------------------------------- 1 | // 5 june 2016 2 | // This file is only present to force cgo to use the C++ linker instead of the C linker on Windows. 3 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/andlabs/ui/fontbutton.go: -------------------------------------------------------------------------------- 1 | // 20 april 2016 2 | package ui 3 | 4 | // TODO 5 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/andlabs/ui/libui_darwin_amd64.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/andlabs/ui/libui_darwin_amd64.a -------------------------------------------------------------------------------- /bnd/vendor/github.com/andlabs/ui/libui_linux_386.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/andlabs/ui/libui_linux_386.a -------------------------------------------------------------------------------- /bnd/vendor/github.com/andlabs/ui/libui_linux_amd64.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/andlabs/ui/libui_linux_amd64.a -------------------------------------------------------------------------------- /bnd/vendor/github.com/andlabs/ui/libui_windows_386.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/andlabs/ui/libui_windows_386.a -------------------------------------------------------------------------------- /bnd/vendor/github.com/andlabs/ui/libui_windows_386.res.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/andlabs/ui/libui_windows_386.res.o -------------------------------------------------------------------------------- /bnd/vendor/github.com/andlabs/ui/libui_windows_amd64.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/andlabs/ui/libui_windows_amd64.a -------------------------------------------------------------------------------- /bnd/vendor/github.com/andlabs/ui/libui_windows_amd64.res.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/andlabs/ui/libui_windows_amd64.res.o -------------------------------------------------------------------------------- /bnd/vendor/github.com/andlabs/ui/link_linux_386.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | // +build !darwin 3 | 4 | // 11 december 2015 5 | 6 | package ui 7 | 8 | // #cgo LDFLAGS: ${SRCDIR}/libui_linux_386.a -lm -ldl 9 | // #cgo pkg-config: gtk+-3.0 10 | import "C" 11 | 12 | func ensureMainThread() { 13 | // do nothing; GTK+ doesn't care which thread we're on so long as we don't change it after starting 14 | } 15 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/andlabs/ui/link_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | // +build !darwin 3 | 4 | // 11 december 2015 5 | 6 | package ui 7 | 8 | // #cgo LDFLAGS: ${SRCDIR}/libui_linux_amd64.a -lm -ldl 9 | // #cgo pkg-config: gtk+-3.0 10 | import "C" 11 | 12 | func ensureMainThread() { 13 | // do nothing; GTK+ doesn't care which thread we're on so long as we don't change it after starting 14 | } 15 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/andlabs/ui/link_windows_386.go: -------------------------------------------------------------------------------- 1 | // 13 december 2015 2 | 3 | package ui 4 | 5 | // #cgo LDFLAGS: ${SRCDIR}/libui_windows_386.a ${SRCDIR}/libui_windows_386.res.o 6 | // /* note the order; also note the lack of uuid */ 7 | // #cgo LDFLAGS: -luser32 -lkernel32 -lusp10 -lgdi32 -lcomctl32 -luxtheme -lmsimg32 -lcomdlg32 -ld2d1 -ldwrite -lole32 -loleaut32 -loleacc -static -static-libgcc -static-libstdc++ 8 | import "C" 9 | 10 | func ensureMainThread() { 11 | // do nothing; Windows doesn't care which thread we're on so long as we don't change it after starting 12 | } 13 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/andlabs/ui/link_windows_amd64.go: -------------------------------------------------------------------------------- 1 | // 13 december 2015 2 | 3 | package ui 4 | 5 | // #cgo LDFLAGS: ${SRCDIR}/libui_windows_amd64.a ${SRCDIR}/libui_windows_amd64.res.o 6 | // /* note the order; also note the lack of uuid */ 7 | // #cgo LDFLAGS: -luser32 -lkernel32 -lusp10 -lgdi32 -lcomctl32 -luxtheme -lmsimg32 -lcomdlg32 -ld2d1 -ldwrite -lole32 -loleaut32 -loleacc -static -static-libgcc -static-libstdc++ 8 | import "C" 9 | 10 | func ensureMainThread() { 11 | // do nothing; Windows doesn't care which thread we're on so long as we don't change it after starting 12 | } 13 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/andlabs/ui/static.rc: -------------------------------------------------------------------------------- 1 | /* 5 june 2016 */ 2 | #pragma code_page(65001) 3 | 1 24 "static.manifest" 4 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/andlabs/ui/static_windows_386.syso: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/andlabs/ui/static_windows_386.syso -------------------------------------------------------------------------------- /bnd/vendor/github.com/andlabs/ui/static_windows_amd64.syso: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/andlabs/ui/static_windows_amd64.syso -------------------------------------------------------------------------------- /bnd/vendor/github.com/andlabs/ui/stddialogs.go: -------------------------------------------------------------------------------- 1 | // 20 december 2015 2 | 3 | package ui 4 | 5 | // #include "ui.h" 6 | import "C" 7 | 8 | // TODO 9 | func MsgBoxError(w *Window, title string, description string) { 10 | ctitle := C.CString(title) 11 | defer freestr(ctitle) 12 | cdescription := C.CString(description) 13 | defer freestr(cdescription) 14 | C.uiMsgBoxError(w.w, ctitle, cdescription) 15 | } 16 | 17 | func OpenFile(w *Window) string { 18 | cname := C.uiOpenFile(w.w) 19 | if cname == nil { 20 | return "" 21 | } 22 | defer C.uiFreeText(cname) 23 | return C.GoString(cname) 24 | } 25 | 26 | func SaveFile(w *Window) string { 27 | cname := C.uiSaveFile(w.w) 28 | if cname == nil { 29 | return "" 30 | } 31 | defer C.uiFreeText(cname) 32 | return C.GoString(cname) 33 | } 34 | 35 | func MsgBox(w *Window, title string, description string) { 36 | ctitle := C.CString(title) 37 | defer freestr(ctitle) 38 | cdescription := C.CString(description) 39 | defer freestr(cdescription) 40 | C.uiMsgBox(w.w, ctitle, cdescription) 41 | } 42 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/astaxie/beego/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2014 astaxie 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /bnd/vendor/github.com/astaxie/beego/utils/caller.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 beego Author. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package utils 16 | 17 | import ( 18 | "reflect" 19 | "runtime" 20 | ) 21 | 22 | // GetFuncName get function name 23 | func GetFuncName(i interface{}) string { 24 | return runtime.FuncForPC(reflect.ValueOf(i).Pointer()).Name() 25 | } 26 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/astaxie/beego/utils/utils.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "os" 5 | "path/filepath" 6 | "runtime" 7 | "strings" 8 | ) 9 | 10 | // GetGOPATHs returns all paths in GOPATH variable. 11 | func GetGOPATHs() []string { 12 | gopath := os.Getenv("GOPATH") 13 | if gopath == "" && strings.Compare(runtime.Version(), "go1.8") >= 0 { 14 | gopath = defaultGOPATH() 15 | } 16 | return filepath.SplitList(gopath) 17 | } 18 | 19 | func defaultGOPATH() string { 20 | env := "HOME" 21 | if runtime.GOOS == "windows" { 22 | env = "USERPROFILE" 23 | } else if runtime.GOOS == "plan9" { 24 | env = "home" 25 | } 26 | if home := os.Getenv(env); home != "" { 27 | return filepath.Join(home, "go") 28 | } 29 | return "" 30 | } 31 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/bitly/go-simplejson/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.0.3 4 | - 1.1.2 5 | - 1.2 6 | - tip 7 | install: 8 | - go get github.com/bmizerany/assert 9 | notifications: 10 | email: false 11 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/bitly/go-simplejson/LICENSE: -------------------------------------------------------------------------------- 1 | Permission is hereby granted, free of charge, to any person obtaining a copy 2 | of this software and associated documentation files (the "Software"), to deal 3 | in the Software without restriction, including without limitation the rights 4 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 5 | copies of the Software, and to permit persons to whom the Software is 6 | furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in 9 | all copies or substantial portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 14 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 15 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 17 | THE SOFTWARE. 18 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/bitly/go-simplejson/README.md: -------------------------------------------------------------------------------- 1 | ### go-simplejson 2 | 3 | a Go package to interact with arbitrary JSON 4 | 5 | [![Build Status](https://secure.travis-ci.org/bitly/go-simplejson.png)](http://travis-ci.org/bitly/go-simplejson) 6 | 7 | ### Importing 8 | 9 | import github.com/bitly/go-simplejson 10 | 11 | ### Documentation 12 | 13 | Visit the docs on [gopkgdoc](http://godoc.org/github.com/bitly/go-simplejson) 14 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/corpix/uarand/README.md: -------------------------------------------------------------------------------- 1 | uarand 2 | ---------------- 3 | 4 | [![Build Status](https://travis-ci.org/corpix/uarand.svg?branch=master)](https://travis-ci.org/corpix/uarand) 5 | 6 | Random user-agent producer for go. 7 | 8 | ## Example 9 | 10 | ``` go 11 | package main 12 | 13 | import ( 14 | "fmt" 15 | 16 | "github.com/corpix/uarand" 17 | ) 18 | 19 | func main() { 20 | fmt.Println(uarand.GetRandom()) 21 | } 22 | ``` 23 | 24 | Save it to `snippet.go` and run: 25 | 26 | ``` shell 27 | go run snippet.go 28 | ``` 29 | 30 | Which should produce something similar to: 31 | 32 | ``` text 33 | Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.0 Safari/537.36 34 | ``` 35 | 36 | ## License 37 | 38 | MIT 39 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/corpix/uarand/glide.lock: -------------------------------------------------------------------------------- 1 | hash: 400dee10adae21284f2563cb7178f4b5a30e69c9ed3954a5a32a8a618d5bdfeb 2 | updated: 2017-07-12T21:00:19.452016303Z 3 | imports: [] 4 | testImports: 5 | - name: github.com/davecgh/go-spew 6 | version: 6d212800a42e8ab5c146b8ace3490ee17e5225f9 7 | subpackages: 8 | - spew 9 | - name: github.com/pmezard/go-difflib 10 | version: d8ed2627bdf02c080bf22230dbb337003b7aba2d 11 | subpackages: 12 | - difflib 13 | - name: github.com/stretchr/testify 14 | version: 69483b4bd14f5845b5a1e55bca19e954e827f1d0 15 | subpackages: 16 | - assert 17 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/corpix/uarand/glide.yaml: -------------------------------------------------------------------------------- 1 | package: github.com/corpix/uarand 2 | import: [] 3 | testImport: 4 | - package: github.com/stretchr/testify 5 | version: v1.1.4 6 | subpackages: 7 | - assert 8 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/corpix/uarand/uarand.go: -------------------------------------------------------------------------------- 1 | package uarand 2 | 3 | import ( 4 | "math/rand" 5 | "time" 6 | ) 7 | 8 | var ( 9 | // Default is the UARand with default settings. 10 | Default = New( 11 | rand.New( 12 | rand.NewSource(time.Now().UnixNano()), 13 | ), 14 | ) 15 | ) 16 | 17 | // Randomizer represents some entity which could provide us an entropy. 18 | type Randomizer interface { 19 | Seed(n int64) 20 | Intn(n int) int 21 | } 22 | 23 | // UARand describes the user agent randomizer settings. 24 | type UARand struct { 25 | Randomizer 26 | } 27 | 28 | // GetRandom returns a random user agent from UserAgents slice. 29 | func (u *UARand) GetRandom() string { 30 | return UserAgents[u.Intn(len(UserAgents))] 31 | } 32 | 33 | // GetRandom returns a random user agent from UserAgents slice. 34 | // This version is driven by Default configuration. 35 | func GetRandom() string { 36 | return Default.GetRandom() 37 | } 38 | 39 | func New(r Randomizer) *UARand { 40 | return &UARand{r} 41 | } 42 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/corpix/uarand/useragents.mk: -------------------------------------------------------------------------------- 1 | .PHONY: useragents.go 2 | useragents.go: 3 | curl -Ls -H'User-Agent: gotohellwithyour403' \ 4 | http://techpatterns.com/downloads/firefox/useragentswitcher.xml \ 5 | | ./scripts/extract-user-agents \ 6 | | ./scripts/generate-useragents-go $(name) \ 7 | > $@ 8 | go fmt $@ 9 | 10 | dependencies:: useragents.go 11 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/daaku/go.zipexe/readme.md: -------------------------------------------------------------------------------- 1 | go.zipexe 2 | ========= 3 | 4 | This module was taken as-is from https://github.com/cookieo9/resources-go. 5 | Documentation: https://godoc.org/github.com/daaku/go.zipexe 6 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/denisbrodbeck/machineid/helper.go: -------------------------------------------------------------------------------- 1 | package machineid 2 | 3 | import ( 4 | "crypto/hmac" 5 | "crypto/sha256" 6 | "encoding/hex" 7 | "io" 8 | "io/ioutil" 9 | "os" 10 | "os/exec" 11 | "strings" 12 | ) 13 | 14 | // run wraps `exec.Command` with easy access to stdout and stderr. 15 | func run(stdout, stderr io.Writer, cmd string, args ...string) error { 16 | c := exec.Command(cmd, args...) 17 | c.Stdin = os.Stdin 18 | c.Stdout = stdout 19 | c.Stderr = stderr 20 | return c.Run() 21 | } 22 | 23 | // protect calculates HMAC-SHA256 of the application ID, keyed by the machine ID and returns a hex-encoded string. 24 | func protect(appID, id string) string { 25 | mac := hmac.New(sha256.New, []byte(id)) 26 | mac.Write([]byte(appID)) 27 | return hex.EncodeToString(mac.Sum(nil)) 28 | } 29 | 30 | func readFile(filename string) ([]byte, error) { 31 | return ioutil.ReadFile(filename) 32 | } 33 | 34 | func trim(s string) string { 35 | return strings.TrimSpace(strings.Trim(s, "\n")) 36 | } 37 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/denisbrodbeck/machineid/id_bsd.go: -------------------------------------------------------------------------------- 1 | // +build freebsd netbsd openbsd 2 | 3 | package machineid 4 | 5 | import ( 6 | "bytes" 7 | "os" 8 | ) 9 | 10 | const hostidPath = "/etc/hostid" 11 | 12 | // machineID returns the uuid specified at `/etc/hostid`. 13 | // If the returned value is empty, the uuid from a call to `kenv -q smbios.system.uuid` is returned. 14 | // If there is an error an empty string is returned. 15 | func machineID() (string, error) { 16 | id, err := readHostid() 17 | if err != nil { 18 | // try fallback 19 | id, err = readKenv() 20 | } 21 | if err != nil { 22 | return "", err 23 | } 24 | return id, nil 25 | } 26 | 27 | func readHostid() (string, error) { 28 | buf, err := readFile(hostidPath) 29 | if err != nil { 30 | return "", err 31 | } 32 | return trim(string(buf)), nil 33 | } 34 | 35 | func readKenv() (string, error) { 36 | buf := &bytes.Buffer{} 37 | err := run(buf, os.Stderr, "kenv", "-q", "smbios.system.uuid") 38 | if err != nil { 39 | return "", err 40 | } 41 | return trim(buf.String()), nil 42 | } 43 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/denisbrodbeck/machineid/id_darwin.go: -------------------------------------------------------------------------------- 1 | // +build darwin 2 | 3 | package machineid 4 | 5 | import ( 6 | "bytes" 7 | "fmt" 8 | "os" 9 | "strings" 10 | ) 11 | 12 | // machineID returns the uuid returned by `ioreg -rd1 -c IOPlatformExpertDevice`. 13 | // If there is an error running the commad an empty string is returned. 14 | func machineID() (string, error) { 15 | buf := &bytes.Buffer{} 16 | err := run(buf, os.Stderr, "ioreg", "-rd1", "-c", "IOPlatformExpertDevice") 17 | if err != nil { 18 | return "", err 19 | } 20 | id, err := extractID(buf.String()) 21 | if err != nil { 22 | return "", err 23 | } 24 | return trim(id), nil 25 | } 26 | 27 | func extractID(lines string) (string, error) { 28 | for _, line := range strings.Split(lines, "\n") { 29 | if strings.Contains(line, "IOPlatformUUID") { 30 | parts := strings.SplitAfter(line, `" = "`) 31 | if len(parts) == 2 { 32 | return strings.TrimRight(parts[1], `"`), nil 33 | } 34 | } 35 | } 36 | return "", fmt.Errorf("Failed to extract 'IOPlatformUUID' value from `ioreg` output.\n%s", lines) 37 | } 38 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/denisbrodbeck/machineid/id_linux.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | 3 | package machineid 4 | 5 | const ( 6 | // dbusPath is the default path for dbus machine id. 7 | dbusPath = "/var/lib/dbus/machine-id" 8 | // dbusPathEtc is the default path for dbus machine id located in /etc. 9 | // Some systems (like Fedora 20) only know this path. 10 | // Sometimes it's the other way round. 11 | dbusPathEtc = "/etc/machine-id" 12 | ) 13 | 14 | // machineID returns the uuid specified at `/var/lib/dbus/machine-id` or `/etc/machine-id`. 15 | // If there is an error reading the files an empty string is returned. 16 | // See https://unix.stackexchange.com/questions/144812/generate-consistent-machine-unique-id 17 | func machineID() (string, error) { 18 | id, err := readFile(dbusPath) 19 | if err != nil { 20 | // try fallback path 21 | id, err = readFile(dbusPathEtc) 22 | } 23 | if err != nil { 24 | return "", err 25 | } 26 | return trim(string(id)), nil 27 | } 28 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/denisbrodbeck/machineid/id_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package machineid 4 | 5 | import ( 6 | "golang.org/x/sys/windows/registry" 7 | ) 8 | 9 | // machineID returns the key MachineGuid in registry `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography`. 10 | // If there is an error running the commad an empty string is returned. 11 | func machineID() (string, error) { 12 | k, err := registry.OpenKey(registry.LOCAL_MACHINE, `SOFTWARE\Microsoft\Cryptography`, registry.QUERY_VALUE|registry.WOW64_64KEY) 13 | if err != nil { 14 | return "", err 15 | } 16 | defer k.Close() 17 | 18 | s, _, err := k.GetStringValue("MachineGuid") 19 | if err != nil { 20 | return "", err 21 | } 22 | return s, nil 23 | } 24 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/denisbrodbeck/machineid/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/denisbrodbeck/machineid/logo.png -------------------------------------------------------------------------------- /bnd/vendor/github.com/denisbrodbeck/machineid/makefile: -------------------------------------------------------------------------------- 1 | .PHONY: build clean default test 2 | 3 | build: clean 4 | @go build -o machineid ./cmd/machineid/main.go 5 | 6 | clean: 7 | @rm -rf ./machineid 8 | 9 | test: 10 | go test ./... 11 | 12 | default: build 13 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/elazarl/goproxy/all.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | go test || exit 4 | for action in $@; do go $action; done 5 | 6 | mkdir -p bin 7 | find regretable examples/* ext/* -maxdepth 0 -type d | while read d; do 8 | (cd $d 9 | go build -o ../../bin/$(basename $d) 10 | find *_test.go -maxdepth 0 2>/dev/null|while read f;do 11 | for action in $@; do go $action; done 12 | go test 13 | break 14 | done) 15 | done 16 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/fatih/color/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 1.3 3 | 4 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/gorilla/rpc/v2/README.md: -------------------------------------------------------------------------------- 1 | rpc 2 | === 3 | 4 | gorilla/rpc is a foundation for RPC over HTTP services, providing access to the exported methods of an object through HTTP requests. 5 | 6 | Read the full documentation here: http://www.gorillatoolkit.org/pkg/rpc 7 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/gorilla/websocket/AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of Gorilla WebSocket authors for copyright 2 | # purposes. 3 | # 4 | # Please keep the list sorted. 5 | 6 | Gary Burd 7 | Joachim Bauch 8 | 9 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/Baidu-Login/.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.dll 4 | *.so 5 | *.dylib 6 | cmd/Baidu-Login/Baidu-Login 7 | 8 | # Test binary, build with `go test -c` 9 | *.test 10 | 11 | # Output of the go coverage tool, specifically when used with LiteIDE 12 | *.out 13 | 14 | # Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 15 | .glide/ 16 | 17 | # others 18 | .DS_Store 19 | test/ 20 | out/ 21 | upx.log 22 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/Baidu-Login/bdcrypto/base64.go: -------------------------------------------------------------------------------- 1 | package bdcrypto 2 | 3 | import ( 4 | "bytes" 5 | "encoding/base64" 6 | "io/ioutil" 7 | ) 8 | 9 | // Base64Encode base64加密 10 | func Base64Encode(raw []byte) []byte { 11 | var encoded bytes.Buffer 12 | encoder := base64.NewEncoder(base64.StdEncoding, &encoded) 13 | encoder.Write(raw) 14 | encoder.Close() 15 | return encoded.Bytes() 16 | } 17 | 18 | // Base64Decode base64解密 19 | func Base64Decode(raw []byte) []byte { 20 | var buf bytes.Buffer 21 | buf.Write(raw) 22 | decoder := base64.NewDecoder(base64.StdEncoding, &buf) 23 | decoded, _ := ioutil.ReadAll(decoder) 24 | return decoded 25 | } 26 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/Baidu-Login/bdcrypto/bdcrypto.go: -------------------------------------------------------------------------------- 1 | package bdcrypto 2 | 3 | import ( 4 | "encoding/hex" 5 | ) 6 | 7 | // RSAEncryptOfWapBaidu 针对 WAP 登录百度的 RSA 加密 8 | func RSAEncryptOfWapBaidu(rsaPublicKeyModulus string, origData []byte) (string, error) { 9 | ciphertext, err := RSAEncryptNoPadding(rsaPublicKeyModulus, DefaultRSAPublicKeyExponent, BytesReverse(origData)) 10 | if err != nil { 11 | return "", err 12 | } 13 | 14 | return hex.EncodeToString(ciphertext), nil 15 | } 16 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/Baidu-Login/bdcrypto/hmac.go: -------------------------------------------------------------------------------- 1 | package bdcrypto 2 | 3 | import ( 4 | "crypto/hmac" 5 | "crypto/md5" 6 | "crypto/sha1" 7 | "crypto/sha256" 8 | "crypto/sha512" 9 | ) 10 | 11 | // HmacSHA1 HMAC-SHA-1签名认证 12 | func HmacSHA1(key, origData []byte) (sum []byte) { 13 | mac := hmac.New(sha1.New, key) 14 | mac.Write(origData) 15 | return mac.Sum(nil) 16 | } 17 | 18 | // HmacSHA256 HMAC-SHA-256签名认证 19 | func HmacSHA256(key, origData []byte) (sum []byte) { 20 | mac := hmac.New(sha256.New, key) 21 | mac.Write(origData) 22 | return mac.Sum(nil) 23 | } 24 | 25 | // HmacSHA512 HMAC-SHA-512签名认证 26 | func HmacSHA512(key, origData []byte) (sum []byte) { 27 | mac := hmac.New(sha512.New, key) 28 | mac.Write(origData) 29 | return mac.Sum(nil) 30 | } 31 | 32 | // HmacMD5 HMAC-SHA512-签名认证 33 | func HmacMD5(key, origData []byte) (sum []byte) { 34 | mac := hmac.New(md5.New, key) 35 | mac.Write(origData) 36 | return mac.Sum(nil) 37 | } 38 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/Baidu-Login/bdcrypto/reverse.go: -------------------------------------------------------------------------------- 1 | package bdcrypto 2 | 3 | import ( 4 | "unsafe" 5 | ) 6 | 7 | // BytesReverse 反转字节数组, 此操作会修改原值 8 | func BytesReverse(b []byte) []byte { 9 | length := len(b) 10 | for i := 0; i < length/2; i++ { 11 | b[i], b[length-i-1] = b[length-i-1], b[i] 12 | } 13 | return b 14 | } 15 | 16 | // StringReverse 反转字符串, 此操作不会修改原值 17 | func StringReverse(s string) string { 18 | newBytes := make([]byte, len(s)) 19 | copy(newBytes, s) 20 | b := BytesReverse(newBytes) 21 | return *(*string)(unsafe.Pointer(&b)) 22 | } 23 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/Baidu-Login/config.go: -------------------------------------------------------------------------------- 1 | package baidulogin 2 | 3 | import ( 4 | "github.com/GeertJohan/go.rice" 5 | "github.com/astaxie/beego/session" 6 | ) 7 | 8 | var ( 9 | templateFilesBox *rice.Box 10 | libFilesBox *rice.Box 11 | 12 | globalSessions *session.Manager // 全局 sessions 管理器 13 | ) 14 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/Baidu-Login/http_server_page.go: -------------------------------------------------------------------------------- 1 | package baidulogin 2 | 3 | import ( 4 | "log" 5 | "net/http" 6 | "text/template" 7 | ) 8 | 9 | func indexPage(w http.ResponseWriter, r *http.Request) { 10 | sess, _ := globalSessions.SessionStart(w, r) // session start 11 | registerBaiduClient(&sess) // 如果没有 baiduClient , 就添加 12 | 13 | // get file contents as string 14 | contents, err := templateFilesBox.String("index.html") 15 | if err != nil { 16 | log.Println(err) 17 | return 18 | } 19 | tmpl, err := template.New("index.html").Parse(contents) 20 | if err != nil { 21 | panic(err) 22 | } 23 | 24 | err = tmpl.Execute(w, Version) 25 | if err != nil { 26 | panic(err) 27 | } 28 | } 29 | 30 | func favicon(w http.ResponseWriter, r *http.Request) { 31 | w.Header().Set("Location", "//www.baidu.com/favicon.ico") 32 | http.Error(w, "", 302) 33 | } 34 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/Baidu-Login/version.go: -------------------------------------------------------------------------------- 1 | package baidulogin 2 | 3 | const ( 4 | // Version 版本号 5 | Version = "v1.2.1" 6 | ) 7 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/.github/RELEASE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | # 更新日志: 2 | 3 | 1. 支持启用https访问资源, 提升安全性; 4 | 2. 支持tab补齐网盘路径; 5 | 3. 支持将下载的文件直接保存到指定的目录; 6 | 4. 重构了下载器和程序配置包代码, 优化大部分组件的代码结构, 应该可以提升稳定性; 7 | 5. emm.. 8 | 9 | 个人项目bug在所难免! 欢迎提 issue 和 pull request!!. 10 | 11 | # 下载说明 12 | 13 | ## 解释 CPU架构 14 | 15 | |amd|arm| mips| 说明 | 16 | |-----|----------------|------------------|------------------| 17 | |amd64, x64 |arm64 | mips64, mips64le |适用于64位CPU或操作系统的计算机| 18 | |386, x86 |armv5, armv7 | mips, mipsle |适用于32位CPU或操作系统的计算机| 19 | 20 | ## 注意区别 `arm` 和 `amd`, 不要搞错了!!!! 21 | 22 | ## 下载 23 | 24 | * PC/电脑: 25 | 请选择对应的系统 (windows, linux, darwin(苹果系统), freebsd), 对应的CPU架构 (一般情况下是 amd), 对应的CPU或操作系统位数 (详见上表), 下载. 26 | 27 | * 移动设备: 28 | 请选择对应的系统(android, darwin(ios系统)), 对应的CPU架构 (一般情况下是 arm, 除了少数手机的CPU架构要选 amd, 例如联想K800, 联想K900等), 对应的CPU或操作系统位数 (详见上表), 下载. 29 | 30 | * mips: 31 | 请选择对应的CPU架构, 对应的CPU或操作系统位数 (详见上表), 下载. 32 | 需要启用fpu才可以正常运行程序, 否则可能会出现 `Illegal instruction` 错误. 33 | 34 | ## 注意 35 | 36 | 相关的关键词, 均能在文件名中找到. 37 | 38 | 文件格式均为zip压缩包格式, 切勿未解压程序就直接运行!! 程序解压之后才可以正常使用. 39 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.dll 4 | *.so 5 | *.dylib 6 | BaiduPCS-Go 7 | 8 | # Test binary, build with `go test -c` 9 | *.test 10 | 11 | # Output of the go coverage tool, specifically when used with LiteIDE 12 | *.out 13 | out/ 14 | *.dl 15 | 16 | # Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 17 | .glide/ 18 | 19 | # Others 20 | .DS_Store 21 | *.proc 22 | *.txt 23 | *.log 24 | captcha.png 25 | pcs_config.json 26 | test/ 27 | download/ 28 | *-downloading 29 | 30 | # GoLand 31 | .idea/ -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/BaiduPCS-Go.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | true 12 | 13 | 14 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleName 6 | BaiduPCS-Go 7 | CFBundleSupportedPlatforms 8 | 9 | iPhoneOS 10 | 11 | CFBundleExecutable 12 | BaiduPCS-Go 13 | CFBundleVersion 14 | 1.0 15 | CFBundleIdentifier 16 | com.iikira.baidupcsgo 17 | LSRequiresIPhoneOS 18 | 19 | CFBundleDisplayName 20 | BaiduPCS-Go 21 | 22 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/assets/BaiduPCS-Go.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/iikira/BaiduPCS-Go/assets/BaiduPCS-Go.ico -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/assets/caution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/iikira/BaiduPCS-Go/assets/caution.png -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/assets/donate/alipay.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/iikira/BaiduPCS-Go/assets/donate/alipay.jpg -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/baidupcs/cp_mv_rename.go: -------------------------------------------------------------------------------- 1 | package baidupcs 2 | 3 | // Rename 重命名文件/目录 4 | func (pcs *BaiduPCS) Rename(from, to string) (pcsError Error) { 5 | return pcs.cpmvOp(OperationRename, &CpMvJSON{ 6 | From: from, 7 | To: to, 8 | }) 9 | } 10 | 11 | // Copy 批量拷贝文件/目录 12 | func (pcs *BaiduPCS) Copy(cpmvJSON ...*CpMvJSON) (pcsError Error) { 13 | return pcs.cpmvOp(OperationCopy, cpmvJSON...) 14 | } 15 | 16 | // Move 批量移动文件/目录 17 | func (pcs *BaiduPCS) Move(cpmvJSON ...*CpMvJSON) (pcsError Error) { 18 | return pcs.cpmvOp(OperationMove, cpmvJSON...) 19 | } 20 | 21 | func (pcs *BaiduPCS) cpmvOp(op string, cpmvJSON ...*CpMvJSON) (pcsError Error) { 22 | dataReadCloser, err := pcs.prepareCpMvOp(op, cpmvJSON...) 23 | if err != nil { 24 | return 25 | } 26 | 27 | defer dataReadCloser.Close() 28 | 29 | errInfo := decodeJSONError(op, dataReadCloser) 30 | return errInfo 31 | } 32 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/baidupcs/download.go: -------------------------------------------------------------------------------- 1 | package baidupcs 2 | 3 | import ( 4 | "net/http/cookiejar" 5 | ) 6 | 7 | // DownloadFunc 下载文件处理函数 8 | type DownloadFunc func(downloadURL string, jar *cookiejar.Jar) (speed int64, err error) 9 | 10 | // DownloadFile 下载单个文件 11 | func (pcs *BaiduPCS) DownloadFile(path string, downloadFunc DownloadFunc) (speed int64, err error) { 12 | pcs.lazyInit() 13 | pcsURL := pcs.generatePCSURL("file", "download", map[string]string{ 14 | "path": path, 15 | }) 16 | baiduPCSVerbose.Infof("%s URL: %s\n", OperationDownloadFile, pcsURL) 17 | 18 | return downloadFunc(pcsURL.String(), pcs.client.Jar.(*cookiejar.Jar)) 19 | } 20 | 21 | // DownloadStreamFile 下载流式文件 22 | func (pcs *BaiduPCS) DownloadStreamFile(path string, downloadFunc DownloadFunc) (speed int64, err error) { 23 | pcs.lazyInit() 24 | pcsURL := pcs.generatePCSURL("stream", "download", map[string]string{ 25 | "path": path, 26 | }) 27 | baiduPCSVerbose.Infof("%s URL: %s\n", OperationDownloadStreamFile, pcsURL) 28 | 29 | return downloadFunc(pcsURL.String(), pcs.client.Jar.(*cookiejar.Jar)) 30 | } 31 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/baidupcs/quota.go: -------------------------------------------------------------------------------- 1 | package baidupcs 2 | 3 | import ( 4 | "github.com/json-iterator/go" 5 | ) 6 | 7 | type quotaInfo struct { 8 | *ErrInfo 9 | 10 | Quota int64 `json:"quota"` 11 | Used int64 `json:"used"` 12 | } 13 | 14 | // QuotaInfo 获取当前用户空间配额信息 15 | func (pcs *BaiduPCS) QuotaInfo() (quota, used int64, pcsError Error) { 16 | dataReadCloser, pcsError := pcs.PrepareQuotaInfo() 17 | if pcsError != nil { 18 | return 19 | } 20 | 21 | defer dataReadCloser.Close() 22 | 23 | quotaInfo := "aInfo{ 24 | ErrInfo: NewErrorInfo(OperationQuotaInfo), 25 | } 26 | 27 | d := jsoniter.NewDecoder(dataReadCloser) 28 | err := d.Decode(quotaInfo) 29 | if err != nil { 30 | quotaInfo.ErrInfo.jsonError(err) 31 | return 0, 0, quotaInfo.ErrInfo 32 | } 33 | 34 | if quotaInfo.ErrCode != 0 { 35 | return 0, 0, quotaInfo.ErrInfo 36 | } 37 | 38 | quota = quotaInfo.Quota 39 | used = quotaInfo.Used 40 | return 41 | } 42 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/baidupcs/rm_mkdir.go: -------------------------------------------------------------------------------- 1 | package baidupcs 2 | 3 | // Remove 批量删除文件/目录 4 | func (pcs *BaiduPCS) Remove(paths ...string) (pcsError Error) { 5 | dataReadCloser, pcsError := pcs.PrepareRemove(paths...) 6 | if pcsError != nil { 7 | return 8 | } 9 | 10 | defer dataReadCloser.Close() 11 | 12 | errInfo := decodeJSONError(OperationRemove, dataReadCloser) 13 | return errInfo 14 | } 15 | 16 | // Mkdir 创建目录 17 | func (pcs *BaiduPCS) Mkdir(pcspath string) (pcsError Error) { 18 | dataReadCloser, pcsError := pcs.PrepareMkdir(pcspath) 19 | if pcsError != nil { 20 | return 21 | } 22 | 23 | defer dataReadCloser.Close() 24 | 25 | errInfo := decodeJSONError(OperationMkdir, dataReadCloser) 26 | return errInfo 27 | } 28 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/build_linux.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" 4 | upx BaiduPCS-Go -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/debian/Packages.sh: -------------------------------------------------------------------------------- 1 | dpkg-scanpackages . | gzip > Packages.gz -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/debian/iphoneos-arm/control: -------------------------------------------------------------------------------- 1 | Package: BaiduPCS-Go 2 | Version: 3.5 3 | Homepage: https://github.com/iikira/BaiduPCS-Go 4 | Section: 实用工具 5 | Priority: optional 6 | Architecture: iphoneos-arm 7 | Installed-Size: 4096 8 | Maintainer: iikira 9 | Description: BaiduPCS-Go 使用Go语言编写的百度网盘命令行客户端, 为操作百度网盘, 提供实用功能. -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/debian/linux-amd64/control: -------------------------------------------------------------------------------- 1 | Package: BaiduPCS-Go 2 | Version: 3.5 3 | Homepage: https://github.com/iikira/BaiduPCS-Go 4 | Section: utils 5 | Priority: optional 6 | Architecture: amd64 7 | Installed-Size: 4096 8 | Maintainer: iikira 9 | Description: BaiduPCS-Go 使用Go语言编写的百度网盘命令行客户端, 为操作百度网盘, 提供实用功能. -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/internal0/pcscommand/aria2.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package pcscommand 4 | 5 | import ( 6 | "github.com/iikira/BaiduPCS-Go/baidupcs" 7 | ) 8 | 9 | func GetAria2DownloadFunc(uiProgress *UIProgress, path, savePath, s string) baidupcs.DownloadFunc { 10 | return nil 11 | } 12 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/internal0/pcscommand/cd.go: -------------------------------------------------------------------------------- 1 | package pcscommand 2 | 3 | import ( 4 | "fmt" 5 | "github.com/iikira/BaiduPCS-Go/internal0/pcsconfig" 6 | ) 7 | 8 | // RunChangeDirectory 执行更改工作目录 9 | func RunChangeDirectory(path string, isList bool) { 10 | path, err := getAbsPath(path) 11 | if err != nil { 12 | fmt.Println(err) 13 | return 14 | } 15 | 16 | data, err := GetBaiduPCS().FilesDirectoriesMeta(path) 17 | if err != nil { 18 | fmt.Println(err) 19 | return 20 | } 21 | 22 | if !data.Isdir { 23 | fmt.Printf("错误: %s 不是一个目录 (文件夹)\n", path) 24 | return 25 | } 26 | 27 | GetActiveUser().Workdir = path 28 | pcsconfig.Config.Save() 29 | 30 | fmt.Printf("改变工作目录: %s\n", path) 31 | 32 | if isList { 33 | RunLs(".") 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/internal0/pcscommand/conf.go: -------------------------------------------------------------------------------- 1 | package pcscommand 2 | 3 | import ( 4 | "bytes" 5 | "io/ioutil" 6 | "path/filepath" 7 | 8 | "github.com/iikira/BaiduPCS-Go/pcsutil" 9 | "golang.org/x/text/encoding/simplifiedchinese" 10 | "golang.org/x/text/transform" 11 | ) 12 | 13 | var ( 14 | Ver = "4.0.0" 15 | WindowTitle = "BND v" + Ver 16 | WindowTitleGBK = "" 17 | PlsSelectFile = "2. 点我选择要下载的文件(在网盘中将需要下载的文件移到根目录后再点【1. 刷新文件列表】)" 18 | BND2 = "" 19 | 20 | SK = []byte("696D887C9AA0611B") 21 | ) 22 | 23 | var HomeDir = pcsutil.ExecutablePathJoin("") 24 | var BndDir = filepath.Join(HomeDir, ".bnd") 25 | var SaveDir = filepath.Join(HomeDir, "Downloads") 26 | var BDUSS = "" 27 | var AppID = 260149 28 | 29 | func init() { 30 | titleData, _ := ioutil.ReadAll(transform.NewReader(bytes.NewReader([]byte(WindowTitle)), simplifiedchinese.GBK.NewEncoder())) 31 | WindowTitleGBK = string(titleData) 32 | } 33 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/internal0/pcscommand/meta.go: -------------------------------------------------------------------------------- 1 | package pcscommand 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | // RunGetMeta 执行 获取单个文件/目录的元信息 8 | func RunGetMeta(path string) { 9 | p, err := getAbsPath(path) 10 | if err != nil { 11 | fmt.Println(err) 12 | return 13 | } 14 | 15 | data, err := GetBaiduPCS().FilesDirectoriesMeta(p) 16 | if err != nil { 17 | fmt.Println(err) 18 | return 19 | } 20 | fmt.Println() 21 | fmt.Println(data) 22 | } 23 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/internal0/pcscommand/pcscommand.go: -------------------------------------------------------------------------------- 1 | // Package pcscommand 命令包 2 | package pcscommand 3 | 4 | import ( 5 | "github.com/iikira/BaiduPCS-Go/baidupcs" 6 | "github.com/iikira/BaiduPCS-Go/internal0/pcsconfig" 7 | ) 8 | 9 | // GetActiveUser 获取当前登录的百度帐号 10 | func GetActiveUser() *pcsconfig.Baidu { 11 | return pcsconfig.Config.ActiveUser() 12 | } 13 | 14 | // GetBaiduPCS 从配置读取BaiduPCS 15 | func GetBaiduPCS() *baidupcs.BaiduPCS { 16 | return pcsconfig.Config.ActiveUserBaiduPCS() 17 | } 18 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/internal0/pcscommand/quota.go: -------------------------------------------------------------------------------- 1 | package pcscommand 2 | 3 | import ( 4 | "fmt" 5 | "github.com/iikira/BaiduPCS-Go/pcsutil/converter" 6 | ) 7 | 8 | // RunGetQuota 执行 获取当前用户空间配额信息, 并输出 9 | func RunGetQuota() { 10 | quota, used, err := GetBaiduPCS().QuotaInfo() 11 | if err != nil { 12 | fmt.Println(err) 13 | return 14 | } 15 | fmt.Printf("用户名: %s, 总空间: %s, 已用空间: %s, 比率: %f%%\n", 16 | GetActiveUser().Name, 17 | converter.ConvertFileSize(quota), 18 | converter.ConvertFileSize(used), 19 | 100*float64(used)/float64(quota), 20 | ) 21 | } 22 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/internal0/pcscommand/ui.go: -------------------------------------------------------------------------------- 1 | package pcscommand 2 | 3 | import "github.com/andlabs/ui" 4 | 5 | var Downloading = false 6 | var MainWin *ui.Window 7 | 8 | type UIProgress struct { 9 | PB *ui.ProgressBar // 进度条 10 | PL *ui.Label // 进度文本 11 | PF *ui.Label // 文件名 12 | Win *ui.Window // 主窗口 13 | } 14 | 15 | func ShortLabel(path string) string { 16 | ret := path 17 | runes := []rune(path) 18 | const max = 56 19 | if max < len(runes) { 20 | ret = string(runes[:max]) + "..." 21 | } 22 | 23 | return ret 24 | } 25 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/internal0/pcsconfig/errors.go: -------------------------------------------------------------------------------- 1 | package pcsconfig 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | var ( 8 | //ErrNotLogin 未登录帐号错误 9 | ErrNotLogin = errors.New("baidu user not login") 10 | //ErrConfigFilePathNotSet 未设置配置文件 11 | ErrConfigFilePathNotSet = errors.New("config file not set") 12 | //ErrConfigFileNotExist 未设置Config, 未初始化 13 | ErrConfigFileNotExist = errors.New("config file not exist") 14 | //ErrConfigFileNoPermission Config文件无权限访问 15 | ErrConfigFileNoPermission = errors.New("config file permission denied") 16 | //ErrConfigContentsParseError 解析Config数据错误 17 | ErrConfigContentsParseError = errors.New("config contents parse error") 18 | ) 19 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/internal0/pcsweb/errors.go: -------------------------------------------------------------------------------- 1 | package pcsweb 2 | 3 | import ( 4 | "fmt" 5 | "github.com/json-iterator/go" 6 | ) 7 | 8 | // ErrInfo web 错误详情 9 | type ErrInfo struct { 10 | ErrroCode int `json:"error_code"` 11 | ErrorMsg string `json:"error_msg"` 12 | } 13 | 14 | func (ei *ErrInfo) Error() string { 15 | return fmt.Sprintf("error code: %d, error message: %s", ei.ErrroCode, ei.ErrorMsg) 16 | } 17 | 18 | // JSON 将错误信息打包成 json 19 | func (ei *ErrInfo) JSON() (data []byte) { 20 | var err error 21 | data, err = jsoniter.MarshalIndent(ei, "", " ") 22 | checkErr(err) 23 | 24 | return 25 | } 26 | 27 | // checkErr 遇到错误就退出 28 | func checkErr(err error) { 29 | if err != nil { 30 | panic(err) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/internal0/pcsweb/middleware.go: -------------------------------------------------------------------------------- 1 | package pcsweb 2 | 3 | import ( 4 | "net/http" 5 | ) 6 | 7 | func middleware(next http.HandlerFunc) http.HandlerFunc { 8 | return func(w http.ResponseWriter, r *http.Request) { 9 | // next handler 10 | next.ServeHTTP(w, r) 11 | } 12 | } 13 | 14 | func activeAuthMiddleware(next http.HandlerFunc) http.HandlerFunc { 15 | next2 := middleware(next) 16 | 17 | // TODO web登录 18 | 19 | return func(w http.ResponseWriter, r *http.Request) { 20 | next2.ServeHTTP(w, r) 21 | } 22 | } 23 | 24 | // rootMiddleware 根目录中间件 25 | func rootMiddleware(w http.ResponseWriter, r *http.Request) { 26 | if r.URL.Path == "/" { 27 | // 跳转到 /index.html 28 | w.Header().Set("Location", "/index.html") 29 | http.Error(w, "", 301) 30 | } else { 31 | w.Header().Set("X-Content-Type-Options", "nosniff") 32 | w.WriteHeader(404) 33 | 34 | tmpl := boxTmplParse("index", "index.html", "404.html") 35 | checkErr(tmpl.Execute(w, nil)) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/internal0/pcsweb/pcsfile.go: -------------------------------------------------------------------------------- 1 | package pcsweb 2 | 3 | import ( 4 | "github.com/iikira/BaiduPCS-Go/internal0/pcsconfig" 5 | "io" 6 | "net/http" 7 | ) 8 | 9 | func fileList(w http.ResponseWriter, r *http.Request) { 10 | r.ParseForm() 11 | 12 | fpath := r.Form.Get("path") 13 | dataReadCloser, err := pcsconfig.Config.ActiveUserBaiduPCS().PrepareFilesDirectoriesList(fpath) 14 | if err != nil { 15 | w.Write((&ErrInfo{ 16 | ErrroCode: 1, 17 | ErrorMsg: err.Error(), 18 | }).JSON()) 19 | return 20 | } 21 | 22 | defer dataReadCloser.Close() 23 | io.Copy(w, dataReadCloser) 24 | } 25 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/internal0/pcsweb/static/css/main.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | #logo { 4 | display: none; 5 | } 6 | 7 | @media (max-width: 767px) { 8 | #logo { 9 | display: inline; 10 | } 11 | } 12 | 13 | .navbar.navbar-inverse { 14 | border: 0; 15 | box-shadow: 0 0 10px #000; 16 | background-color: rgba(255, 149, 117, 0.8); 17 | } 18 | 19 | header a { 20 | color: #000 !important; 21 | } 22 | 23 | .directory-list-header { 24 | font-family: "Microsoft YaHei", 微软雅黑, 黑体, 宋体, sans-serif; 25 | font-weight: bold; 26 | padding: 10px 15px; 27 | } -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/internal0/pcsweb/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/iikira/BaiduPCS-Go/internal0/pcsweb/static/favicon.ico -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/internal0/pcsweb/static/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/iikira/BaiduPCS-Go/internal0/pcsweb/static/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/internal0/pcsweb/static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/iikira/BaiduPCS-Go/internal0/pcsweb/static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/internal0/pcsweb/static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/iikira/BaiduPCS-Go/internal0/pcsweb/static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/internal0/pcsweb/static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/iikira/BaiduPCS-Go/internal0/pcsweb/static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/internal0/pcsweb/static/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/iikira/BaiduPCS-Go/internal0/pcsweb/static/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/internal0/pcsweb/static/js/nano.js: -------------------------------------------------------------------------------- 1 | /* Nano Templates - https://github.com/trix/nano */ 2 | 3 | function nano(template, data) { 4 | return template.replace(/\{([\w\.]*)\}/g, function(str, key) { 5 | var keys = key.split("."), v = data[keys.shift()]; 6 | for (var i = 0, l = keys.length; i < l; i++) v = v[keys[i]]; 7 | return (typeof v !== "undefined" && v !== null) ? v : ""; 8 | }); 9 | } -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/internal0/pcsweb/template/404.html: -------------------------------------------------------------------------------- 1 | {{define "title"}}404 Not Found{{end}} {{define "contents"}} 2 |
3 |
4 | 7 | 404 page not found 8 |
9 |
10 | {{end}}{{define "contents_js"}} {{end}} -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/internal0/pcsweb/template/about.html: -------------------------------------------------------------------------------- 1 | {{define "title"}}关于{{end}}{{define "contents"}} 2 |
3 | 6 |
7 | {{end}}{{define "contents_js"}} {{end}} -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/internal0/pcsweb/template/template.html: -------------------------------------------------------------------------------- 1 | {{define "title"}}{{end}} {{define "contents"}} 2 |
3 | 4 |
5 | {{end}} {{define "contents_js"}} 6 | {{end}} -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/internal0/pcsweb/utils.go: -------------------------------------------------------------------------------- 1 | package pcsweb 2 | 3 | import ( 4 | "html/template" 5 | ) 6 | 7 | // boxTmplParse ricebox 载入文件内容, 并进行模板解析 8 | func boxTmplParse(name string, fileNames ...string) (tmpl *template.Template) { 9 | var ( 10 | err error 11 | ) 12 | tmpl = template.New(name) 13 | for k := range fileNames { 14 | _, err = tmpl.Parse(templatesBox.MustString(fileNames[k])) 15 | checkErr(err) 16 | } 17 | return 18 | } 19 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/pcscache/pcscache.go: -------------------------------------------------------------------------------- 1 | package pcscache 2 | 3 | import ( 4 | "github.com/iikira/BaiduPCS-Go/baidupcs" 5 | "time" 6 | ) 7 | 8 | var ( 9 | // DirCache 网盘目录缓存 10 | DirCache = &dirCache{ 11 | fdl: map[string]*baidupcs.FileDirectoryList{}, 12 | lifeTime: 1 * time.Hour, 13 | } 14 | ) 15 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/pcspath/match.go: -------------------------------------------------------------------------------- 1 | package pcspath 2 | 3 | import ( 4 | "path" 5 | ) 6 | 7 | // AbsPathNoMatch 返回绝对路径, 不检测通配符 8 | func (pp *PCSPath) AbsPathNoMatch() string { 9 | pp.CleanPath() 10 | if !path.IsAbs(pp.SubPath) { 11 | return path.Clean(*pp.WorkdirDestination + "/" + pp.SubPath) 12 | } 13 | return pp.SubPath 14 | } 15 | 16 | // Match 检测 pcspaths 的通配符, 返回匹配成功的 matchedPCSPaths 17 | func (pp *PCSPath) Match(pcspaths ...string) (matchedPCSPaths []string) { 18 | pattern := pp.AbsPathNoMatch() // 获取绝对路径 19 | 20 | for k := range pcspaths { 21 | matched, _ := path.Match(pattern, pcspaths[k]) 22 | if !matched { 23 | continue 24 | } 25 | 26 | matchedPCSPaths = append(matchedPCSPaths, pcspaths[k]) 27 | } 28 | 29 | return matchedPCSPaths 30 | } 31 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/pcspath/match_test.go: -------------------------------------------------------------------------------- 1 | package pcspath 2 | 3 | import ( 4 | "fmt" 5 | "testing" 6 | ) 7 | 8 | func TestMatch(t *testing.T) { 9 | workdir := "/" 10 | pp := NewPCSPath(&workdir, "[123?") 11 | fmt.Println(pp.AbsPathNoMatch()) 12 | fmt.Println(pp.Match([]string{"123", "/[1234", "12345"}...)) 13 | } 14 | 15 | func TestTest(t *testing.T) { 16 | fmt.Println(SplitAll("/1/2/3")) 17 | } 18 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/pcspath/pcspath.go: -------------------------------------------------------------------------------- 1 | // Package pcspath 网盘路径工具包 2 | package pcspath 3 | 4 | import ( 5 | "path" 6 | ) 7 | 8 | // PCSPath 百度 PCS 路径 9 | type PCSPath struct { 10 | WorkdirDestination *string // 指向工作目录 11 | SubPath string // 相对于工作目录的子目录 12 | } 13 | 14 | // NewPCSPath 返回 PCSPath 指针对象 15 | func NewPCSPath(workdirDestination *string, pcsSubPath string) *PCSPath { 16 | pp := &PCSPath{ 17 | WorkdirDestination: workdirDestination, 18 | SubPath: pcsSubPath, 19 | } 20 | pp.CleanPath() 21 | return pp 22 | } 23 | 24 | // CleanPath 过滤处理目录 25 | func (pp *PCSPath) CleanPath() { 26 | pp.SubPath = path.Clean(pp.SubPath) 27 | *pp.WorkdirDestination = path.Clean(*pp.WorkdirDestination) 28 | } 29 | 30 | // EscapeBracket 转义文件名中的中括号 31 | func (pp *PCSPath) EscapeBracket() { 32 | pp.SubPath = EscapeBracketOne(pp.SubPath) 33 | *pp.WorkdirDestination = EscapeBracketOne(*pp.WorkdirDestination) 34 | } 35 | 36 | // SetSubPath 设置子目录 37 | func (pp *PCSPath) SetSubPath(pcsSubPath string) { 38 | pp.SubPath = path.Clean(pcsSubPath) 39 | } 40 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/pcspath/regexp.go: -------------------------------------------------------------------------------- 1 | package pcspath 2 | 3 | import ( 4 | "regexp" 5 | ) 6 | 7 | var ( 8 | patternRE = regexp.MustCompile(`[\*\?]`) 9 | ) 10 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/pcspath/util_test.go: -------------------------------------------------------------------------------- 1 | package pcspath 2 | 3 | import ( 4 | "fmt" 5 | "testing" 6 | ) 7 | 8 | func TestEscapeBlank(t *testing.T) { 9 | fmt.Println(Escape("asdfj(alsf)djlsf")) 10 | fmt.Println(Escape("asdfjal\\\\\\ sfdj lsf")) 11 | fmt.Println(Escape("asdfjal\\\\ sfdj lsf")) 12 | fmt.Println(Escape("asdfjal\\ s (asdfa) [asf] fdj lsf")) 13 | } 14 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/pcstable/pcstable.go: -------------------------------------------------------------------------------- 1 | // Package pcstable 格式化表格包 2 | package pcstable 3 | 4 | import ( 5 | "github.com/olekukonko/tablewriter" 6 | "io" 7 | ) 8 | 9 | // PCSTable 封装 tablewriter.Table 10 | type PCSTable struct { 11 | *tablewriter.Table 12 | } 13 | 14 | // NewTable 预设了一些配置 15 | func NewTable(wt io.Writer) PCSTable { 16 | tb := tablewriter.NewWriter(wt) 17 | tb.SetAutoWrapText(false) 18 | tb.SetBorder(false) 19 | tb.SetHeaderLine(false) 20 | tb.SetColumnSeparator("") 21 | return PCSTable{tb} 22 | } 23 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/pcsutil/addr.go: -------------------------------------------------------------------------------- 1 | package pcsutil 2 | 3 | import ( 4 | "net" 5 | ) 6 | 7 | // ListAddresses 列出本地可用的 IP 地址 8 | func ListAddresses() (addresses []string) { 9 | ifaces, _ := net.Interfaces() 10 | addresses = make([]string, 0, len(ifaces)) 11 | for k := range ifaces[:] { 12 | ifAddrs, _ := ifaces[k].Addrs() 13 | for l := range ifAddrs[:] { 14 | switch v := ifAddrs[l].(type) { 15 | case *net.IPNet: 16 | addresses = append(addresses, v.IP.String()) 17 | case *net.IPAddr: 18 | addresses = append(addresses, v.IP.String()) 19 | } 20 | } 21 | } 22 | return 23 | } 24 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/pcsutil/converter/unsafe_strconv_test.go: -------------------------------------------------------------------------------- 1 | // go test -test.bench=".*" 2 | package converter 3 | 4 | import ( 5 | "testing" 6 | ) 7 | 8 | var str = "asddsadfaalkdjsksajdfkashjkdfhashfliuhsadifhasifhaishdfiashdihaisdfhiuassfasdff" 9 | 10 | func BenchmarkToBytes(b *testing.B) { 11 | for i := 0; i <= b.N; i++ { 12 | _ = ToBytes(str) 13 | } 14 | } 15 | 16 | func BenchmarkBytes(b *testing.B) { 17 | for i := 0; i <= b.N; i++ { 18 | _ = []byte(str) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/pcsutil/error.go: -------------------------------------------------------------------------------- 1 | package pcsutil 2 | 3 | import ( 4 | "log" 5 | "os" 6 | ) 7 | 8 | // PrintErrIfExist 简易错误处理, 如果 err 存在, 就只向屏幕输出 err 。 9 | func PrintErrIfExist(err error) { 10 | if err != nil { 11 | log.Println(err) 12 | } 13 | } 14 | 15 | // PrintErrAndExit 简易错误处理, 如果 err 存在, 向屏幕输出 err 并退出, annotate 是加在 err 之前的注释信息。 16 | func PrintErrAndExit(annotate string, err error) { 17 | if err != nil { 18 | log.Println(annotate, err) 19 | os.Exit(1) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/pcsutil/getip/getip.go: -------------------------------------------------------------------------------- 1 | // Package getip 获取 ip 信息包 2 | package getip 3 | 4 | import ( 5 | "github.com/iikira/BaiduPCS-Go/requester" 6 | "unsafe" 7 | ) 8 | 9 | //IPInfo 获取IP地址和IP位置 10 | func IPInfo(https bool) (ipAddr string, err error) { 11 | c := requester.NewHTTPClient() 12 | c.SetHTTPSecure(https) 13 | 14 | var scheme string 15 | if https { 16 | scheme = "https" 17 | } else { 18 | scheme = "http" 19 | } 20 | 21 | body, err := c.Fetch("GET", scheme+"://api.ipify.org", nil, nil) 22 | if err != nil { 23 | return "", err 24 | } 25 | 26 | return *(*string)(unsafe.Pointer(&body)), nil 27 | } 28 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/pcsutil/getip/getip_test.go: -------------------------------------------------------------------------------- 1 | package getip 2 | 3 | import ( 4 | "fmt" 5 | "testing" 6 | ) 7 | 8 | func TestGetIP(t *testing.T) { 9 | fmt.Println(IPInfo()) 10 | } 11 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/pcsutil/log_colorable_prefix.go: -------------------------------------------------------------------------------- 1 | package pcsutil 2 | 3 | import ( 4 | "fmt" 5 | "github.com/fatih/color" 6 | "github.com/iikira/BaiduPCS-Go/pcsutil/pcstime" 7 | "log" 8 | ) 9 | 10 | var ( 11 | // ErrorColor 设置输出错误的颜色 12 | ErrorColor = color.New(color.FgRed).SprintFunc() 13 | ) 14 | 15 | // 自定义log writer 16 | type logWriter struct{} 17 | 18 | func (logWriter) Write(bytes []byte) (int, error) { 19 | return fmt.Fprint(color.Output, "["+pcstime.BeijingTimeOption("Refer")+"] "+string(bytes)) 20 | } 21 | 22 | // SetLogPrefix 设置日志输出的时间前缀 23 | func SetLogPrefix() { 24 | log.SetFlags(0) 25 | log.SetOutput(new(logWriter)) 26 | } 27 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/pcsutil/regexp_pre.go: -------------------------------------------------------------------------------- 1 | package pcsutil 2 | 3 | import ( 4 | "regexp" 5 | ) 6 | 7 | var ( 8 | // HTTPSRE https regexp 9 | HTTPSRE = regexp.MustCompile("^https") 10 | // ChinaPhoneRE https regexp 11 | ChinaPhoneRE = regexp.MustCompile(`^(\+86)?1[3-9][0-9]\d{8}$`) 12 | ) 13 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/pcsutil/waitgroup/wait_group_test.go: -------------------------------------------------------------------------------- 1 | package waitgroup 2 | 3 | import ( 4 | "fmt" 5 | "testing" 6 | "time" 7 | ) 8 | 9 | func TestWg(t *testing.T) { 10 | wg := NewWaitGroup(2) 11 | for i := 0; i < 60; i++ { 12 | wg.AddDelta() 13 | go func(i int) { 14 | fmt.Println(i, wg.Parallel()) 15 | time.Sleep(1e9) 16 | wg.Done() 17 | }(i) 18 | } 19 | wg.Wait() 20 | } 21 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/pcsverbose/pcsdebug/cpu.go: -------------------------------------------------------------------------------- 1 | // Package pcsdebug 调试包 2 | package pcsdebug 3 | 4 | import ( 5 | "context" 6 | "fmt" 7 | "os" 8 | "runtime/pprof" 9 | ) 10 | 11 | //StartCPUProfile 收集cpu信息 12 | func StartCPUProfile(ctx context.Context, cpuProfile string) { 13 | if cpuProfile != "" { 14 | f, err := os.Create(cpuProfile) 15 | if err != nil { 16 | fmt.Fprintf(os.Stderr, "Can not create cpu profile output file: %s", err) 17 | return 18 | } 19 | if err := pprof.StartCPUProfile(f); err != nil { 20 | fmt.Fprintf(os.Stderr, "Can not start cpu profile: %s", err) 21 | f.Close() 22 | return 23 | } 24 | defer pprof.StopCPUProfile() 25 | } 26 | select { 27 | case <-ctx.Done(): 28 | return 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/pcsverbose/utils.go: -------------------------------------------------------------------------------- 1 | package pcsverbose 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | "io/ioutil" 7 | ) 8 | 9 | //PrintReader 输出Reader 10 | func PrintReader(r io.Reader) { 11 | b, _ := ioutil.ReadAll(r) 12 | fmt.Printf("%s\n", b) 13 | } 14 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/requester/downloader/config.go: -------------------------------------------------------------------------------- 1 | package downloader 2 | 3 | const ( 4 | //CacheSize 默认的下载缓存 5 | CacheSize = 8192 6 | ) 7 | 8 | var ( 9 | // MinParallelSize 单个线程最小的数据量 10 | MinParallelSize int64 = 128 * 1024 // 128kb 11 | ) 12 | 13 | //Config 下载配置 14 | type Config struct { 15 | MaxParallel int // 最大下载并发量 16 | CacheSize int // 下载缓冲 17 | InstanceStatePath string // 断点续传信息路径 18 | IsTest bool // 是否测试下载 19 | cacheSize int // 实际下载缓存 20 | parallel int // 实际的下载并行量 21 | } 22 | 23 | //NewConfig 返回默认配置 24 | func NewConfig() *Config { 25 | return &Config{ 26 | MaxParallel: 5, 27 | CacheSize: CacheSize, 28 | IsTest: false, 29 | } 30 | } 31 | 32 | //Fix 修复配置信息, 使其合法 33 | func (cfg *Config) Fix() { 34 | fixCacheSize(&cfg.CacheSize) 35 | if cfg.MaxParallel < 1 { 36 | cfg.MaxParallel = 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/requester/downloader/utils.go: -------------------------------------------------------------------------------- 1 | package downloader 2 | 3 | //trigger 用于触发事件 4 | func trigger(f func()) { 5 | if f == nil { 6 | return 7 | } 8 | go f() 9 | } 10 | 11 | func fixCacheSize(size *int) { 12 | if *size < 1024 { 13 | *size = 1024 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/requester/requester.go: -------------------------------------------------------------------------------- 1 | // Package requester 提供网络请求简便操作 2 | package requester 3 | 4 | var ( 5 | // UserAgent 浏览器标识 6 | UserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36" 7 | 8 | // DefaultClient 默认 http 客户端 9 | DefaultClient = NewHTTPClient() 10 | ) 11 | 12 | // ContentTyper Content-Type 接口 13 | type ContentTyper interface { 14 | ContentType() string 15 | } 16 | 17 | // ContentLengther Content-Length 接口 18 | type ContentLengther interface { 19 | ContentLength() int64 20 | } 21 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/requester/rio/file.go: -------------------------------------------------------------------------------- 1 | package rio 2 | 3 | import ( 4 | "os" 5 | "sync/atomic" 6 | ) 7 | 8 | // NewFileReaderLen64 *os.File 实现 ReadedLen64 接口 9 | func NewFileReaderLen64(f *os.File) ReaderLen64 { 10 | if f == nil { 11 | return nil 12 | } 13 | 14 | return &fileReadedlen64{ 15 | f: f, 16 | } 17 | } 18 | 19 | type fileReadedlen64 struct { 20 | readed int64 21 | f *os.File 22 | } 23 | 24 | // Read 读文件, 并记录已读取数据量 25 | func (fr *fileReadedlen64) Read(b []byte) (n int, err error) { 26 | n, err = fr.f.Read(b) 27 | atomic.AddInt64(&fr.readed, int64(n)) 28 | return n, err 29 | } 30 | 31 | // Len 返回文件的大小 32 | func (fr *fileReadedlen64) Len() int64 { 33 | info, err := fr.f.Stat() 34 | if err != nil { 35 | return 0 36 | } 37 | return info.Size() - fr.readed 38 | } 39 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/requester/rio/multi_test.go: -------------------------------------------------------------------------------- 1 | package rio 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | "os" 7 | "strings" 8 | "testing" 9 | ) 10 | 11 | func TestMultiReaderLen(t *testing.T) { 12 | rd1, rd2 := strings.NewReader("asdkfljalf"), strings.NewReader("---asva sdf") 13 | multi := MultiReaderLen(rd1, rd2) 14 | fmt.Println(multi.Len()) 15 | io.Copy(os.Stdout, multi) 16 | } 17 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/requester/rio/rio.go: -------------------------------------------------------------------------------- 1 | // Package rio rquester io 工具包 2 | package rio 3 | 4 | import ( 5 | "io" 6 | ) 7 | 8 | // Lener 返回32-bit长度接口 9 | type Lener interface { 10 | Len() int 11 | } 12 | 13 | // Lener64 返回64-bit长度接口 14 | type Lener64 interface { 15 | Len() int64 16 | } 17 | 18 | // ReaderLen 实现io.Reader和32-bit长度接口 19 | type ReaderLen interface { 20 | io.Reader 21 | Lener 22 | } 23 | 24 | // ReaderLen64 实现io.Reader和64-bit长度接口 25 | type ReaderLen64 interface { 26 | io.Reader 27 | Lener64 28 | } 29 | 30 | // WriterLen64 实现io.Writer和64-bit长度接口 31 | type WriterLen64 interface { 32 | io.Writer 33 | Lener64 34 | } 35 | 36 | // WriteCloserAt 实现io.WriteCloser和io.WriterAt接口 37 | type WriteCloserAt interface { 38 | io.WriteCloser 39 | io.WriterAt 40 | } 41 | 42 | // WriteCloserLen64At 实现rio.WriteCloserAt和64-bit长度接口 43 | type WriteCloserLen64At interface { 44 | WriteCloserAt 45 | Lener64 46 | } 47 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/requester/uploader/example.go: -------------------------------------------------------------------------------- 1 | package uploader 2 | 3 | import ( 4 | "fmt" 5 | "github.com/iikira/BaiduPCS-Go/pcsutil/converter" 6 | "github.com/iikira/BaiduPCS-Go/requester/rio" 7 | ) 8 | 9 | // DoUpload 执行上传 10 | func DoUpload(uploadURL string, readerlen64 rio.ReaderLen64, checkFunc CheckFunc) { 11 | u := NewUploader(uploadURL, readerlen64) 12 | u.SetCheckFunc(checkFunc) 13 | 14 | exitChan := make(chan struct{}) 15 | 16 | u.OnExecute(func() { 17 | statusChan := u.GetStatusChan() 18 | for { 19 | select { 20 | case <-exitChan: 21 | return 22 | case v, ok := <-statusChan: 23 | if !ok { 24 | return 25 | } 26 | 27 | fmt.Printf("\r ↑ %s/%s %s/s in %s ............", 28 | converter.ConvertFileSize(v.Uploaded(), 2), 29 | converter.ConvertFileSize(v.TotalSize(), 2), 30 | converter.ConvertFileSize(v.SpeedsPerSecond(), 2), 31 | v.TimeElapsed(), 32 | ) 33 | } 34 | } 35 | }) 36 | 37 | u.Execute() 38 | close(exitChan) 39 | 40 | return 41 | } 42 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/requester/uploader/readed.go: -------------------------------------------------------------------------------- 1 | package uploader 2 | 3 | import ( 4 | "github.com/iikira/BaiduPCS-Go/requester/rio" 5 | "sync/atomic" 6 | ) 7 | 8 | // Readed64 增加获取已读取数据量, 用于统计速度 9 | type Readed64 interface { 10 | rio.ReaderLen64 11 | Readed() int64 12 | } 13 | 14 | // NewReaded64 实现Readed64接口 15 | func NewReaded64(rl rio.ReaderLen64) Readed64 { 16 | return &readed64{ 17 | readed: 0, 18 | ReaderLen64: rl, 19 | } 20 | } 21 | 22 | type readed64 struct { 23 | readed int64 24 | rio.ReaderLen64 25 | } 26 | 27 | func (r64 *readed64) Read(p []byte) (n int, err error) { 28 | n, err = r64.ReaderLen64.Read(p) 29 | atomic.AddInt64(&r64.readed, int64(n)) 30 | return n, err 31 | } 32 | 33 | func (r64 *readed64) Readed() int64 { 34 | return atomic.LoadInt64(&r64.readed) 35 | } 36 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/resource_windows.syso: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/iikira/BaiduPCS-Go/resource_windows.syso -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/GeertJohan/go.rice/.gitignore: -------------------------------------------------------------------------------- 1 | /example/example 2 | /example/example.exe 3 | /rice/rice 4 | /rice/rice.exe 5 | 6 | *.rice-box.go 7 | *.rice-box.syso 8 | .wercker 9 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/GeertJohan/go.rice/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - master 5 | - 1.x.x 6 | - 1.8.x 7 | - 1.7.x 8 | - 1.6.x 9 | - 1.5.x 10 | 11 | install: 12 | - go get -t ./... 13 | - env 14 | - if [ "${TRAVIS_GO_VERSION%.*}" != "1.5" ]; then go get github.com/golang/lint/golint; fi 15 | script: 16 | - go build -x ./... 17 | - go test -cover ./... 18 | - go vet ./... 19 | - if [ "${TRAVIS_GO_VERSION%.*}" != "1.5" ]; then golint .; fi 20 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/GeertJohan/go.rice/AUTHORS: -------------------------------------------------------------------------------- 1 | Geert-Johan Riemer 2 | Paul Maddox 3 | Vincent Petithory 4 | 5 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/GeertJohan/go.rice/debug.go: -------------------------------------------------------------------------------- 1 | package rice 2 | 3 | // Debug can be set to true to enable debugging. 4 | var Debug = false 5 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/GeertJohan/go.rice/http.go: -------------------------------------------------------------------------------- 1 | package rice 2 | 3 | import ( 4 | "net/http" 5 | ) 6 | 7 | // HTTPBox implements http.FileSystem which allows the use of Box with a http.FileServer. 8 | // e.g.: http.Handle("/", http.FileServer(rice.MustFindBox("http-files").HTTPBox())) 9 | type HTTPBox struct { 10 | *Box 11 | } 12 | 13 | // HTTPBox creates a new HTTPBox from an existing Box 14 | func (b *Box) HTTPBox() *HTTPBox { 15 | return &HTTPBox{b} 16 | } 17 | 18 | // Open returns a File using the http.File interface 19 | func (hb *HTTPBox) Open(name string) (http.File, error) { 20 | return hb.Box.Open(name) 21 | } 22 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/GeertJohan/go.rice/sort.go: -------------------------------------------------------------------------------- 1 | package rice 2 | 3 | import "os" 4 | 5 | // SortByName allows an array of os.FileInfo objects 6 | // to be easily sorted by filename using sort.Sort(SortByName(array)) 7 | type SortByName []os.FileInfo 8 | 9 | func (f SortByName) Len() int { return len(f) } 10 | func (f SortByName) Less(i, j int) bool { return f[i].Name() < f[j].Name() } 11 | func (f SortByName) Swap(i, j int) { f[i], f[j] = f[j], f[i] } 12 | 13 | // SortByModified allows an array of os.FileInfo objects 14 | // to be easily sorted by modified date using sort.Sort(SortByModified(array)) 15 | type SortByModified []os.FileInfo 16 | 17 | func (f SortByModified) Len() int { return len(f) } 18 | func (f SortByModified) Less(i, j int) bool { return f[i].ModTime().Unix() > f[j].ModTime().Unix() } 19 | func (f SortByModified) Swap(i, j int) { f[i], f[j] = f[j], f[i] } 20 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/astaxie/beego/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2014 astaxie 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/astaxie/beego/utils/caller.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 beego Author. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package utils 16 | 17 | import ( 18 | "reflect" 19 | "runtime" 20 | ) 21 | 22 | // GetFuncName get function name 23 | func GetFuncName(i interface{}) string { 24 | return runtime.FuncForPC(reflect.ValueOf(i).Pointer()).Name() 25 | } 26 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/astaxie/beego/utils/utils.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "os" 5 | "path/filepath" 6 | "runtime" 7 | "strings" 8 | ) 9 | 10 | // GetGOPATHs returns all paths in GOPATH variable. 11 | func GetGOPATHs() []string { 12 | gopath := os.Getenv("GOPATH") 13 | if gopath == "" && strings.Compare(runtime.Version(), "go1.8") >= 0 { 14 | gopath = defaultGOPATH() 15 | } 16 | return filepath.SplitList(gopath) 17 | } 18 | 19 | func defaultGOPATH() string { 20 | env := "HOME" 21 | if runtime.GOOS == "windows" { 22 | env = "USERPROFILE" 23 | } else if runtime.GOOS == "plan9" { 24 | env = "home" 25 | } 26 | if home := os.Getenv(env); home != "" { 27 | return filepath.Join(home, "go") 28 | } 29 | return "" 30 | } 31 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/bitly/go-simplejson/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.0.3 4 | - 1.1.2 5 | - 1.2 6 | - tip 7 | install: 8 | - go get github.com/bmizerany/assert 9 | notifications: 10 | email: false 11 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/bitly/go-simplejson/LICENSE: -------------------------------------------------------------------------------- 1 | Permission is hereby granted, free of charge, to any person obtaining a copy 2 | of this software and associated documentation files (the "Software"), to deal 3 | in the Software without restriction, including without limitation the rights 4 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 5 | copies of the Software, and to permit persons to whom the Software is 6 | furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in 9 | all copies or substantial portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 14 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 15 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 17 | THE SOFTWARE. 18 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/bitly/go-simplejson/README.md: -------------------------------------------------------------------------------- 1 | ### go-simplejson 2 | 3 | a Go package to interact with arbitrary JSON 4 | 5 | [![Build Status](https://secure.travis-ci.org/bitly/go-simplejson.png)](http://travis-ci.org/bitly/go-simplejson) 6 | 7 | ### Importing 8 | 9 | import github.com/bitly/go-simplejson 10 | 11 | ### Documentation 12 | 13 | Visit the docs on [gopkgdoc](http://godoc.org/github.com/bitly/go-simplejson) 14 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/daaku/go.zipexe/readme.md: -------------------------------------------------------------------------------- 1 | go.zipexe 2 | ========= 3 | 4 | This module was taken as-is from https://github.com/cookieo9/resources-go. 5 | Documentation: https://godoc.org/github.com/daaku/go.zipexe 6 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/fatih/color/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 1.3 3 | 4 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/iikira/Baidu-Login/.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.dll 4 | *.so 5 | *.dylib 6 | cmd/Baidu-Login/Baidu-Login 7 | 8 | # Test binary, build with `go test -c` 9 | *.test 10 | 11 | # Output of the go coverage tool, specifically when used with LiteIDE 12 | *.out 13 | 14 | # Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 15 | .glide/ 16 | 17 | # others 18 | .DS_Store 19 | test/ 20 | out/ 21 | upx.log 22 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/iikira/Baidu-Login/bdcrypto/base64.go: -------------------------------------------------------------------------------- 1 | package bdcrypto 2 | 3 | import ( 4 | "bytes" 5 | "encoding/base64" 6 | "io/ioutil" 7 | ) 8 | 9 | // Base64Encode base64加密 10 | func Base64Encode(raw []byte) []byte { 11 | var encoded bytes.Buffer 12 | encoder := base64.NewEncoder(base64.StdEncoding, &encoded) 13 | encoder.Write(raw) 14 | encoder.Close() 15 | return encoded.Bytes() 16 | } 17 | 18 | // Base64Decode base64解密 19 | func Base64Decode(raw []byte) []byte { 20 | var buf bytes.Buffer 21 | buf.Write(raw) 22 | decoder := base64.NewDecoder(base64.StdEncoding, &buf) 23 | decoded, _ := ioutil.ReadAll(decoder) 24 | return decoded 25 | } 26 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/iikira/Baidu-Login/bdcrypto/bdcrypto.go: -------------------------------------------------------------------------------- 1 | package bdcrypto 2 | 3 | import ( 4 | "encoding/hex" 5 | ) 6 | 7 | // RSAEncryptOfWapBaidu 针对 WAP 登录百度的 RSA 加密 8 | func RSAEncryptOfWapBaidu(rsaPublicKeyModulus string, origData []byte) (string, error) { 9 | ciphertext, err := RSAEncryptNoPadding(rsaPublicKeyModulus, DefaultRSAPublicKeyExponent, BytesReverse(origData)) 10 | if err != nil { 11 | return "", err 12 | } 13 | 14 | return hex.EncodeToString(ciphertext), nil 15 | } 16 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/iikira/Baidu-Login/bdcrypto/hmac.go: -------------------------------------------------------------------------------- 1 | package bdcrypto 2 | 3 | import ( 4 | "crypto/hmac" 5 | "crypto/md5" 6 | "crypto/sha1" 7 | "crypto/sha256" 8 | "crypto/sha512" 9 | ) 10 | 11 | // HmacSHA1 HMAC-SHA-1签名认证 12 | func HmacSHA1(key, origData []byte) (sum []byte) { 13 | mac := hmac.New(sha1.New, key) 14 | mac.Write(origData) 15 | return mac.Sum(nil) 16 | } 17 | 18 | // HmacSHA256 HMAC-SHA-256签名认证 19 | func HmacSHA256(key, origData []byte) (sum []byte) { 20 | mac := hmac.New(sha256.New, key) 21 | mac.Write(origData) 22 | return mac.Sum(nil) 23 | } 24 | 25 | // HmacSHA512 HMAC-SHA-512签名认证 26 | func HmacSHA512(key, origData []byte) (sum []byte) { 27 | mac := hmac.New(sha512.New, key) 28 | mac.Write(origData) 29 | return mac.Sum(nil) 30 | } 31 | 32 | // HmacMD5 HMAC-SHA512-签名认证 33 | func HmacMD5(key, origData []byte) (sum []byte) { 34 | mac := hmac.New(md5.New, key) 35 | mac.Write(origData) 36 | return mac.Sum(nil) 37 | } 38 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/iikira/Baidu-Login/bdcrypto/reverse.go: -------------------------------------------------------------------------------- 1 | package bdcrypto 2 | 3 | import ( 4 | "unsafe" 5 | ) 6 | 7 | // BytesReverse 反转字节数组, 此操作会修改原值 8 | func BytesReverse(b []byte) []byte { 9 | length := len(b) 10 | for i := 0; i < length/2; i++ { 11 | b[i], b[length-i-1] = b[length-i-1], b[i] 12 | } 13 | return b 14 | } 15 | 16 | // StringReverse 反转字符串, 此操作不会修改原值 17 | func StringReverse(s string) string { 18 | newBytes := make([]byte, len(s)) 19 | copy(newBytes, s) 20 | b := BytesReverse(newBytes) 21 | return *(*string)(unsafe.Pointer(&b)) 22 | } 23 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/iikira/Baidu-Login/config.go: -------------------------------------------------------------------------------- 1 | package baidulogin 2 | 3 | import ( 4 | "github.com/GeertJohan/go.rice" 5 | "github.com/astaxie/beego/session" 6 | ) 7 | 8 | var ( 9 | templateFilesBox *rice.Box 10 | libFilesBox *rice.Box 11 | 12 | globalSessions *session.Manager // 全局 sessions 管理器 13 | ) 14 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/iikira/Baidu-Login/http_server_page.go: -------------------------------------------------------------------------------- 1 | package baidulogin 2 | 3 | import ( 4 | "log" 5 | "net/http" 6 | "text/template" 7 | ) 8 | 9 | func indexPage(w http.ResponseWriter, r *http.Request) { 10 | sess, _ := globalSessions.SessionStart(w, r) // session start 11 | registerBaiduClient(&sess) // 如果没有 baiduClient , 就添加 12 | 13 | // get file contents as string 14 | contents, err := templateFilesBox.String("index.html") 15 | if err != nil { 16 | log.Println(err) 17 | return 18 | } 19 | tmpl, err := template.New("index.html").Parse(contents) 20 | if err != nil { 21 | panic(err) 22 | } 23 | 24 | err = tmpl.Execute(w, Version) 25 | if err != nil { 26 | panic(err) 27 | } 28 | } 29 | 30 | func favicon(w http.ResponseWriter, r *http.Request) { 31 | w.Header().Set("Location", "//www.baidu.com/favicon.ico") 32 | http.Error(w, "", 302) 33 | } 34 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/iikira/Baidu-Login/version.go: -------------------------------------------------------------------------------- 1 | package baidulogin 2 | 3 | const ( 4 | // Version 版本号 5 | Version = "v1.2.1" 6 | ) 7 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/iikira/args/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/iikira/baidu-tools/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .vscode/ 3 | *txt 4 | *.jar 5 | *.aar -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/iikira/baidu-tools/README.md: -------------------------------------------------------------------------------- 1 | # 百度工具箱 2 | [![GoDoc](https://godoc.org/github.com/iikira/baidu-tools?status.svg)](https://godoc.org/github.com/iikira/baidu-tools) -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/iikira/baidu-tools/baidu.go: -------------------------------------------------------------------------------- 1 | package baidu 2 | 3 | // Baidu 百度帐号详细情况 4 | type Baidu struct { 5 | UID uint64 // 百度ID对应的uid 6 | Name string // 真实ID 7 | NameShow string // 显示的用户名(昵称) 8 | Sex string // 性别 9 | Age float64 // 帐号年龄 10 | Auth *Auth 11 | } 12 | 13 | // Auth 百度验证 14 | type Auth struct { 15 | BDUSS string // 百度BDUSS 16 | PTOKEN string 17 | STOKEN string 18 | } 19 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/iikira/baidu-tools/randominfo/phone.go: -------------------------------------------------------------------------------- 1 | package randominfo 2 | 3 | // SumIMEI 根据key计算出imei 4 | func SumIMEI(key string) uint64 { 5 | var hash uint64 = 53202347234687234 6 | for k := range key { 7 | hash += (hash << 5) + uint64(key[k]) 8 | } 9 | hash %= uint64(1e15) 10 | if hash < 1e14 { 11 | hash += 1e14 12 | } 13 | return hash 14 | } 15 | 16 | // GetPhoneModel 根据key, 从PhoneModelDataBase中取出手机型号 17 | func GetPhoneModel(key string) string { 18 | if len(PhoneModelDataBase) <= 0 { 19 | return "S3" 20 | } 21 | var hash uint64 = 2134 22 | for k := range key { 23 | hash += (hash << 4) + uint64(key[k]) 24 | } 25 | hash %= uint64(len(PhoneModelDataBase)) 26 | return PhoneModelDataBase[int(hash)] 27 | } 28 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/iikira/baidu-tools/randominfo/randominfo.go: -------------------------------------------------------------------------------- 1 | // Package randominfo 提供随机信息生成服务 2 | package randominfo 3 | 4 | import ( 5 | "crypto/md5" 6 | cryptorand "crypto/rand" 7 | "encoding/binary" 8 | "encoding/hex" 9 | "strconv" 10 | "strings" 11 | "time" 12 | ) 13 | 14 | // RamdomNumber 返回[min, max]随机数字 15 | func RamdomNumber(min, max uint64) (v uint64) { 16 | if min > max { 17 | min, max = max, min 18 | } 19 | binary.Read(cryptorand.Reader, binary.BigEndian, &v) 20 | return v%(max-min) + min 21 | } 22 | 23 | // RamdomBytes 随机字节数组 24 | func RamdomBytes(n int) []byte { 25 | b := make([]byte, n) 26 | cryptorand.Read(b) 27 | return b 28 | } 29 | 30 | // RamdomMD5String 随机md5字符串 31 | func RamdomMD5String() string { 32 | m := md5.New() 33 | m.Write(RamdomBytes(4)) 34 | m.Write([]byte(strconv.FormatInt(time.Now().UnixNano(), 16))) 35 | return hex.EncodeToString(m.Sum(nil)) 36 | } 37 | 38 | // RamdomMD5UpperString 随机md5字符串, 大写 39 | func RamdomMD5UpperString() string { 40 | return strings.ToUpper(RamdomMD5String()) 41 | } 42 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/iikira/baidu-tools/tieba/tieba.go: -------------------------------------------------------------------------------- 1 | package tieba 2 | 3 | import ( 4 | "github.com/iikira/baidu-tools" 5 | ) 6 | 7 | // Tieba 百度贴吧账号详细情况 8 | type Tieba struct { 9 | Baidu *baidu.Baidu 10 | Tbs string 11 | Stat *Stat 12 | Bars []*Bar //要执行任务的贴吧列表 13 | } 14 | 15 | //Bar 贴吧详情 16 | type Bar struct { 17 | FID string // 贴吧fid 18 | Name string // 名字 19 | Level string // 个人等级 20 | Exp int // 个人经验 21 | } 22 | 23 | // Stat 统计数据 24 | type Stat struct { 25 | LikeForumNum int // 关注的贴吧数 26 | PostNum int // 发言次数 27 | } 28 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/iikira/baidu-tools/version.go: -------------------------------------------------------------------------------- 1 | package baidu 2 | 3 | const ( 4 | // Version 版本号 5 | Version = "v1.0" 6 | ) 7 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/json-iterator/go/.codecov.yml: -------------------------------------------------------------------------------- 1 | ignore: 2 | - "output_tests/.*" 3 | 4 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/json-iterator/go/.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | /bug_test.go 3 | /coverage.txt 4 | /.idea 5 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/json-iterator/go/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.8.x 5 | - 1.x 6 | 7 | before_install: 8 | - go get -t -v ./... 9 | 10 | script: 11 | - ./test.sh 12 | 13 | after_success: 14 | - bash <(curl -s https://codecov.io/bash) 15 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/json-iterator/go/Gopkg.lock: -------------------------------------------------------------------------------- 1 | # This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. 2 | 3 | 4 | [[projects]] 5 | name = "github.com/modern-go/concurrent" 6 | packages = ["."] 7 | revision = "e0a39a4cb4216ea8db28e22a69f4ec25610d513a" 8 | version = "1.0.0" 9 | 10 | [[projects]] 11 | name = "github.com/modern-go/reflect2" 12 | packages = ["."] 13 | revision = "1df9eeb2bb81f327b96228865c5687bc2194af3f" 14 | version = "1.0.0" 15 | 16 | [solve-meta] 17 | analyzer-name = "dep" 18 | analyzer-version = 1 19 | inputs-digest = "ac7003b5a981716353a43055ab7d4c5357403cb30a60de2dbdeb446c1544beaa" 20 | solver-name = "gps-cdcl" 21 | solver-version = 1 22 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/json-iterator/go/Gopkg.toml: -------------------------------------------------------------------------------- 1 | # Gopkg.toml example 2 | # 3 | # Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md 4 | # for detailed Gopkg.toml documentation. 5 | # 6 | # required = ["github.com/user/thing/cmd/thing"] 7 | # ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] 8 | # 9 | # [[constraint]] 10 | # name = "github.com/user/project" 11 | # version = "1.0.0" 12 | # 13 | # [[constraint]] 14 | # name = "github.com/user/project2" 15 | # branch = "dev" 16 | # source = "github.com/myfork/project2" 17 | # 18 | # [[override]] 19 | # name = "github.com/x/y" 20 | # version = "2.4.0" 21 | 22 | ignored = ["github.com/davecgh/go-spew*","github.com/google/gofuzz*","github.com/stretchr/testify*"] 23 | 24 | [[constraint]] 25 | name = "github.com/modern-go/reflect2" 26 | version = "1.0.0" 27 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/json-iterator/go/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | set -x 4 | 5 | if [ ! -d /tmp/build-golang/src/github.com/json-iterator ]; then 6 | mkdir -p /tmp/build-golang/src/github.com/json-iterator 7 | ln -s $PWD /tmp/build-golang/src/github.com/json-iterator/go 8 | fi 9 | export GOPATH=/tmp/build-golang 10 | go get -u github.com/golang/dep/cmd/dep 11 | cd /tmp/build-golang/src/github.com/json-iterator/go 12 | exec $GOPATH/bin/dep ensure -update 13 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/json-iterator/go/fuzzy_mode_convert_table.md: -------------------------------------------------------------------------------- 1 | | json type \ dest type | bool | int | uint | float |string| 2 | | --- | --- | --- | --- |--|--| 3 | | number | positive => true
negative => true
zero => false| 23.2 => 23
-32.1 => -32| 12.1 => 12
-12.1 => 0|as normal|same as origin| 4 | | string | empty string => false
string "0" => false
other strings => true | "123.32" => 123
"-123.4" => -123
"123.23xxxw" => 123
"abcde12" => 0
"-32.1" => -32| 13.2 => 13
-1.1 => 0 |12.1 => 12.1
-12.3 => -12.3
12.4xxa => 12.4
+1.1e2 =>110 |same as origin| 5 | | bool | true => true
false => false| true => 1
false => 0 | true => 1
false => 0 |true => 1
false => 0|true => "true"
false => "false"| 6 | | object | true | 0 | 0 |0|originnal json| 7 | | array | empty array => false
nonempty array => true| [] => 0
[1,2] => 1 | [] => 0
[1,2] => 1 |[] => 0
[1,2] => 1|original json| -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/json-iterator/go/jsoniter.go: -------------------------------------------------------------------------------- 1 | // Package jsoniter implements encoding and decoding of JSON as defined in 2 | // RFC 4627 and provides interfaces with identical syntax of standard lib encoding/json. 3 | // Converting from encoding/json to jsoniter is no more than replacing the package with jsoniter 4 | // and variable type declarations (if any). 5 | // jsoniter interfaces gives 100% compatibility with code using standard lib. 6 | // 7 | // "JSON and Go" 8 | // (https://golang.org/doc/articles/json_and_go.html) 9 | // gives a description of how Marshal/Unmarshal operate 10 | // between arbitrary or predefined json objects and bytes, 11 | // and it applies to jsoniter.Marshal/Unmarshal as well. 12 | // 13 | // Besides, jsoniter.Iterator provides a different set of interfaces 14 | // iterating given bytes/string/reader 15 | // and yielding parsed elements one by one. 16 | // This set of interfaces reads input as required and gives 17 | // better performance. 18 | package jsoniter 19 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/json-iterator/go/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | echo "" > coverage.txt 5 | 6 | for d in $(go list ./... | grep -v vendor); do 7 | go test -coverprofile=profile.out -coverpkg=github.com/json-iterator/go $d 8 | if [ -f profile.out ]; then 9 | cat profile.out >> coverage.txt 10 | rm profile.out 11 | fi 12 | done 13 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/kardianos/osext/README.md: -------------------------------------------------------------------------------- 1 | ### Extensions to the "os" package. 2 | 3 | [![GoDoc](https://godoc.org/github.com/kardianos/osext?status.svg)](https://godoc.org/github.com/kardianos/osext) 4 | 5 | ## Find the current Executable and ExecutableFolder. 6 | 7 | As of go1.8 the Executable function may be found in `os`. The Executable function 8 | in the std lib `os` package is used if available. 9 | 10 | There is sometimes utility in finding the current executable file 11 | that is running. This can be used for upgrading the current executable 12 | or finding resources located relative to the executable file. Both 13 | working directory and the os.Args[0] value are arbitrary and cannot 14 | be relied on; os.Args[0] can be "faked". 15 | 16 | Multi-platform and supports: 17 | * Linux 18 | * OS X 19 | * Windows 20 | * Plan 9 21 | * BSDs. 22 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/kardianos/osext/osext.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Extensions to the standard "os" package. 6 | package osext // import "github.com/kardianos/osext" 7 | 8 | import "path/filepath" 9 | 10 | var cx, ce = executableClean() 11 | 12 | func executableClean() (string, error) { 13 | p, err := executable() 14 | return filepath.Clean(p), err 15 | } 16 | 17 | // Executable returns an absolute path that can be used to 18 | // re-invoke the current program. 19 | // It may not be valid after the current program exits. 20 | func Executable() (string, error) { 21 | return cx, ce 22 | } 23 | 24 | // Returns same path as Executable, returns just the folder 25 | // path. Excludes the executable name and any trailing slash. 26 | func ExecutableFolder() (string, error) { 27 | p, err := Executable() 28 | if err != nil { 29 | return "", err 30 | } 31 | 32 | return filepath.Dir(p), nil 33 | } 34 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/kardianos/osext/osext_go18.go: -------------------------------------------------------------------------------- 1 | //+build go1.8,!openbsd 2 | 3 | package osext 4 | 5 | import "os" 6 | 7 | func executable() (string, error) { 8 | return os.Executable() 9 | } 10 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/kardianos/osext/osext_plan9.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //+build !go1.8 6 | 7 | package osext 8 | 9 | import ( 10 | "os" 11 | "strconv" 12 | "syscall" 13 | ) 14 | 15 | func executable() (string, error) { 16 | f, err := os.Open("/proc/" + strconv.Itoa(os.Getpid()) + "/text") 17 | if err != nil { 18 | return "", err 19 | } 20 | defer f.Close() 21 | return syscall.Fd2path(int(f.Fd())) 22 | } 23 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/kardianos/osext/osext_procfs.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !go1.8,android !go1.8,linux !go1.8,netbsd !go1.8,solaris !go1.8,dragonfly 6 | 7 | package osext 8 | 9 | import ( 10 | "errors" 11 | "fmt" 12 | "os" 13 | "runtime" 14 | "strings" 15 | ) 16 | 17 | func executable() (string, error) { 18 | switch runtime.GOOS { 19 | case "linux", "android": 20 | const deletedTag = " (deleted)" 21 | execpath, err := os.Readlink("/proc/self/exe") 22 | if err != nil { 23 | return execpath, err 24 | } 25 | execpath = strings.TrimSuffix(execpath, deletedTag) 26 | execpath = strings.TrimPrefix(execpath, deletedTag) 27 | return execpath, nil 28 | case "netbsd": 29 | return os.Readlink("/proc/curproc/exe") 30 | case "dragonfly": 31 | return os.Readlink("/proc/curproc/file") 32 | case "solaris": 33 | return os.Readlink(fmt.Sprintf("/proc/%d/path/a.out", os.Getpid())) 34 | } 35 | return "", errors.New("ExecPath not implemented for " + runtime.GOOS) 36 | } 37 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/kardianos/osext/osext_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //+build !go1.8 6 | 7 | package osext 8 | 9 | import ( 10 | "syscall" 11 | "unicode/utf16" 12 | "unsafe" 13 | ) 14 | 15 | var ( 16 | kernel = syscall.MustLoadDLL("kernel32.dll") 17 | getModuleFileNameProc = kernel.MustFindProc("GetModuleFileNameW") 18 | ) 19 | 20 | // GetModuleFileName() with hModule = NULL 21 | func executable() (exePath string, err error) { 22 | return getModuleFileName() 23 | } 24 | 25 | func getModuleFileName() (string, error) { 26 | var n uint32 27 | b := make([]uint16, syscall.MAX_PATH) 28 | size := uint32(len(b)) 29 | 30 | r0, _, e1 := getModuleFileNameProc.Call(0, uintptr(unsafe.Pointer(&b[0])), uintptr(size)) 31 | n = uint32(r0) 32 | if n == 0 { 33 | return "", e1 34 | } 35 | return string(utf16.Decode(b[0:n])), nil 36 | } 37 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/mattn/go-runewidth/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - tip 4 | before_install: 5 | - go get github.com/mattn/goveralls 6 | - go get golang.org/x/tools/cmd/cover 7 | script: 8 | - $HOME/gopath/bin/goveralls -repotoken lAKAWPzcGsD3A8yBX3BGGtRUdJ6CaGERL 9 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/mattn/go-runewidth/README.mkd: -------------------------------------------------------------------------------- 1 | go-runewidth 2 | ============ 3 | 4 | [![Build Status](https://travis-ci.org/mattn/go-runewidth.png?branch=master)](https://travis-ci.org/mattn/go-runewidth) 5 | [![Coverage Status](https://coveralls.io/repos/mattn/go-runewidth/badge.png?branch=HEAD)](https://coveralls.io/r/mattn/go-runewidth?branch=HEAD) 6 | [![GoDoc](https://godoc.org/github.com/mattn/go-runewidth?status.svg)](http://godoc.org/github.com/mattn/go-runewidth) 7 | [![Go Report Card](https://goreportcard.com/badge/github.com/mattn/go-runewidth)](https://goreportcard.com/report/github.com/mattn/go-runewidth) 8 | 9 | Provides functions to get fixed width of the character or string. 10 | 11 | Usage 12 | ----- 13 | 14 | ```go 15 | runewidth.StringWidth("つのだ☆HIRO") == 12 16 | ``` 17 | 18 | 19 | Author 20 | ------ 21 | 22 | Yasuhiro Matsumoto 23 | 24 | License 25 | ------- 26 | 27 | under the MIT License: http://mattn.mit-license.org/2013 28 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/mattn/go-runewidth/runewidth_js.go: -------------------------------------------------------------------------------- 1 | // +build js 2 | 3 | package runewidth 4 | 5 | func IsEastAsian() bool { 6 | // TODO: Implement this for the web. Detect east asian in a compatible way, and return true. 7 | return false 8 | } 9 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/mattn/go-runewidth/runewidth_windows.go: -------------------------------------------------------------------------------- 1 | package runewidth 2 | 3 | import ( 4 | "syscall" 5 | ) 6 | 7 | var ( 8 | kernel32 = syscall.NewLazyDLL("kernel32") 9 | procGetConsoleOutputCP = kernel32.NewProc("GetConsoleOutputCP") 10 | ) 11 | 12 | // IsEastAsian return true if the current locale is CJK 13 | func IsEastAsian() bool { 14 | r1, _, _ := procGetConsoleOutputCP.Call() 15 | if r1 == 0 { 16 | return false 17 | } 18 | 19 | switch int(r1) { 20 | case 932, 51932, 936, 949, 950: 21 | return true 22 | } 23 | 24 | return false 25 | } 26 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/concurrent/.gitignore: -------------------------------------------------------------------------------- 1 | /coverage.txt 2 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/concurrent/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.8.x 5 | - 1.x 6 | 7 | before_install: 8 | - go get -t -v ./... 9 | 10 | script: 11 | - ./test.sh 12 | 13 | after_success: 14 | - bash <(curl -s https://codecov.io/bash) 15 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/concurrent/executor.go: -------------------------------------------------------------------------------- 1 | package concurrent 2 | 3 | import "context" 4 | 5 | // Executor replace go keyword to start a new goroutine 6 | // the goroutine should cancel itself if the context passed in has been cancelled 7 | // the goroutine started by the executor, is owned by the executor 8 | // we can cancel all executors owned by the executor just by stop the executor itself 9 | // however Executor interface does not Stop method, the one starting and owning executor 10 | // should use the concrete type of executor, instead of this interface. 11 | type Executor interface { 12 | // Go starts a new goroutine controlled by the context 13 | Go(handler func(ctx context.Context)) 14 | } 15 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/concurrent/go_above_19.go: -------------------------------------------------------------------------------- 1 | //+build go1.9 2 | 3 | package concurrent 4 | 5 | import "sync" 6 | 7 | // Map is a wrapper for sync.Map introduced in go1.9 8 | type Map struct { 9 | sync.Map 10 | } 11 | 12 | // NewMap creates a thread safe Map 13 | func NewMap() *Map { 14 | return &Map{} 15 | } 16 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/concurrent/go_below_19.go: -------------------------------------------------------------------------------- 1 | //+build !go1.9 2 | 3 | package concurrent 4 | 5 | import "sync" 6 | 7 | // Map implements a thread safe map for go version below 1.9 using mutex 8 | type Map struct { 9 | lock sync.RWMutex 10 | data map[interface{}]interface{} 11 | } 12 | 13 | // NewMap creates a thread safe map 14 | func NewMap() *Map { 15 | return &Map{ 16 | data: make(map[interface{}]interface{}, 32), 17 | } 18 | } 19 | 20 | // Load is same as sync.Map Load 21 | func (m *Map) Load(key interface{}) (elem interface{}, found bool) { 22 | m.lock.RLock() 23 | elem, found = m.data[key] 24 | m.lock.RUnlock() 25 | return 26 | } 27 | 28 | // Load is same as sync.Map Store 29 | func (m *Map) Store(key interface{}, elem interface{}) { 30 | m.lock.Lock() 31 | m.data[key] = elem 32 | m.lock.Unlock() 33 | } 34 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/concurrent/log.go: -------------------------------------------------------------------------------- 1 | package concurrent 2 | 3 | import ( 4 | "os" 5 | "log" 6 | "io/ioutil" 7 | ) 8 | 9 | // ErrorLogger is used to print out error, can be set to writer other than stderr 10 | var ErrorLogger = log.New(os.Stderr, "", 0) 11 | 12 | // InfoLogger is used to print informational message, default to off 13 | var InfoLogger = log.New(ioutil.Discard, "", 0) -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/concurrent/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | echo "" > coverage.txt 5 | 6 | for d in $(go list ./... | grep -v vendor); do 7 | go test -coverprofile=profile.out -coverpkg=github.com/modern-go/concurrent $d 8 | if [ -f profile.out ]; then 9 | cat profile.out >> coverage.txt 10 | rm profile.out 11 | fi 12 | done 13 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/reflect2/.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/reflect2/Gopkg.lock: -------------------------------------------------------------------------------- 1 | # This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. 2 | 3 | 4 | [[projects]] 5 | name = "github.com/modern-go/concurrent" 6 | packages = ["."] 7 | revision = "e0a39a4cb4216ea8db28e22a69f4ec25610d513a" 8 | version = "1.0.0" 9 | 10 | [solve-meta] 11 | analyzer-name = "dep" 12 | analyzer-version = 1 13 | inputs-digest = "daee8a88b3498b61c5640056665b8b9eea062006f5e596bbb6a3ed9119a11ec7" 14 | solver-name = "gps-cdcl" 15 | solver-version = 1 16 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/reflect2/Gopkg.toml: -------------------------------------------------------------------------------- 1 | # Gopkg.toml example 2 | # 3 | # Refer to https://golang.github.io/dep/docs/Gopkg.toml.html 4 | # for detailed Gopkg.toml documentation. 5 | # 6 | # required = ["github.com/user/thing/cmd/thing"] 7 | # ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] 8 | # 9 | # [[constraint]] 10 | # name = "github.com/user/project" 11 | # version = "1.0.0" 12 | # 13 | # [[constraint]] 14 | # name = "github.com/user/project2" 15 | # branch = "dev" 16 | # source = "github.com/myfork/project2" 17 | # 18 | # [[override]] 19 | # name = "github.com/x/y" 20 | # version = "2.4.0" 21 | # 22 | # [prune] 23 | # non-go = false 24 | # go-tests = true 25 | # unused-packages = true 26 | 27 | ignored = ["github.com/modern-go/test","github.com/modern-go/test/must","github.com/modern-go/test/should"] 28 | 29 | [[constraint]] 30 | name = "github.com/modern-go/concurrent" 31 | version = "1.0.0" 32 | 33 | [prune] 34 | go-tests = true 35 | unused-packages = true 36 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/reflect2/README.md: -------------------------------------------------------------------------------- 1 | # reflect2 2 | reflect api that avoids runtime reflect.Value cost 3 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/reflect2/go_above_17.go: -------------------------------------------------------------------------------- 1 | //+build go1.7 2 | 3 | package reflect2 4 | 5 | import "unsafe" 6 | 7 | //go:linkname resolveTypeOff reflect.resolveTypeOff 8 | func resolveTypeOff(rtype unsafe.Pointer, off int32) unsafe.Pointer 9 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/reflect2/go_above_19.go: -------------------------------------------------------------------------------- 1 | //+build go1.9 2 | 3 | package reflect2 4 | 5 | import ( 6 | "unsafe" 7 | ) 8 | 9 | //go:linkname makemap reflect.makemap 10 | func makemap(rtype unsafe.Pointer, cap int) (m unsafe.Pointer) 11 | 12 | func makeMapWithSize(rtype unsafe.Pointer, cap int) unsafe.Pointer { 13 | return makemap(rtype, cap) 14 | } 15 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/reflect2/go_below_17.go: -------------------------------------------------------------------------------- 1 | //+build !go1.7 2 | 3 | package reflect2 4 | 5 | import "unsafe" 6 | 7 | func resolveTypeOff(rtype unsafe.Pointer, off int32) unsafe.Pointer { 8 | return nil 9 | } -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/reflect2/go_below_19.go: -------------------------------------------------------------------------------- 1 | //+build !go1.9 2 | 3 | package reflect2 4 | 5 | import ( 6 | "unsafe" 7 | ) 8 | 9 | //go:linkname makemap reflect.makemap 10 | func makemap(rtype unsafe.Pointer) (m unsafe.Pointer) 11 | 12 | func makeMapWithSize(rtype unsafe.Pointer, cap int) unsafe.Pointer { 13 | return makemap(rtype) 14 | } 15 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/reflect2/reflect2_amd64.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/reflect2/reflect2_amd64.s -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/reflect2/reflect2_kind.go: -------------------------------------------------------------------------------- 1 | package reflect2 2 | 3 | import ( 4 | "reflect" 5 | "unsafe" 6 | ) 7 | 8 | // DefaultTypeOfKind return the non aliased default type for the kind 9 | func DefaultTypeOfKind(kind reflect.Kind) Type { 10 | return kindTypes[kind] 11 | } 12 | 13 | var kindTypes = map[reflect.Kind]Type{ 14 | reflect.Bool: TypeOf(true), 15 | reflect.Uint8: TypeOf(uint8(0)), 16 | reflect.Int8: TypeOf(int8(0)), 17 | reflect.Uint16: TypeOf(uint16(0)), 18 | reflect.Int16: TypeOf(int16(0)), 19 | reflect.Uint32: TypeOf(uint32(0)), 20 | reflect.Int32: TypeOf(int32(0)), 21 | reflect.Uint64: TypeOf(uint64(0)), 22 | reflect.Int64: TypeOf(int64(0)), 23 | reflect.Uint: TypeOf(uint(0)), 24 | reflect.Int: TypeOf(int(0)), 25 | reflect.Float32: TypeOf(float32(0)), 26 | reflect.Float64: TypeOf(float64(0)), 27 | reflect.Uintptr: TypeOf(uintptr(0)), 28 | reflect.String: TypeOf(""), 29 | reflect.UnsafePointer: TypeOf(unsafe.Pointer(nil)), 30 | } -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/reflect2/relfect2_386.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/reflect2/relfect2_386.s -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/reflect2/relfect2_amd64p32.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/reflect2/relfect2_amd64p32.s -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/reflect2/relfect2_arm.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/reflect2/relfect2_arm.s -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/reflect2/relfect2_arm64.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/reflect2/relfect2_arm64.s -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/reflect2/relfect2_mips64x.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/reflect2/relfect2_mips64x.s -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/reflect2/relfect2_mipsx.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/reflect2/relfect2_mipsx.s -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/reflect2/relfect2_ppc64x.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/reflect2/relfect2_ppc64x.s -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/reflect2/relfect2_s390x.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/reflect2/relfect2_s390x.s -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/modern-go/reflect2/safe_struct.go: -------------------------------------------------------------------------------- 1 | package reflect2 2 | 3 | type safeStructType struct { 4 | safeType 5 | } 6 | 7 | func (type2 *safeStructType) FieldByName(name string) StructField { 8 | field, found := type2.Type.FieldByName(name) 9 | if !found { 10 | panic("field " + name + " not found") 11 | } 12 | return &safeField{StructField: field} 13 | } -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/olekukonko/tablewriter/.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | ### Go template 3 | # Binaries for programs and plugins 4 | *.exe 5 | *.exe~ 6 | *.dll 7 | *.so 8 | *.dylib 9 | 10 | # Test binary, build with `go test -c` 11 | *.test 12 | 13 | # Output of the go coverage tool, specifically when used with LiteIDE 14 | *.out 15 | 16 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/olekukonko/tablewriter/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.1 5 | - 1.2 6 | - 1.3 7 | - 1.4 8 | - 1.5 9 | - 1.6 10 | - 1.7 11 | - 1.8 12 | - tip 13 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/peterh/liner/bsdinput.go: -------------------------------------------------------------------------------- 1 | // +build openbsd freebsd netbsd 2 | 3 | package liner 4 | 5 | import "syscall" 6 | 7 | const ( 8 | getTermios = syscall.TIOCGETA 9 | setTermios = syscall.TIOCSETA 10 | ) 11 | 12 | const ( 13 | // Input flags 14 | inpck = 0x010 15 | istrip = 0x020 16 | icrnl = 0x100 17 | ixon = 0x200 18 | 19 | // Output flags 20 | opost = 0x1 21 | 22 | // Control flags 23 | cs8 = 0x300 24 | 25 | // Local flags 26 | isig = 0x080 27 | icanon = 0x100 28 | iexten = 0x400 29 | ) 30 | 31 | type termios struct { 32 | Iflag uint32 33 | Oflag uint32 34 | Cflag uint32 35 | Lflag uint32 36 | Cc [20]byte 37 | Ispeed int32 38 | Ospeed int32 39 | } 40 | 41 | const cursorColumn = false 42 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/peterh/liner/input_darwin.go: -------------------------------------------------------------------------------- 1 | // +build darwin 2 | 3 | package liner 4 | 5 | import "syscall" 6 | 7 | const ( 8 | getTermios = syscall.TIOCGETA 9 | setTermios = syscall.TIOCSETA 10 | ) 11 | 12 | const ( 13 | // Input flags 14 | inpck = 0x010 15 | istrip = 0x020 16 | icrnl = 0x100 17 | ixon = 0x200 18 | 19 | // Output flags 20 | opost = 0x1 21 | 22 | // Control flags 23 | cs8 = 0x300 24 | 25 | // Local flags 26 | isig = 0x080 27 | icanon = 0x100 28 | iexten = 0x400 29 | ) 30 | 31 | type termios struct { 32 | Iflag uintptr 33 | Oflag uintptr 34 | Cflag uintptr 35 | Lflag uintptr 36 | Cc [20]byte 37 | Ispeed uintptr 38 | Ospeed uintptr 39 | } 40 | 41 | // Terminal.app needs a column for the cursor when the input line is at the 42 | // bottom of the window. 43 | const cursorColumn = true 44 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/peterh/liner/input_linux.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | 3 | package liner 4 | 5 | import "syscall" 6 | 7 | const ( 8 | getTermios = syscall.TCGETS 9 | setTermios = syscall.TCSETS 10 | ) 11 | 12 | const ( 13 | icrnl = syscall.ICRNL 14 | inpck = syscall.INPCK 15 | istrip = syscall.ISTRIP 16 | ixon = syscall.IXON 17 | opost = syscall.OPOST 18 | cs8 = syscall.CS8 19 | isig = syscall.ISIG 20 | icanon = syscall.ICANON 21 | iexten = syscall.IEXTEN 22 | ) 23 | 24 | type termios struct { 25 | syscall.Termios 26 | } 27 | 28 | const cursorColumn = false 29 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/peterh/liner/unixmode.go: -------------------------------------------------------------------------------- 1 | // +build linux darwin freebsd openbsd netbsd 2 | 3 | package liner 4 | 5 | import ( 6 | "syscall" 7 | "unsafe" 8 | ) 9 | 10 | func (mode *termios) ApplyMode() error { 11 | _, _, errno := syscall.Syscall(syscall.SYS_IOCTL, uintptr(syscall.Stdin), setTermios, uintptr(unsafe.Pointer(mode))) 12 | 13 | if errno != 0 { 14 | return errno 15 | } 16 | return nil 17 | } 18 | 19 | // TerminalMode returns the current terminal input mode as an InputModeSetter. 20 | // 21 | // This function is provided for convenience, and should 22 | // not be necessary for most users of liner. 23 | func TerminalMode() (ModeApplier, error) { 24 | mode, errno := getMode(syscall.Stdin) 25 | 26 | if errno != 0 { 27 | return nil, errno 28 | } 29 | return mode, nil 30 | } 31 | 32 | func getMode(handle int) (*termios, syscall.Errno) { 33 | var mode termios 34 | _, _, errno := syscall.Syscall(syscall.SYS_IOCTL, uintptr(handle), getTermios, uintptr(unsafe.Pointer(&mode))) 35 | 36 | return &mode, errno 37 | } 38 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/shiena/ansicolor/.gitignore: -------------------------------------------------------------------------------- 1 | # Created by http://www.gitignore.io 2 | 3 | ### Go ### 4 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 5 | *.o 6 | *.a 7 | *.so 8 | 9 | # Folders 10 | _obj 11 | _test 12 | 13 | # Architecture specific extensions/prefixes 14 | *.[568vq] 15 | [568vq].out 16 | 17 | *.cgo1.go 18 | *.cgo2.c 19 | _cgo_defun.c 20 | _cgo_gotypes.go 21 | _cgo_export.* 22 | 23 | _testmain.go 24 | 25 | *.exe 26 | *.test 27 | 28 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/shiena/ansicolor/ansicolor_ansi.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 shiena Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !windows 6 | 7 | package ansicolor 8 | 9 | import "io" 10 | 11 | type ansiColorWriter struct { 12 | w io.Writer 13 | mode outputMode 14 | } 15 | 16 | func (cw *ansiColorWriter) Write(p []byte) (int, error) { 17 | return cw.w.Write(p) 18 | } 19 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/urfave/cli/.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | max-line-length = 120 3 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/urfave/cli/.gitignore: -------------------------------------------------------------------------------- 1 | *.coverprofile 2 | node_modules/ 3 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/urfave/cli/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | dist: trusty 4 | osx_image: xcode8.3 5 | go: 1.8.x 6 | 7 | os: 8 | - linux 9 | - osx 10 | 11 | cache: 12 | directories: 13 | - node_modules 14 | 15 | before_script: 16 | - go get github.com/urfave/gfmrun/... || true 17 | - go get golang.org/x/tools/cmd/goimports 18 | - if [ ! -f node_modules/.bin/markdown-toc ] ; then 19 | npm install markdown-toc ; 20 | fi 21 | 22 | script: 23 | - ./runtests gen 24 | - ./runtests vet 25 | - ./runtests test 26 | - ./runtests gfmrun 27 | - ./runtests toc 28 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/urfave/cli/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | 3 | os: Windows Server 2016 4 | 5 | image: Visual Studio 2017 6 | 7 | clone_folder: c:\gopath\src\github.com\urfave\cli 8 | 9 | environment: 10 | GOPATH: C:\gopath 11 | GOVERSION: 1.8.x 12 | PYTHON: C:\Python36-x64 13 | PYTHON_VERSION: 3.6.x 14 | PYTHON_ARCH: 64 15 | 16 | install: 17 | - set PATH=%GOPATH%\bin;C:\go\bin;%PATH% 18 | - go version 19 | - go env 20 | - go get github.com/urfave/gfmrun/... 21 | - go get -v -t ./... 22 | 23 | build_script: 24 | - python runtests vet 25 | - python runtests test 26 | - python runtests gfmrun 27 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/BaiduPCS-Go/vendor/github.com/urfave/cli/cli.go: -------------------------------------------------------------------------------- 1 | // Package cli provides a minimal framework for creating and organizing command line 2 | // Go applications. cli is designed to be easy to understand and write, the most simple 3 | // cli application can be written as follows: 4 | // func main() { 5 | // cli.NewApp().Run(os.Args) 6 | // } 7 | // 8 | // Of course this application does not do much, so let's make this an actual application: 9 | // func main() { 10 | // app := cli.NewApp() 11 | // app.Name = "greet" 12 | // app.Usage = "say a greeting" 13 | // app.Action = func(c *cli.Context) error { 14 | // println("Greetings") 15 | // return nil 16 | // } 17 | // 18 | // app.Run(os.Args) 19 | // } 20 | package cli 21 | 22 | //go:generate python ./generate-flag-types cli -i flag-types.json -o flag_generated.go 23 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/args/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/baidu-tools/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .vscode/ 3 | *txt 4 | *.jar 5 | *.aar -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/baidu-tools/README.md: -------------------------------------------------------------------------------- 1 | # 百度工具箱 2 | [![GoDoc](https://godoc.org/github.com/iikira/baidu-tools?status.svg)](https://godoc.org/github.com/iikira/baidu-tools) -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/baidu-tools/baidu.go: -------------------------------------------------------------------------------- 1 | package baidu 2 | 3 | // Baidu 百度帐号详细情况 4 | type Baidu struct { 5 | UID uint64 // 百度ID对应的uid 6 | Name string // 真实ID 7 | NameShow string // 显示的用户名(昵称) 8 | Sex string // 性别 9 | Age float64 // 帐号年龄 10 | Auth *Auth 11 | } 12 | 13 | // Auth 百度验证 14 | type Auth struct { 15 | BDUSS string // 百度BDUSS 16 | PTOKEN string 17 | STOKEN string 18 | } 19 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/baidu-tools/ramdominfo/phone.go: -------------------------------------------------------------------------------- 1 | package ramdominfo 2 | 3 | // SumIMEI 根据key计算出imei 4 | func SumIMEI(key string) uint64 { 5 | var hash uint64 = 53202347234687234 6 | for k := range key { 7 | hash += (hash << 5) + uint64(key[k]) 8 | } 9 | hash %= uint64(1e15) 10 | if hash < 1e14 { 11 | hash += 1e14 12 | } 13 | return hash 14 | } 15 | 16 | // GetPhoneModel 根据key, 从PhoneModelDataBase中取出手机型号 17 | func GetPhoneModel(key string) string { 18 | if len(PhoneModelDataBase) <= 0 { 19 | return "S3" 20 | } 21 | var hash uint64 = 2134 22 | for k := range key { 23 | hash += (hash << 4) + uint64(key[k]) 24 | } 25 | hash %= uint64(len(PhoneModelDataBase)) 26 | return PhoneModelDataBase[int(hash)] 27 | } 28 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/baidu-tools/ramdominfo/randominfo.go: -------------------------------------------------------------------------------- 1 | // Package ramdominfo 提供随机信息生成服务 2 | package ramdominfo 3 | 4 | import ( 5 | "crypto/md5" 6 | cryptorand "crypto/rand" 7 | "encoding/binary" 8 | "encoding/hex" 9 | "strconv" 10 | "strings" 11 | "time" 12 | ) 13 | 14 | // RamdomNumber 返回[min, max]随机数字 15 | func RamdomNumber(min, max uint64) (v uint64) { 16 | if min > max { 17 | min, max = max, min 18 | } 19 | binary.Read(cryptorand.Reader, binary.BigEndian, &v) 20 | return v%(max-min) + min 21 | } 22 | 23 | // RamdomBytes 随机字节数组 24 | func RamdomBytes(n int) []byte { 25 | b := make([]byte, n) 26 | cryptorand.Read(b) 27 | return b 28 | } 29 | 30 | // RamdomMD5String 随机md5字符串 31 | func RamdomMD5String() string { 32 | m := md5.New() 33 | m.Write(RamdomBytes(4)) 34 | m.Write([]byte(strconv.FormatInt(time.Now().UnixNano(), 16))) 35 | return hex.EncodeToString(m.Sum(nil)) 36 | } 37 | 38 | // RamdomMD5UpperString 随机md5字符串, 大写 39 | func RamdomMD5UpperString() string { 40 | return strings.ToUpper(RamdomMD5String()) 41 | } 42 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/baidu-tools/tieba/tieba.go: -------------------------------------------------------------------------------- 1 | package tieba 2 | 3 | import ( 4 | "github.com/iikira/baidu-tools" 5 | ) 6 | 7 | // Tieba 百度贴吧账号详细情况 8 | type Tieba struct { 9 | Baidu *baidu.Baidu 10 | Tbs string 11 | Stat *Stat 12 | Bars []*Bar //要执行任务的贴吧列表 13 | } 14 | 15 | //Bar 贴吧详情 16 | type Bar struct { 17 | FID string // 贴吧fid 18 | Name string // 名字 19 | Level string // 个人等级 20 | Exp int // 个人经验 21 | } 22 | 23 | // Stat 统计数据 24 | type Stat struct { 25 | LikeForumNum int // 关注的贴吧数 26 | PostNum int // 发言次数 27 | } 28 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/baidu-tools/version.go: -------------------------------------------------------------------------------- 1 | package baidu 2 | 3 | const ( 4 | // Version 版本号 5 | Version = "v1.0" 6 | ) 7 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/osext/README.md: -------------------------------------------------------------------------------- 1 | ### Extensions to the "os" package. 2 | 3 | [![GoDoc](https://godoc.org/github.com/kardianos/osext?status.svg)](https://godoc.org/github.com/kardianos/osext) 4 | 5 | ## Find the current Executable and ExecutableFolder. 6 | 7 | As of go1.8 the Executable function may be found in `os`. The Executable function 8 | in the std lib `os` package is used if available. 9 | 10 | There is sometimes utility in finding the current executable file 11 | that is running. This can be used for upgrading the current executable 12 | or finding resources located relative to the executable file. Both 13 | working directory and the os.Args[0] value are arbitrary and cannot 14 | be relied on; os.Args[0] can be "faked". 15 | 16 | Multi-platform and supports: 17 | * Linux 18 | * OS X 19 | * Windows 20 | * Plan 9 21 | * BSDs. 22 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/osext/osext.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Extensions to the standard "os" package. 6 | package osext 7 | 8 | import "path/filepath" 9 | 10 | var cx, ce = executableClean() 11 | 12 | func executableClean() (string, error) { 13 | p, err := executable() 14 | return filepath.Clean(p), err 15 | } 16 | 17 | // Executable returns an absolute path that can be used to 18 | // re-invoke the current program. 19 | // It may not be valid after the current program exits. 20 | func Executable() (string, error) { 21 | return cx, ce 22 | } 23 | 24 | // Returns same path as Executable, returns just the folder 25 | // path. Excludes the executable name and any trailing slash. 26 | func ExecutableFolder() (string, error) { 27 | p, err := Executable() 28 | if err != nil { 29 | return "", err 30 | } 31 | 32 | return filepath.Dir(p), nil 33 | } 34 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/osext/osext_go18.go: -------------------------------------------------------------------------------- 1 | //+build go1.8,!openbsd 2 | 3 | package osext 4 | 5 | import ( 6 | "os" 7 | "path/filepath" 8 | ) 9 | 10 | func executable() (string, error) { 11 | p, err := os.Executable() 12 | if err != nil { 13 | return "", err 14 | } 15 | return filepath.EvalSymlinks(p) 16 | } 17 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/osext/osext_plan9.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //+build !go1.8 6 | 7 | package osext 8 | 9 | import ( 10 | "os" 11 | "strconv" 12 | "syscall" 13 | ) 14 | 15 | func executable() (string, error) { 16 | f, err := os.Open("/proc/" + strconv.Itoa(os.Getpid()) + "/text") 17 | if err != nil { 18 | return "", err 19 | } 20 | defer f.Close() 21 | return syscall.Fd2path(int(f.Fd())) 22 | } 23 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/osext/osext_procfs.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !go1.8,android !go1.8,linux !go1.8,netbsd !go1.8,solaris !go1.8,dragonfly 6 | 7 | package osext 8 | 9 | import ( 10 | "errors" 11 | "fmt" 12 | "os" 13 | "runtime" 14 | "strings" 15 | ) 16 | 17 | func executable() (string, error) { 18 | switch runtime.GOOS { 19 | case "linux", "android": 20 | const deletedTag = " (deleted)" 21 | execpath, err := os.Readlink("/proc/self/exe") 22 | if err != nil { 23 | return execpath, err 24 | } 25 | execpath = strings.TrimSuffix(execpath, deletedTag) 26 | execpath = strings.TrimPrefix(execpath, deletedTag) 27 | return execpath, nil 28 | case "netbsd": 29 | return os.Readlink("/proc/curproc/exe") 30 | case "dragonfly": 31 | return os.Readlink("/proc/curproc/file") 32 | case "solaris": 33 | return os.Readlink(fmt.Sprintf("/proc/%d/path/a.out", os.Getpid())) 34 | } 35 | return "", errors.New("ExecPath not implemented for " + runtime.GOOS) 36 | } 37 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/iikira/osext/osext_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //+build !go1.8 6 | 7 | package osext 8 | 9 | import ( 10 | "syscall" 11 | "unicode/utf16" 12 | "unsafe" 13 | ) 14 | 15 | var ( 16 | kernel = syscall.MustLoadDLL("kernel32.dll") 17 | getModuleFileNameProc = kernel.MustFindProc("GetModuleFileNameW") 18 | ) 19 | 20 | // GetModuleFileName() with hModule = NULL 21 | func executable() (exePath string, err error) { 22 | return getModuleFileName() 23 | } 24 | 25 | func getModuleFileName() (string, error) { 26 | var n uint32 27 | b := make([]uint16, syscall.MAX_PATH) 28 | size := uint32(len(b)) 29 | 30 | r0, _, e1 := getModuleFileNameProc.Call(0, uintptr(unsafe.Pointer(&b[0])), uintptr(size)) 31 | n = uint32(r0) 32 | if n == 0 { 33 | return "", e1 34 | } 35 | return string(utf16.Decode(b[0:n])), nil 36 | } 37 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/json-iterator/go/.codecov.yml: -------------------------------------------------------------------------------- 1 | ignore: 2 | - "output_tests/.*" 3 | 4 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/json-iterator/go/.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | /bug_test.go 3 | /coverage.txt 4 | /.idea 5 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/json-iterator/go/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.8.x 5 | - 1.x 6 | 7 | before_install: 8 | - go get -t -v ./... 9 | 10 | script: 11 | - ./test.sh 12 | 13 | after_success: 14 | - bash <(curl -s https://codecov.io/bash) 15 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/json-iterator/go/Gopkg.lock: -------------------------------------------------------------------------------- 1 | # This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. 2 | 3 | 4 | [[projects]] 5 | name = "github.com/modern-go/concurrent" 6 | packages = ["."] 7 | revision = "e0a39a4cb4216ea8db28e22a69f4ec25610d513a" 8 | version = "1.0.0" 9 | 10 | [[projects]] 11 | name = "github.com/modern-go/reflect2" 12 | packages = ["."] 13 | revision = "1df9eeb2bb81f327b96228865c5687bc2194af3f" 14 | version = "1.0.0" 15 | 16 | [solve-meta] 17 | analyzer-name = "dep" 18 | analyzer-version = 1 19 | inputs-digest = "ac7003b5a981716353a43055ab7d4c5357403cb30a60de2dbdeb446c1544beaa" 20 | solver-name = "gps-cdcl" 21 | solver-version = 1 22 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/json-iterator/go/Gopkg.toml: -------------------------------------------------------------------------------- 1 | # Gopkg.toml example 2 | # 3 | # Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md 4 | # for detailed Gopkg.toml documentation. 5 | # 6 | # required = ["github.com/user/thing/cmd/thing"] 7 | # ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] 8 | # 9 | # [[constraint]] 10 | # name = "github.com/user/project" 11 | # version = "1.0.0" 12 | # 13 | # [[constraint]] 14 | # name = "github.com/user/project2" 15 | # branch = "dev" 16 | # source = "github.com/myfork/project2" 17 | # 18 | # [[override]] 19 | # name = "github.com/x/y" 20 | # version = "2.4.0" 21 | 22 | ignored = ["github.com/davecgh/go-spew*","github.com/google/gofuzz*","github.com/stretchr/testify*"] 23 | 24 | [[constraint]] 25 | name = "github.com/modern-go/reflect2" 26 | version = "1.0.0" 27 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/json-iterator/go/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | set -x 4 | 5 | if [ ! -d /tmp/build-golang/src/github.com/json-iterator ]; then 6 | mkdir -p /tmp/build-golang/src/github.com/json-iterator 7 | ln -s $PWD /tmp/build-golang/src/github.com/json-iterator/go 8 | fi 9 | export GOPATH=/tmp/build-golang 10 | go get -u github.com/golang/dep/cmd/dep 11 | cd /tmp/build-golang/src/github.com/json-iterator/go 12 | exec $GOPATH/bin/dep ensure -update 13 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/json-iterator/go/fuzzy_mode_convert_table.md: -------------------------------------------------------------------------------- 1 | | json type \ dest type | bool | int | uint | float |string| 2 | | --- | --- | --- | --- |--|--| 3 | | number | positive => true
negative => true
zero => false| 23.2 => 23
-32.1 => -32| 12.1 => 12
-12.1 => 0|as normal|same as origin| 4 | | string | empty string => false
string "0" => false
other strings => true | "123.32" => 123
"-123.4" => -123
"123.23xxxw" => 123
"abcde12" => 0
"-32.1" => -32| 13.2 => 13
-1.1 => 0 |12.1 => 12.1
-12.3 => -12.3
12.4xxa => 12.4
+1.1e2 =>110 |same as origin| 5 | | bool | true => true
false => false| true => 1
false => 0 | true => 1
false => 0 |true => 1
false => 0|true => "true"
false => "false"| 6 | | object | true | 0 | 0 |0|originnal json| 7 | | array | empty array => false
nonempty array => true| [] => 0
[1,2] => 1 | [] => 0
[1,2] => 1 |[] => 0
[1,2] => 1|original json| -------------------------------------------------------------------------------- /bnd/vendor/github.com/json-iterator/go/jsoniter.go: -------------------------------------------------------------------------------- 1 | // Package jsoniter implements encoding and decoding of JSON as defined in 2 | // RFC 4627 and provides interfaces with identical syntax of standard lib encoding/json. 3 | // Converting from encoding/json to jsoniter is no more than replacing the package with jsoniter 4 | // and variable type declarations (if any). 5 | // jsoniter interfaces gives 100% compatibility with code using standard lib. 6 | // 7 | // "JSON and Go" 8 | // (https://golang.org/doc/articles/json_and_go.html) 9 | // gives a description of how Marshal/Unmarshal operate 10 | // between arbitrary or predefined json objects and bytes, 11 | // and it applies to jsoniter.Marshal/Unmarshal as well. 12 | // 13 | // Besides, jsoniter.Iterator provides a different set of interfaces 14 | // iterating given bytes/string/reader 15 | // and yielding parsed elements one by one. 16 | // This set of interfaces reads input as required and gives 17 | // better performance. 18 | package jsoniter 19 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/json-iterator/go/pool.go: -------------------------------------------------------------------------------- 1 | package jsoniter 2 | 3 | import ( 4 | "io" 5 | ) 6 | 7 | // IteratorPool a thread safe pool of iterators with same configuration 8 | type IteratorPool interface { 9 | BorrowIterator(data []byte) *Iterator 10 | ReturnIterator(iter *Iterator) 11 | } 12 | 13 | // StreamPool a thread safe pool of streams with same configuration 14 | type StreamPool interface { 15 | BorrowStream(writer io.Writer) *Stream 16 | ReturnStream(stream *Stream) 17 | } 18 | 19 | func (cfg *frozenConfig) BorrowStream(writer io.Writer) *Stream { 20 | stream := cfg.streamPool.Get().(*Stream) 21 | stream.Reset(writer) 22 | return stream 23 | } 24 | 25 | func (cfg *frozenConfig) ReturnStream(stream *Stream) { 26 | stream.Error = nil 27 | stream.Attachment = nil 28 | cfg.streamPool.Put(stream) 29 | } 30 | 31 | func (cfg *frozenConfig) BorrowIterator(data []byte) *Iterator { 32 | iter := cfg.iteratorPool.Get().(*Iterator) 33 | iter.ResetBytes(data) 34 | return iter 35 | } 36 | 37 | func (cfg *frozenConfig) ReturnIterator(iter *Iterator) { 38 | iter.Error = nil 39 | iter.Attachment = nil 40 | cfg.iteratorPool.Put(iter) 41 | } 42 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/json-iterator/go/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | echo "" > coverage.txt 5 | 6 | for d in $(go list ./... | grep -v vendor); do 7 | go test -coverprofile=profile.out -coverpkg=github.com/json-iterator/go $d 8 | if [ -f profile.out ]; then 9 | cat profile.out >> coverage.txt 10 | rm profile.out 11 | fi 12 | done 13 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/kardianos/osext/README.md: -------------------------------------------------------------------------------- 1 | ### Extensions to the "os" package. 2 | 3 | [![GoDoc](https://godoc.org/github.com/kardianos/osext?status.svg)](https://godoc.org/github.com/kardianos/osext) 4 | 5 | ## Find the current Executable and ExecutableFolder. 6 | 7 | As of go1.8 the Executable function may be found in `os`. The Executable function 8 | in the std lib `os` package is used if available. 9 | 10 | There is sometimes utility in finding the current executable file 11 | that is running. This can be used for upgrading the current executable 12 | or finding resources located relative to the executable file. Both 13 | working directory and the os.Args[0] value are arbitrary and cannot 14 | be relied on; os.Args[0] can be "faked". 15 | 16 | Multi-platform and supports: 17 | * Linux 18 | * OS X 19 | * Windows 20 | * Plan 9 21 | * BSDs. 22 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/kardianos/osext/osext.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Extensions to the standard "os" package. 6 | package osext // import "github.com/kardianos/osext" 7 | 8 | import "path/filepath" 9 | 10 | var cx, ce = executableClean() 11 | 12 | func executableClean() (string, error) { 13 | p, err := executable() 14 | return filepath.Clean(p), err 15 | } 16 | 17 | // Executable returns an absolute path that can be used to 18 | // re-invoke the current program. 19 | // It may not be valid after the current program exits. 20 | func Executable() (string, error) { 21 | return cx, ce 22 | } 23 | 24 | // Returns same path as Executable, returns just the folder 25 | // path. Excludes the executable name and any trailing slash. 26 | func ExecutableFolder() (string, error) { 27 | p, err := Executable() 28 | if err != nil { 29 | return "", err 30 | } 31 | 32 | return filepath.Dir(p), nil 33 | } 34 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/kardianos/osext/osext_go18.go: -------------------------------------------------------------------------------- 1 | //+build go1.8,!openbsd 2 | 3 | package osext 4 | 5 | import "os" 6 | 7 | func executable() (string, error) { 8 | return os.Executable() 9 | } 10 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/kardianos/osext/osext_plan9.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //+build !go1.8 6 | 7 | package osext 8 | 9 | import ( 10 | "os" 11 | "strconv" 12 | "syscall" 13 | ) 14 | 15 | func executable() (string, error) { 16 | f, err := os.Open("/proc/" + strconv.Itoa(os.Getpid()) + "/text") 17 | if err != nil { 18 | return "", err 19 | } 20 | defer f.Close() 21 | return syscall.Fd2path(int(f.Fd())) 22 | } 23 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/kardianos/osext/osext_procfs.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !go1.8,android !go1.8,linux !go1.8,netbsd !go1.8,solaris !go1.8,dragonfly 6 | 7 | package osext 8 | 9 | import ( 10 | "errors" 11 | "fmt" 12 | "os" 13 | "runtime" 14 | "strings" 15 | ) 16 | 17 | func executable() (string, error) { 18 | switch runtime.GOOS { 19 | case "linux", "android": 20 | const deletedTag = " (deleted)" 21 | execpath, err := os.Readlink("/proc/self/exe") 22 | if err != nil { 23 | return execpath, err 24 | } 25 | execpath = strings.TrimSuffix(execpath, deletedTag) 26 | execpath = strings.TrimPrefix(execpath, deletedTag) 27 | return execpath, nil 28 | case "netbsd": 29 | return os.Readlink("/proc/curproc/exe") 30 | case "dragonfly": 31 | return os.Readlink("/proc/curproc/file") 32 | case "solaris": 33 | return os.Readlink(fmt.Sprintf("/proc/%d/path/a.out", os.Getpid())) 34 | } 35 | return "", errors.New("ExecPath not implemented for " + runtime.GOOS) 36 | } 37 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/kardianos/osext/osext_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //+build !go1.8 6 | 7 | package osext 8 | 9 | import ( 10 | "syscall" 11 | "unicode/utf16" 12 | "unsafe" 13 | ) 14 | 15 | var ( 16 | kernel = syscall.MustLoadDLL("kernel32.dll") 17 | getModuleFileNameProc = kernel.MustFindProc("GetModuleFileNameW") 18 | ) 19 | 20 | // GetModuleFileName() with hModule = NULL 21 | func executable() (exePath string, err error) { 22 | return getModuleFileName() 23 | } 24 | 25 | func getModuleFileName() (string, error) { 26 | var n uint32 27 | b := make([]uint16, syscall.MAX_PATH) 28 | size := uint32(len(b)) 29 | 30 | r0, _, e1 := getModuleFileNameProc.Call(0, uintptr(unsafe.Pointer(&b[0])), uintptr(size)) 31 | n = uint32(r0) 32 | if n == 0 { 33 | return "", e1 34 | } 35 | return string(utf16.Decode(b[0:n])), nil 36 | } 37 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/mattn/go-runewidth/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - tip 4 | before_install: 5 | - go get github.com/mattn/goveralls 6 | - go get golang.org/x/tools/cmd/cover 7 | script: 8 | - $HOME/gopath/bin/goveralls -repotoken lAKAWPzcGsD3A8yBX3BGGtRUdJ6CaGERL 9 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/mattn/go-runewidth/README.mkd: -------------------------------------------------------------------------------- 1 | go-runewidth 2 | ============ 3 | 4 | [![Build Status](https://travis-ci.org/mattn/go-runewidth.png?branch=master)](https://travis-ci.org/mattn/go-runewidth) 5 | [![Coverage Status](https://coveralls.io/repos/mattn/go-runewidth/badge.png?branch=HEAD)](https://coveralls.io/r/mattn/go-runewidth?branch=HEAD) 6 | [![GoDoc](https://godoc.org/github.com/mattn/go-runewidth?status.svg)](http://godoc.org/github.com/mattn/go-runewidth) 7 | [![Go Report Card](https://goreportcard.com/badge/github.com/mattn/go-runewidth)](https://goreportcard.com/report/github.com/mattn/go-runewidth) 8 | 9 | Provides functions to get fixed width of the character or string. 10 | 11 | Usage 12 | ----- 13 | 14 | ```go 15 | runewidth.StringWidth("つのだ☆HIRO") == 12 16 | ``` 17 | 18 | 19 | Author 20 | ------ 21 | 22 | Yasuhiro Matsumoto 23 | 24 | License 25 | ------- 26 | 27 | under the MIT License: http://mattn.mit-license.org/2013 28 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/mattn/go-runewidth/runewidth_js.go: -------------------------------------------------------------------------------- 1 | // +build js 2 | 3 | package runewidth 4 | 5 | func IsEastAsian() bool { 6 | // TODO: Implement this for the web. Detect east asian in a compatible way, and return true. 7 | return false 8 | } 9 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/mattn/go-runewidth/runewidth_windows.go: -------------------------------------------------------------------------------- 1 | package runewidth 2 | 3 | import ( 4 | "syscall" 5 | ) 6 | 7 | var ( 8 | kernel32 = syscall.NewLazyDLL("kernel32") 9 | procGetConsoleOutputCP = kernel32.NewProc("GetConsoleOutputCP") 10 | ) 11 | 12 | // IsEastAsian return true if the current locale is CJK 13 | func IsEastAsian() bool { 14 | r1, _, _ := procGetConsoleOutputCP.Call() 15 | if r1 == 0 { 16 | return false 17 | } 18 | 19 | switch int(r1) { 20 | case 932, 51932, 936, 949, 950: 21 | return true 22 | } 23 | 24 | return false 25 | } 26 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/modern-go/concurrent/.gitignore: -------------------------------------------------------------------------------- 1 | /coverage.txt 2 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/modern-go/concurrent/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.8.x 5 | - 1.x 6 | 7 | before_install: 8 | - go get -t -v ./... 9 | 10 | script: 11 | - ./test.sh 12 | 13 | after_success: 14 | - bash <(curl -s https://codecov.io/bash) 15 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/modern-go/concurrent/executor.go: -------------------------------------------------------------------------------- 1 | package concurrent 2 | 3 | import "context" 4 | 5 | // Executor replace go keyword to start a new goroutine 6 | // the goroutine should cancel itself if the context passed in has been cancelled 7 | // the goroutine started by the executor, is owned by the executor 8 | // we can cancel all executors owned by the executor just by stop the executor itself 9 | // however Executor interface does not Stop method, the one starting and owning executor 10 | // should use the concrete type of executor, instead of this interface. 11 | type Executor interface { 12 | // Go starts a new goroutine controlled by the context 13 | Go(handler func(ctx context.Context)) 14 | } 15 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/modern-go/concurrent/go_above_19.go: -------------------------------------------------------------------------------- 1 | //+build go1.9 2 | 3 | package concurrent 4 | 5 | import "sync" 6 | 7 | // Map is a wrapper for sync.Map introduced in go1.9 8 | type Map struct { 9 | sync.Map 10 | } 11 | 12 | // NewMap creates a thread safe Map 13 | func NewMap() *Map { 14 | return &Map{} 15 | } 16 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/modern-go/concurrent/go_below_19.go: -------------------------------------------------------------------------------- 1 | //+build !go1.9 2 | 3 | package concurrent 4 | 5 | import "sync" 6 | 7 | // Map implements a thread safe map for go version below 1.9 using mutex 8 | type Map struct { 9 | lock sync.RWMutex 10 | data map[interface{}]interface{} 11 | } 12 | 13 | // NewMap creates a thread safe map 14 | func NewMap() *Map { 15 | return &Map{ 16 | data: make(map[interface{}]interface{}, 32), 17 | } 18 | } 19 | 20 | // Load is same as sync.Map Load 21 | func (m *Map) Load(key interface{}) (elem interface{}, found bool) { 22 | m.lock.RLock() 23 | elem, found = m.data[key] 24 | m.lock.RUnlock() 25 | return 26 | } 27 | 28 | // Load is same as sync.Map Store 29 | func (m *Map) Store(key interface{}, elem interface{}) { 30 | m.lock.Lock() 31 | m.data[key] = elem 32 | m.lock.Unlock() 33 | } 34 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/modern-go/concurrent/log.go: -------------------------------------------------------------------------------- 1 | package concurrent 2 | 3 | import ( 4 | "os" 5 | "log" 6 | "io/ioutil" 7 | ) 8 | 9 | // ErrorLogger is used to print out error, can be set to writer other than stderr 10 | var ErrorLogger = log.New(os.Stderr, "", 0) 11 | 12 | // InfoLogger is used to print informational message, default to off 13 | var InfoLogger = log.New(ioutil.Discard, "", 0) -------------------------------------------------------------------------------- /bnd/vendor/github.com/modern-go/concurrent/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | echo "" > coverage.txt 5 | 6 | for d in $(go list ./... | grep -v vendor); do 7 | go test -coverprofile=profile.out -coverpkg=github.com/modern-go/concurrent $d 8 | if [ -f profile.out ]; then 9 | cat profile.out >> coverage.txt 10 | rm profile.out 11 | fi 12 | done 13 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/modern-go/reflect2/.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/modern-go/reflect2/Gopkg.lock: -------------------------------------------------------------------------------- 1 | # This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. 2 | 3 | 4 | [[projects]] 5 | name = "github.com/modern-go/concurrent" 6 | packages = ["."] 7 | revision = "e0a39a4cb4216ea8db28e22a69f4ec25610d513a" 8 | version = "1.0.0" 9 | 10 | [solve-meta] 11 | analyzer-name = "dep" 12 | analyzer-version = 1 13 | inputs-digest = "daee8a88b3498b61c5640056665b8b9eea062006f5e596bbb6a3ed9119a11ec7" 14 | solver-name = "gps-cdcl" 15 | solver-version = 1 16 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/modern-go/reflect2/Gopkg.toml: -------------------------------------------------------------------------------- 1 | # Gopkg.toml example 2 | # 3 | # Refer to https://golang.github.io/dep/docs/Gopkg.toml.html 4 | # for detailed Gopkg.toml documentation. 5 | # 6 | # required = ["github.com/user/thing/cmd/thing"] 7 | # ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] 8 | # 9 | # [[constraint]] 10 | # name = "github.com/user/project" 11 | # version = "1.0.0" 12 | # 13 | # [[constraint]] 14 | # name = "github.com/user/project2" 15 | # branch = "dev" 16 | # source = "github.com/myfork/project2" 17 | # 18 | # [[override]] 19 | # name = "github.com/x/y" 20 | # version = "2.4.0" 21 | # 22 | # [prune] 23 | # non-go = false 24 | # go-tests = true 25 | # unused-packages = true 26 | 27 | ignored = ["github.com/modern-go/test","github.com/modern-go/test/must","github.com/modern-go/test/should"] 28 | 29 | [[constraint]] 30 | name = "github.com/modern-go/concurrent" 31 | version = "1.0.0" 32 | 33 | [prune] 34 | go-tests = true 35 | unused-packages = true 36 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/modern-go/reflect2/README.md: -------------------------------------------------------------------------------- 1 | # reflect2 2 | reflect api that avoids runtime reflect.Value cost 3 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/modern-go/reflect2/go_above_17.go: -------------------------------------------------------------------------------- 1 | //+build go1.7 2 | 3 | package reflect2 4 | 5 | import "unsafe" 6 | 7 | //go:linkname resolveTypeOff reflect.resolveTypeOff 8 | func resolveTypeOff(rtype unsafe.Pointer, off int32) unsafe.Pointer 9 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/modern-go/reflect2/go_above_19.go: -------------------------------------------------------------------------------- 1 | //+build go1.9 2 | 3 | package reflect2 4 | 5 | import ( 6 | "unsafe" 7 | ) 8 | 9 | //go:linkname makemap reflect.makemap 10 | func makemap(rtype unsafe.Pointer, cap int) (m unsafe.Pointer) 11 | 12 | func makeMapWithSize(rtype unsafe.Pointer, cap int) unsafe.Pointer { 13 | return makemap(rtype, cap) 14 | } 15 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/modern-go/reflect2/go_below_17.go: -------------------------------------------------------------------------------- 1 | //+build !go1.7 2 | 3 | package reflect2 4 | 5 | import "unsafe" 6 | 7 | func resolveTypeOff(rtype unsafe.Pointer, off int32) unsafe.Pointer { 8 | return nil 9 | } -------------------------------------------------------------------------------- /bnd/vendor/github.com/modern-go/reflect2/go_below_19.go: -------------------------------------------------------------------------------- 1 | //+build !go1.9 2 | 3 | package reflect2 4 | 5 | import ( 6 | "unsafe" 7 | ) 8 | 9 | //go:linkname makemap reflect.makemap 10 | func makemap(rtype unsafe.Pointer) (m unsafe.Pointer) 11 | 12 | func makeMapWithSize(rtype unsafe.Pointer, cap int) unsafe.Pointer { 13 | return makemap(rtype) 14 | } 15 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/modern-go/reflect2/reflect2_amd64.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/modern-go/reflect2/reflect2_amd64.s -------------------------------------------------------------------------------- /bnd/vendor/github.com/modern-go/reflect2/reflect2_kind.go: -------------------------------------------------------------------------------- 1 | package reflect2 2 | 3 | import ( 4 | "reflect" 5 | "unsafe" 6 | ) 7 | 8 | // DefaultTypeOfKind return the non aliased default type for the kind 9 | func DefaultTypeOfKind(kind reflect.Kind) Type { 10 | return kindTypes[kind] 11 | } 12 | 13 | var kindTypes = map[reflect.Kind]Type{ 14 | reflect.Bool: TypeOf(true), 15 | reflect.Uint8: TypeOf(uint8(0)), 16 | reflect.Int8: TypeOf(int8(0)), 17 | reflect.Uint16: TypeOf(uint16(0)), 18 | reflect.Int16: TypeOf(int16(0)), 19 | reflect.Uint32: TypeOf(uint32(0)), 20 | reflect.Int32: TypeOf(int32(0)), 21 | reflect.Uint64: TypeOf(uint64(0)), 22 | reflect.Int64: TypeOf(int64(0)), 23 | reflect.Uint: TypeOf(uint(0)), 24 | reflect.Int: TypeOf(int(0)), 25 | reflect.Float32: TypeOf(float32(0)), 26 | reflect.Float64: TypeOf(float64(0)), 27 | reflect.Uintptr: TypeOf(uintptr(0)), 28 | reflect.String: TypeOf(""), 29 | reflect.UnsafePointer: TypeOf(unsafe.Pointer(nil)), 30 | } -------------------------------------------------------------------------------- /bnd/vendor/github.com/modern-go/reflect2/relfect2_386.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/modern-go/reflect2/relfect2_386.s -------------------------------------------------------------------------------- /bnd/vendor/github.com/modern-go/reflect2/relfect2_amd64p32.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/modern-go/reflect2/relfect2_amd64p32.s -------------------------------------------------------------------------------- /bnd/vendor/github.com/modern-go/reflect2/relfect2_arm.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/modern-go/reflect2/relfect2_arm.s -------------------------------------------------------------------------------- /bnd/vendor/github.com/modern-go/reflect2/relfect2_arm64.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/modern-go/reflect2/relfect2_arm64.s -------------------------------------------------------------------------------- /bnd/vendor/github.com/modern-go/reflect2/relfect2_mips64x.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/modern-go/reflect2/relfect2_mips64x.s -------------------------------------------------------------------------------- /bnd/vendor/github.com/modern-go/reflect2/relfect2_mipsx.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/modern-go/reflect2/relfect2_mipsx.s -------------------------------------------------------------------------------- /bnd/vendor/github.com/modern-go/reflect2/relfect2_ppc64x.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/modern-go/reflect2/relfect2_ppc64x.s -------------------------------------------------------------------------------- /bnd/vendor/github.com/modern-go/reflect2/relfect2_s390x.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd/vendor/github.com/modern-go/reflect2/relfect2_s390x.s -------------------------------------------------------------------------------- /bnd/vendor/github.com/modern-go/reflect2/safe_struct.go: -------------------------------------------------------------------------------- 1 | package reflect2 2 | 3 | type safeStructType struct { 4 | safeType 5 | } 6 | 7 | func (type2 *safeStructType) FieldByName(name string) StructField { 8 | field, found := type2.Type.FieldByName(name) 9 | if !found { 10 | panic("field " + name + " not found") 11 | } 12 | return &safeField{StructField: field} 13 | } -------------------------------------------------------------------------------- /bnd/vendor/github.com/moul/http2curl/Makefile: -------------------------------------------------------------------------------- 1 | # Project-specific variables 2 | CONVEY_PORT ?= 9042 3 | 4 | 5 | # Common variables 6 | SOURCES := $(shell find . -type f -name "*.go") 7 | COMMANDS := $(shell go list ./... | grep -v /vendor/ | grep /cmd/) 8 | PACKAGES := $(shell go list ./... | grep -v /vendor/ | grep -v /cmd/) 9 | GOENV ?= GO15VENDOREXPERIMENT=1 10 | GO ?= $(GOENV) go 11 | GODEP ?= $(GOENV) godep 12 | USER ?= $(shell whoami) 13 | 14 | 15 | all: build 16 | 17 | 18 | .PHONY: build 19 | build: 20 | echo "nothing to do" 21 | 22 | 23 | .PHONY: test 24 | test: 25 | $(GO) get -t . 26 | $(GO) test -v . 27 | 28 | 29 | .PHONY: godep-save 30 | godep-save: 31 | $(GODEP) save $(PACKAGES) $(COMMANDS) 32 | 33 | 34 | .PHONY: re 35 | re: clean all 36 | 37 | 38 | .PHONY: convey 39 | convey: 40 | $(GO) get github.com/smartystreets/goconvey 41 | goconvey -cover -port=$(CONVEY_PORT) -workDir="$(realpath .)" -depth=1 42 | 43 | 44 | .PHONY: cover 45 | cover: profile.out 46 | 47 | 48 | profile.out: $(SOURCES) 49 | rm -f $@ 50 | $(GO) test -covermode=count -coverpkg=. -coverprofile=$@ . 51 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/olekukonko/tablewriter/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.1 5 | - 1.2 6 | - 1.3 7 | - 1.4 8 | - 1.5 9 | - 1.6 10 | - 1.7 11 | - 1.8 12 | - tip 13 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/olekukonko/tablewriter/LICENCE.md: -------------------------------------------------------------------------------- 1 | Copyright (C) 2014 by Oleku Konko 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /bnd/vendor/github.com/olekukonko/tablewriter/test.csv: -------------------------------------------------------------------------------- 1 | first_name,last_name,ssn 2 | John,Barry,123456 3 | Kathy,Smith,687987 4 | Bob,McCornick,3979870 -------------------------------------------------------------------------------- /bnd/vendor/github.com/olekukonko/tablewriter/test_info.csv: -------------------------------------------------------------------------------- 1 | Field,Type,Null,Key,Default,Extra 2 | user_id,smallint(5),NO,PRI,NULL,auto_increment 3 | username,varchar(10),NO,,NULL, 4 | password,varchar(100),NO,,NULL, -------------------------------------------------------------------------------- /bnd/vendor/github.com/parnurzeal/gorequest/logger.go: -------------------------------------------------------------------------------- 1 | package gorequest 2 | 3 | type Logger interface { 4 | SetPrefix(string) 5 | Printf(format string, v ...interface{}) 6 | Println(v ...interface{}) 7 | } 8 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/peterh/liner/bsdinput.go: -------------------------------------------------------------------------------- 1 | // +build openbsd freebsd netbsd 2 | 3 | package liner 4 | 5 | import "syscall" 6 | 7 | const ( 8 | getTermios = syscall.TIOCGETA 9 | setTermios = syscall.TIOCSETA 10 | ) 11 | 12 | const ( 13 | // Input flags 14 | inpck = 0x010 15 | istrip = 0x020 16 | icrnl = 0x100 17 | ixon = 0x200 18 | 19 | // Output flags 20 | opost = 0x1 21 | 22 | // Control flags 23 | cs8 = 0x300 24 | 25 | // Local flags 26 | isig = 0x080 27 | icanon = 0x100 28 | iexten = 0x400 29 | ) 30 | 31 | type termios struct { 32 | Iflag uint32 33 | Oflag uint32 34 | Cflag uint32 35 | Lflag uint32 36 | Cc [20]byte 37 | Ispeed int32 38 | Ospeed int32 39 | } 40 | 41 | const cursorColumn = false 42 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/peterh/liner/input_darwin.go: -------------------------------------------------------------------------------- 1 | // +build darwin 2 | 3 | package liner 4 | 5 | import "syscall" 6 | 7 | const ( 8 | getTermios = syscall.TIOCGETA 9 | setTermios = syscall.TIOCSETA 10 | ) 11 | 12 | const ( 13 | // Input flags 14 | inpck = 0x010 15 | istrip = 0x020 16 | icrnl = 0x100 17 | ixon = 0x200 18 | 19 | // Output flags 20 | opost = 0x1 21 | 22 | // Control flags 23 | cs8 = 0x300 24 | 25 | // Local flags 26 | isig = 0x080 27 | icanon = 0x100 28 | iexten = 0x400 29 | ) 30 | 31 | type termios struct { 32 | Iflag uintptr 33 | Oflag uintptr 34 | Cflag uintptr 35 | Lflag uintptr 36 | Cc [20]byte 37 | Ispeed uintptr 38 | Ospeed uintptr 39 | } 40 | 41 | // Terminal.app needs a column for the cursor when the input line is at the 42 | // bottom of the window. 43 | const cursorColumn = true 44 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/peterh/liner/input_linux.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | 3 | package liner 4 | 5 | import "syscall" 6 | 7 | const ( 8 | getTermios = syscall.TCGETS 9 | setTermios = syscall.TCSETS 10 | ) 11 | 12 | const ( 13 | icrnl = syscall.ICRNL 14 | inpck = syscall.INPCK 15 | istrip = syscall.ISTRIP 16 | ixon = syscall.IXON 17 | opost = syscall.OPOST 18 | cs8 = syscall.CS8 19 | isig = syscall.ISIG 20 | icanon = syscall.ICANON 21 | iexten = syscall.IEXTEN 22 | ) 23 | 24 | type termios struct { 25 | syscall.Termios 26 | } 27 | 28 | const cursorColumn = false 29 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/peterh/liner/unixmode.go: -------------------------------------------------------------------------------- 1 | // +build linux darwin freebsd openbsd netbsd 2 | 3 | package liner 4 | 5 | import ( 6 | "syscall" 7 | "unsafe" 8 | ) 9 | 10 | func (mode *termios) ApplyMode() error { 11 | _, _, errno := syscall.Syscall(syscall.SYS_IOCTL, uintptr(syscall.Stdin), setTermios, uintptr(unsafe.Pointer(mode))) 12 | 13 | if errno != 0 { 14 | return errno 15 | } 16 | return nil 17 | } 18 | 19 | // TerminalMode returns the current terminal input mode as an InputModeSetter. 20 | // 21 | // This function is provided for convenience, and should 22 | // not be necessary for most users of liner. 23 | func TerminalMode() (ModeApplier, error) { 24 | mode, errno := getMode(syscall.Stdin) 25 | 26 | if errno != 0 { 27 | return nil, errno 28 | } 29 | return mode, nil 30 | } 31 | 32 | func getMode(handle int) (*termios, syscall.Errno) { 33 | var mode termios 34 | _, _, errno := syscall.Syscall(syscall.SYS_IOCTL, uintptr(handle), getTermios, uintptr(unsafe.Pointer(&mode))) 35 | 36 | return &mode, errno 37 | } 38 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/pkg/errors/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: build-{build}.{branch} 2 | 3 | clone_folder: C:\gopath\src\github.com\pkg\errors 4 | shallow_clone: true # for startup speed 5 | 6 | environment: 7 | GOPATH: C:\gopath 8 | 9 | platform: 10 | - x64 11 | 12 | # http://www.appveyor.com/docs/installed-software 13 | install: 14 | # some helpful output for debugging builds 15 | - go version 16 | - go env 17 | # pre-installed MinGW at C:\MinGW is 32bit only 18 | # but MSYS2 at C:\msys64 has mingw64 19 | - set PATH=C:\msys64\mingw64\bin;%PATH% 20 | - gcc --version 21 | - g++ --version 22 | 23 | build_script: 24 | - go install -v ./... 25 | 26 | test_script: 27 | - set PATH=C:\gopath\bin;%PATH% 28 | - go test -v ./... 29 | 30 | #artifacts: 31 | # - path: '%GOPATH%\bin\*.exe' 32 | deploy: off 33 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/shiena/ansicolor/.gitignore: -------------------------------------------------------------------------------- 1 | # Created by http://www.gitignore.io 2 | 3 | ### Go ### 4 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 5 | *.o 6 | *.a 7 | *.so 8 | 9 | # Folders 10 | _obj 11 | _test 12 | 13 | # Architecture specific extensions/prefixes 14 | *.[568vq] 15 | [568vq].out 16 | 17 | *.cgo1.go 18 | *.cgo2.c 19 | _cgo_defun.c 20 | _cgo_gotypes.go 21 | _cgo_export.* 22 | 23 | _testmain.go 24 | 25 | *.exe 26 | *.test 27 | 28 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/shiena/ansicolor/ansicolor_ansi.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 shiena Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !windows 6 | 7 | package ansicolor 8 | 9 | import "io" 10 | 11 | type ansiColorWriter struct { 12 | w io.Writer 13 | mode outputMode 14 | } 15 | 16 | func (cw *ansiColorWriter) Write(p []byte) (int, error) { 17 | return cw.w.Write(p) 18 | } 19 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/urfave/cli/.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | max-line-length = 120 3 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/urfave/cli/.gitignore: -------------------------------------------------------------------------------- 1 | *.coverprofile 2 | node_modules/ 3 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/urfave/cli/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | dist: trusty 4 | osx_image: xcode8.3 5 | go: 1.8.x 6 | 7 | os: 8 | - linux 9 | - osx 10 | 11 | cache: 12 | directories: 13 | - node_modules 14 | 15 | before_script: 16 | - go get github.com/urfave/gfmrun/... || true 17 | - go get golang.org/x/tools/cmd/goimports 18 | - if [ ! -f node_modules/.bin/markdown-toc ] ; then 19 | npm install markdown-toc ; 20 | fi 21 | 22 | script: 23 | - ./runtests gen 24 | - ./runtests vet 25 | - ./runtests test 26 | - ./runtests gfmrun 27 | - ./runtests toc 28 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/urfave/cli/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | 3 | os: Windows Server 2016 4 | 5 | image: Visual Studio 2017 6 | 7 | clone_folder: c:\gopath\src\github.com\urfave\cli 8 | 9 | environment: 10 | GOPATH: C:\gopath 11 | GOVERSION: 1.8.x 12 | PYTHON: C:\Python36-x64 13 | PYTHON_VERSION: 3.6.x 14 | PYTHON_ARCH: 64 15 | 16 | install: 17 | - set PATH=%GOPATH%\bin;C:\go\bin;%PATH% 18 | - go version 19 | - go env 20 | - go get github.com/urfave/gfmrun/... 21 | - go get -v -t ./... 22 | 23 | build_script: 24 | - python runtests vet 25 | - python runtests test 26 | - python runtests gfmrun 27 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/urfave/cli/cli.go: -------------------------------------------------------------------------------- 1 | // Package cli provides a minimal framework for creating and organizing command line 2 | // Go applications. cli is designed to be easy to understand and write, the most simple 3 | // cli application can be written as follows: 4 | // func main() { 5 | // cli.NewApp().Run(os.Args) 6 | // } 7 | // 8 | // Of course this application does not do much, so let's make this an actual application: 9 | // func main() { 10 | // app := cli.NewApp() 11 | // app.Name = "greet" 12 | // app.Usage = "say a greeting" 13 | // app.Action = func(c *cli.Context) error { 14 | // println("Greetings") 15 | // return nil 16 | // } 17 | // 18 | // app.Run(os.Args) 19 | // } 20 | package cli 21 | 22 | //go:generate python ./generate-flag-types cli -i flag-types.json -o flag_generated.go 23 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/zserge/webview/appveyor.yml: -------------------------------------------------------------------------------- 1 | os: Visual Studio 2017 2 | 3 | version: "{build}" 4 | 5 | clone_folder: c:\gopath\src\github.com\zserge\webview 6 | 7 | environment: 8 | global: 9 | GOPATH: C:\gopath 10 | matrix: 11 | - GETH_ARCH: amd64 12 | GOARCH: amd64 13 | CGO_ENABLED: 1 14 | MSYS2_ARCH: x86_64 15 | MSYS2_BITS: 64 16 | MSYSTEM: MINGW64 17 | PATH: C:\msys64\mingw64\bin\;C:\Program Files (x86)\NSIS\;%PATH% 18 | - GETH_ARCH: 386 19 | GOARCH: 386 20 | CGO_ENABLED: 1 21 | MSYS2_ARCH: i686 22 | MSYS2_BITS: 32 23 | MSYSTEM: MINGW32 24 | PATH: C:\msys64\mingw32\bin\;C:\Program Files (x86)\NSIS\;%PATH% 25 | 26 | install: 27 | - echo %PATH% 28 | - echo %GOPATH% 29 | - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% 30 | - go version 31 | - go env 32 | - gcc --version 33 | 34 | build_script: 35 | - go build -o buildOutput\minimal -i ./examples/minimal-go 36 | - go build -o buildOutput\todo -i ./examples/todo-go 37 | - go build -o buildOutput\window -i ./examples/window-go 38 | - go build -o buildOutput\pageload -i ./examples/page-load-go 39 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/zyxar/argo/rpc/call.go: -------------------------------------------------------------------------------- 1 | package rpc 2 | 3 | import ( 4 | "bytes" 5 | "io/ioutil" 6 | "net/http" 7 | 8 | "github.com/gorilla/rpc/v2/json2" 9 | ) 10 | 11 | type caller interface { 12 | // call sends a request of rpc to aria2 daemon 13 | call(method string, params, reply interface{}) (err error) 14 | } 15 | 16 | type httpCaller string 17 | 18 | func newHttpCaller(uri string) caller { 19 | return httpCaller(uri) 20 | } 21 | 22 | func (id httpCaller) call(method string, params, reply interface{}) (err error) { 23 | pay, err := json2.EncodeClientRequest(method, params) 24 | if err != nil { 25 | return 26 | } 27 | r, err := http.Post(string(id), "application/json", bytes.NewReader(pay)) 28 | if err != nil { 29 | return 30 | } 31 | body, err := ioutil.ReadAll(r.Body) 32 | if err != nil { 33 | return 34 | } 35 | r.Body.Close() 36 | err = json2.DecodeClientResponse(bytes.NewReader(body), &reply) 37 | return 38 | } 39 | -------------------------------------------------------------------------------- /bnd/vendor/github.com/zyxar/argo/rpc/notification.go: -------------------------------------------------------------------------------- 1 | package rpc 2 | 3 | import ( 4 | "log" 5 | ) 6 | 7 | type Event struct { 8 | Gid string `json:"gid"` // GID of the download 9 | } 10 | 11 | type Notifier interface { 12 | OnStart([]Event) 13 | OnPause([]Event) 14 | OnStop([]Event) 15 | OnComplete([]Event) 16 | OnError([]Event) 17 | OnBtComplete([]Event) 18 | } 19 | 20 | type DummyNotifier struct { 21 | } 22 | 23 | func (d *DummyNotifier) OnStart(es []Event) { 24 | log.Printf("%s started.\n", es) 25 | } 26 | func (d *DummyNotifier) OnPause(es []Event) { 27 | log.Printf("%s paused.\n", es) 28 | } 29 | func (d *DummyNotifier) OnStop(es []Event) { 30 | log.Printf("%s stopped.\n", es) 31 | } 32 | func (d *DummyNotifier) OnComplete(es []Event) { 33 | log.Printf("%s completed.\n", es) 34 | } 35 | func (d *DummyNotifier) OnError(es []Event) { 36 | log.Printf("%s error.\n", es) 37 | } 38 | func (d *DummyNotifier) OnBtComplete(es []Event) { 39 | log.Printf("bt %s completed.\n", es) 40 | } 41 | -------------------------------------------------------------------------------- /bnd/vendor/golang.org/x/sys/windows/asm_windows_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // 6 | // System calls for 386, Windows are implemented in runtime/syscall_windows.goc 7 | // 8 | 9 | TEXT ·getprocaddress(SB), 7, $0-8 10 | JMP syscall·getprocaddress(SB) 11 | 12 | TEXT ·loadlibrary(SB), 7, $0-4 13 | JMP syscall·loadlibrary(SB) 14 | -------------------------------------------------------------------------------- /bnd/vendor/golang.org/x/sys/windows/asm_windows_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // 6 | // System calls for amd64, Windows are implemented in runtime/syscall_windows.goc 7 | // 8 | 9 | TEXT ·getprocaddress(SB), 7, $0-32 10 | JMP syscall·getprocaddress(SB) 11 | 12 | TEXT ·loadlibrary(SB), 7, $0-8 13 | JMP syscall·loadlibrary(SB) 14 | -------------------------------------------------------------------------------- /bnd/vendor/golang.org/x/sys/windows/env_unset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | // +build go1.4 7 | 8 | package windows 9 | 10 | import "syscall" 11 | 12 | func Unsetenv(key string) error { 13 | // This was added in Go 1.4. 14 | return syscall.Unsetenv(key) 15 | } 16 | -------------------------------------------------------------------------------- /bnd/vendor/golang.org/x/sys/windows/env_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Windows environment variables. 6 | 7 | package windows 8 | 9 | import "syscall" 10 | 11 | func Getenv(key string) (value string, found bool) { 12 | return syscall.Getenv(key) 13 | } 14 | 15 | func Setenv(key, value string) error { 16 | return syscall.Setenv(key, value) 17 | } 18 | 19 | func Clearenv() { 20 | syscall.Clearenv() 21 | } 22 | 23 | func Environ() []string { 24 | return syscall.Environ() 25 | } 26 | -------------------------------------------------------------------------------- /bnd/vendor/golang.org/x/sys/windows/eventlog.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | 7 | package windows 8 | 9 | const ( 10 | EVENTLOG_SUCCESS = 0 11 | EVENTLOG_ERROR_TYPE = 1 12 | EVENTLOG_WARNING_TYPE = 2 13 | EVENTLOG_INFORMATION_TYPE = 4 14 | EVENTLOG_AUDIT_SUCCESS = 8 15 | EVENTLOG_AUDIT_FAILURE = 16 16 | ) 17 | 18 | //sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW 19 | //sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource 20 | //sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW 21 | -------------------------------------------------------------------------------- /bnd/vendor/golang.org/x/sys/windows/memory_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | const ( 8 | MEM_COMMIT = 0x00001000 9 | MEM_RESERVE = 0x00002000 10 | MEM_DECOMMIT = 0x00004000 11 | MEM_RELEASE = 0x00008000 12 | MEM_RESET = 0x00080000 13 | MEM_TOP_DOWN = 0x00100000 14 | MEM_WRITE_WATCH = 0x00200000 15 | MEM_PHYSICAL = 0x00400000 16 | MEM_RESET_UNDO = 0x01000000 17 | MEM_LARGE_PAGES = 0x20000000 18 | 19 | PAGE_NOACCESS = 0x01 20 | PAGE_READONLY = 0x02 21 | PAGE_READWRITE = 0x04 22 | PAGE_WRITECOPY = 0x08 23 | PAGE_EXECUTE_READ = 0x20 24 | PAGE_EXECUTE_READWRITE = 0x40 25 | PAGE_EXECUTE_WRITECOPY = 0x80 26 | ) 27 | -------------------------------------------------------------------------------- /bnd/vendor/golang.org/x/sys/windows/mksyscall.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go 8 | -------------------------------------------------------------------------------- /bnd/vendor/golang.org/x/sys/windows/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows,race 6 | 7 | package windows 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /bnd/vendor/golang.org/x/sys/windows/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows,!race 6 | 7 | package windows 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /bnd/vendor/golang.org/x/sys/windows/registry/mksyscall.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package registry 6 | 7 | //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go syscall.go 8 | -------------------------------------------------------------------------------- /bnd/vendor/golang.org/x/sys/windows/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | 7 | package windows 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + itoa(-val) 12 | } 13 | var buf [32]byte // big enough for int64 14 | i := len(buf) - 1 15 | for val >= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /bnd/vendor/golang.org/x/sys/windows/types_windows_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | -------------------------------------------------------------------------------- /bnd/vendor/golang.org/x/sys/windows/types_windows_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | MaxSockets uint16 11 | MaxUdpDg uint16 12 | VendorInfo *byte 13 | Description [WSADESCRIPTION_LEN + 1]byte 14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Proto *byte 21 | Port uint16 22 | } 23 | -------------------------------------------------------------------------------- /bnd/vendor/golang.org/x/text/encoding/simplifiedchinese/all.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package simplifiedchinese 6 | 7 | import ( 8 | "golang.org/x/text/encoding" 9 | ) 10 | 11 | // All is a list of all defined encodings in this package. 12 | var All = []encoding.Encoding{GB18030, GBK, HZGB2312} 13 | -------------------------------------------------------------------------------- /bnd2/.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.dll 3 | *.so 4 | *.dylib 5 | node_modules 6 | 7 | # Test binary, build with `go test -c` 8 | *.test 9 | 10 | # Output of the go coverage tool, specifically when used with LiteIDE 11 | *.out 12 | react/build 13 | electron/dist 14 | 15 | # IDE 16 | .idea/ 17 | 18 | -------------------------------------------------------------------------------- /bnd2/bnd2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd2/bnd2 -------------------------------------------------------------------------------- /bnd2/bnd2.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd2/bnd2.exe -------------------------------------------------------------------------------- /bnd2/build.bat: -------------------------------------------------------------------------------- 1 | echo Building Kernel 2 | set GOOS=windows 3 | set GOARCH=amd64 4 | go build -v -o bnd2.exe -ldflags "-s -w -H=windowsgui" 5 | 6 | set GOOS=darwin 7 | set GOARCH=amd64 8 | go build -v -o electron/bnd2 -ldflags "-s -w" 9 | 10 | echo Building UI 11 | cd electron 12 | npm install && npm run dist 13 | cd .. -------------------------------------------------------------------------------- /bnd2/command/canceltraverse.go: -------------------------------------------------------------------------------- 1 | package command 2 | 3 | type canceltraverse struct { 4 | } 5 | 6 | func (cmd *canceltraverse) Exec(param map[string]interface{}) { 7 | traverseCmd.reset() 8 | } 9 | 10 | func (cmd *canceltraverse) Name() string { 11 | return "canceltraverse" 12 | } 13 | -------------------------------------------------------------------------------- /bnd2/command/counttasks.go: -------------------------------------------------------------------------------- 1 | package command 2 | 3 | import ( 4 | "time" 5 | 6 | "github.com/b3log/bnd2/util" 7 | ) 8 | 9 | type counttasks struct { 10 | } 11 | 12 | func (cmd *counttasks) Name() string { 13 | return "counttasks" 14 | } 15 | 16 | var count = 0 17 | 18 | func (cmd *counttasks) Exec(param map[string]interface{}) { 19 | for { 20 | time.Sleep(time.Second) 21 | 22 | curCnt := len(tasks) 23 | if curCnt == count { 24 | continue 25 | } 26 | 27 | count = curCnt 28 | 29 | result := util.NewCmdResult(cmd.Name()) 30 | result.Data = map[string]interface{}{ 31 | "taskCount": curCnt, 32 | } 33 | 34 | util.Push(result.Bytes()) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /bnd2/command/delctask.go: -------------------------------------------------------------------------------- 1 | package command 2 | 3 | type delctask struct { 4 | } 5 | 6 | func (cmd *delctask) Name() string { 7 | return "delctask" 8 | } 9 | 10 | func (cmd *delctask) Exec(param map[string]interface{}) { 11 | gid := param["gid"].(string) 12 | deleteCTask(gid) 13 | } 14 | -------------------------------------------------------------------------------- /bnd2/command/delctaskall.go: -------------------------------------------------------------------------------- 1 | package command 2 | 3 | import ( 4 | "github.com/b3log/bnd2/util" 5 | ) 6 | 7 | type delctaskall struct { 8 | } 9 | 10 | func (cmd *delctaskall) Name() string { 11 | return "delctaskall" 12 | } 13 | 14 | func (cmd *delctaskall) Exec(param map[string]interface{}) { 15 | deleteAllCTasks() 16 | 17 | clisting = false 18 | result := util.NewCmdResult(lsctasksCmd.Name()) 19 | result.Data = ctasks 20 | util.Push(result.Bytes()) 21 | } 22 | -------------------------------------------------------------------------------- /bnd2/command/deldownload.go: -------------------------------------------------------------------------------- 1 | package command 2 | 3 | import "github.com/b3log/bnd2/util" 4 | 5 | type deldownload struct { 6 | } 7 | 8 | func (cmd *deldownload) Name() string { 9 | return "deldownload" 10 | } 11 | 12 | func (cmd *deldownload) Exec(param map[string]interface{}) { 13 | gid := param["gid"].(string) 14 | util.R.Remove(gid) 15 | deleteTask(gid) 16 | } 17 | -------------------------------------------------------------------------------- /bnd2/command/deldownloadall.go: -------------------------------------------------------------------------------- 1 | package command 2 | 3 | import ( 4 | "github.com/b3log/bnd2/util" 5 | ) 6 | 7 | type deldownloadall struct { 8 | } 9 | 10 | func (cmd *deldownloadall) Name() string { 11 | return "deldownloadall" 12 | } 13 | 14 | func (cmd *deldownloadall) Exec(param map[string]interface{}) { 15 | for _, task := range tasks { 16 | util.R.Remove(task.Gid) 17 | } 18 | deleteAllTasks() 19 | 20 | listing = false 21 | result := util.NewCmdResult(lstasksCmd.Name()) 22 | result.Data = tasks 23 | util.Push(result.Bytes()) 24 | } 25 | -------------------------------------------------------------------------------- /bnd2/command/ls.go: -------------------------------------------------------------------------------- 1 | package command 2 | 3 | import ( 4 | "github.com/b3log/bnd2/util" 5 | ) 6 | 7 | type ls struct { 8 | } 9 | 10 | func (cmd *ls) Exec(param map[string]interface{}) { 11 | ret := util.NewCmdResult(cmd.Name()) 12 | path := param["path"].(string) 13 | by := param["by"].(string) 14 | order := param["order"].(string) 15 | 16 | ret.Data = util.Ls(path, by, order) 17 | 18 | util.Push(ret.Bytes()) 19 | } 20 | 21 | func (cmd *ls) Name() string { 22 | return "ls" 23 | } 24 | -------------------------------------------------------------------------------- /bnd2/command/pause.go: -------------------------------------------------------------------------------- 1 | package command 2 | 3 | type pause struct { 4 | } 5 | 6 | func (cmd *pause) Name() string { 7 | return "pause" 8 | } 9 | 10 | func (cmd *pause) Exec(param map[string]interface{}) { 11 | gid := param["gid"].(string) 12 | if t := getTask(gid); nil != t { 13 | t.pause() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /bnd2/command/pauseall.go: -------------------------------------------------------------------------------- 1 | package command 2 | 3 | import ( 4 | "time" 5 | 6 | "github.com/b3log/bnd2/util" 7 | ) 8 | 9 | type pauseall struct { 10 | } 11 | 12 | func (cmd *pauseall) Name() string { 13 | return "pauseall" 14 | } 15 | 16 | func (cmd *pauseall) Exec(param map[string]interface{}) { 17 | ok, err := util.R.PauseAll() 18 | if nil != err { 19 | logger.Errorf("pause all tasks failed [%s]", err) 20 | 21 | return 22 | } 23 | 24 | for _, task := range tasks { 25 | task.HState = "暂停" 26 | task.State = statePaused 27 | task.Speed = "0 B" 28 | } 29 | 30 | logger.Infof("paused all tasks [%s]", ok) 31 | listing = false 32 | 33 | time.Sleep(time.Second) 34 | result := util.NewCmdResult(lstasksCmd.Name()) 35 | result.Data = tasks 36 | util.Push(result.Bytes()) 37 | } 38 | -------------------------------------------------------------------------------- /bnd2/command/unpause.go: -------------------------------------------------------------------------------- 1 | package command 2 | 3 | type unpause struct { 4 | } 5 | 6 | func (cmd *unpause) Name() string { 7 | return "unpause" 8 | } 9 | 10 | func (cmd *unpause) Exec(param map[string]interface{}) { 11 | gid := param["gid"].(string) 12 | if t := getTask(gid); nil != t { 13 | t.unpause() 14 | } 15 | 16 | go lstasksCmd.Exec(map[string]interface{}{}) 17 | } 18 | -------------------------------------------------------------------------------- /bnd2/command/unpauseall.go: -------------------------------------------------------------------------------- 1 | package command 2 | 3 | type unpauseall struct { 4 | } 5 | 6 | func (cmd *unpauseall) Name() string { 7 | return "unpauseall" 8 | } 9 | 10 | func (cmd *unpauseall) Exec(param map[string]interface{}) { 11 | for i, task := range tasks { 12 | if 5 > i { 13 | task.unpause() 14 | } 15 | } 16 | 17 | logger.Infof("unpaused all tasks") 18 | 19 | go lstasksCmd.Exec(map[string]interface{}{}) 20 | } 21 | -------------------------------------------------------------------------------- /bnd2/electron/aria2c_darwin.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd2/electron/aria2c_darwin.zip -------------------------------------------------------------------------------- /bnd2/electron/aria2c_windows.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd2/electron/aria2c_windows.zip -------------------------------------------------------------------------------- /bnd2/electron/bnd2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd2/electron/bnd2 -------------------------------------------------------------------------------- /bnd2/electron/bnd2.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd2/electron/bnd2.exe -------------------------------------------------------------------------------- /bnd2/electron/build/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd2/electron/build/icon.icns -------------------------------------------------------------------------------- /bnd2/electron/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bnd2-electron", 3 | "version": "2.0.0", 4 | "description": "百度不限速下载器", 5 | "main": "main.js", 6 | "license": "MIT", 7 | "scripts": { 8 | "start": "cross-env NODE_ENV=development electron --inspect=5858 .", 9 | "mock": "apimocker --config ../mock/mock.json", 10 | "pack": "electron-builder --dir", 11 | "dist": "cross-env ELECTRON_MIRROR=http://npm.taobao.org/mirrors/electron/ electron-builder" 12 | }, 13 | "productName": "BND2", 14 | "repository": "https://github.com/b3log/bnd2", 15 | "keywords": [ 16 | "Baidu", 17 | "下载", 18 | "不限速" 19 | ], 20 | "author": "B3log 开源", 21 | "devDependencies": { 22 | "apimocker": "^1.1.3", 23 | "cross-env": "^5.2.0", 24 | "electron": "^2.0.8", 25 | "electron-builder": "^20.44.2" 26 | }, 27 | "dependencies": { 28 | "extract-zip": "^1.6.7", 29 | "ssl-root-cas": "^1.3.1" 30 | }, 31 | "build": { 32 | "appId": "org.b3log.bnd2" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /bnd2/mock/mock.json: -------------------------------------------------------------------------------- 1 | { 2 | "mockDirectory": "../mock", 3 | "allowedHeaders": [ 4 | "Content-Type", 5 | "*" 6 | ], 7 | "allowedDomains": [ 8 | "localhost" 9 | ], 10 | "webServices": { 11 | "status": { 12 | "verbs": [ 13 | "get" 14 | ], 15 | "mockFile": "status.json" 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /bnd2/mock/status.json: -------------------------------------------------------------------------------- 1 | { 2 | "code": 0, 3 | "msg": "", 4 | "data": { 5 | "version": "1.1.0" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /bnd2/react/README.md: -------------------------------------------------------------------------------- 1 | # Create React App example 2 | 3 | ## How to use 4 | 5 | Download the example [or clone the repo](https://github.com/mui-org/material-ui): 6 | 7 | ```bash 8 | curl https://codeload.github.com/mui-org/material-ui/tar.gz/master | tar -xz --strip=2 material-ui-master/examples/create-react-app 9 | cd create-react-app 10 | ``` 11 | 12 | Install it and run: 13 | 14 | ```bash 15 | npm install 16 | npm run start 17 | ``` 18 | 19 | ## The idea behind the example 20 | 21 | [Create React App](https://github.com/facebookincubator/create-react-app) with no build configuration. 22 | -------------------------------------------------------------------------------- /bnd2/react/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bnd2-react", 3 | "version": "1.0.0", 4 | "private": true, 5 | "dependencies": { 6 | "@material-ui/core": "^4.2.0", 7 | "@material-ui/icons": "^4.2.1", 8 | "classnames": "^2.2.6", 9 | "echarts": "^4.2.1", 10 | "electron": "^5.0.6", 11 | "fetch-jsonp": "^1.1.3", 12 | "prop-types": "latest", 13 | "react": "latest", 14 | "react-dom": "latest", 15 | "react-router-dom": "^5.0.1", 16 | "react-scripts": "^3.0.1", 17 | "reconnectingwebsocket": "^1.0.0" 18 | }, 19 | "scripts": { 20 | "mock": "apimocker --config ../mock/mock.json", 21 | "start": "react-scripts start", 22 | "build": "react-scripts build", 23 | "test": "react-scripts test --env=jsdom", 24 | "eject": "react-scripts eject" 25 | }, 26 | "browserslist": [ 27 | ">0.2%", 28 | "not dead", 29 | "not ie <= 11", 30 | "not op_mini all" 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /bnd2/react/public/alipay-donate.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd2/react/public/alipay-donate.jpg -------------------------------------------------------------------------------- /bnd2/react/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BND2 6 | 7 | 8 |
9 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /bnd2/react/public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd2/react/public/logo.png -------------------------------------------------------------------------------- /bnd2/react/public/wechat-donate.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/baidu-netdisk-downloaderx/6dbb293cc25397a61ecee25e9fc3b9a0ee4a2772/bnd2/react/public/wechat-donate.jpg -------------------------------------------------------------------------------- /bnd2/react/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom' 3 | import App from './App' 4 | import { ws } from './utils' 5 | 6 | (async () => { 7 | await ws() 8 | ReactDOM.render(, document.querySelector('#root')) 9 | })() 10 | 11 | -------------------------------------------------------------------------------- /bnd2/react/src/pages/donate.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import PropTypes from 'prop-types' 3 | 4 | export default class Donate extends React.Component { 5 | 6 | openGithub () { 7 | window.shell.openExternal( 8 | 'https://github.com/b3log/baidu-netdisk-downloaderx') 9 | } 10 | 11 | render () { 12 | const {classes} = this.props 13 | return ( 14 |
15 |

16 | 如果你觉得 BND2 还不错,欢迎成为我们的赞助者
18 | 微信捐赠 19 | 支付宝捐赠 20 |
21 | ) 22 | } 23 | } 24 | 25 | Donate.propTypes = { 26 | classes: PropTypes.object.isRequired, 27 | } -------------------------------------------------------------------------------- /bnd2/react/src/styles/donate.js: -------------------------------------------------------------------------------- 1 | import DEFAULT_FONT from './font' 2 | 3 | export default { 4 | donate: { 5 | fontFamily: DEFAULT_FONT, 6 | textAlign: 'center' 7 | }, 8 | donateImg: { 9 | width: '300px', 10 | margin: '14px' 11 | } 12 | } -------------------------------------------------------------------------------- /bnd2/react/src/styles/font.js: -------------------------------------------------------------------------------- 1 | export default 'Helvetica Neue,Luxi Sans,DejaVu Sans,Tahoma,Hiragino Sans GB,Microsoft Yahei,sans-serif' -------------------------------------------------------------------------------- /bnd2/react/src/styles/index.js: -------------------------------------------------------------------------------- 1 | import side from './side' 2 | import list from './list' 3 | import utils from './utils' 4 | import donate from './donate' 5 | import welcome from './welcome' 6 | import DEFAULT_FONT from './font' 7 | 8 | export default theme => ( 9 | Object.assign({ 10 | b3log: { 11 | border: 0, 12 | height: '100vh', 13 | width: '320px', 14 | }, 15 | content: { 16 | fontFamily: DEFAULT_FONT, 17 | padding: '63px 24px 24px 24px', 18 | height: '100vh', 19 | position: 'absolute', 20 | left: '58px', 21 | right: 0, 22 | overflow: 'auto', 23 | }, 24 | menu: { 25 | left: '58px', 26 | width: 'auto', 27 | '&>div': { 28 | minHeight: '51px', 29 | } 30 | }, 31 | }, utils, side, list, donate, welcome) 32 | ) 33 | -------------------------------------------------------------------------------- /bnd2/react/src/styles/list.js: -------------------------------------------------------------------------------- 1 | export default { 2 | listItem: { 3 | padding: '14px', 4 | marginBottom: '14px', 5 | backgroundColor: 'rgba(0, 0, 0, 0.08)', 6 | }, 7 | listMeta: { 8 | display: 'flex', 9 | fontSize: '12px', 10 | color: 'rgba(0,0,0,.38)', 11 | lineHeight: '12px', 12 | }, 13 | listProgress: { 14 | height: '3px', 15 | marginTop: '3px', 16 | }, 17 | listTitle: { 18 | flex: 1, 19 | lineHeight: '16px', 20 | fontSize: '14px', 21 | }, 22 | } -------------------------------------------------------------------------------- /bnd2/react/src/styles/side.js: -------------------------------------------------------------------------------- 1 | export default { 2 | sideLi: { 3 | width: '58px', 4 | padding: 0, 5 | overflowX: 'hidden', 6 | }, 7 | sideItemCurrent: { 8 | display: 'block', 9 | backgroundColor: 'rgba(0, 0, 0, 0.08)', 10 | }, 11 | sideSVG: { 12 | height: '34px', 13 | marginRight: 0, 14 | }, 15 | } -------------------------------------------------------------------------------- /bnd2/react/src/styles/welcome.js: -------------------------------------------------------------------------------- 1 | export default { 2 | welcomeCard: { 3 | flex: 1, 4 | margin: '10px 0 24px', 5 | }, 6 | welcomeCardMid: { 7 | margin: '10px 24px 24px 24px', 8 | }, 9 | welcomeChart: { 10 | marginTop: '24px', 11 | opacity: 1 12 | }, 13 | welcomeChartHide: { 14 | opacity: 0 15 | }, 16 | welcomeChartContent: { 17 | height: '300px', 18 | margin: '0 auto' 19 | }, 20 | welcomeProcess: { 21 | height: '14px', 22 | marginTop: '14px' 23 | } 24 | } -------------------------------------------------------------------------------- /bnd2/react/src/utils.js: -------------------------------------------------------------------------------- 1 | import ReconnectingWebSocket from 'reconnectingwebsocket' 2 | 3 | export const ws = () => { 4 | return new Promise(function (resolve) { 5 | if (!window.rws) { 6 | window.rws = new ReconnectingWebSocket('ws://localhost:6804/ws', null, 7 | {reconnectInterval: 10000}) 8 | } 9 | 10 | window.rws.onopen = function () { 11 | resolve() 12 | } 13 | }) 14 | } -------------------------------------------------------------------------------- /bnd2/react/src/withRoot.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { MuiThemeProvider, createMuiTheme } from '@material-ui/core/styles'; 3 | import CssBaseline from '@material-ui/core/CssBaseline'; 4 | import DEFAULT_FONT from './styles/font'; 5 | 6 | const theme = createMuiTheme({ 7 | palette: { 8 | primary: { 9 | light: '#679df6', 10 | main: '#4285f4', 11 | dark: '#2e5daa', 12 | }, 13 | secondary: { 14 | light: '#db655a', 15 | main: '#d23f31', 16 | dark: '#932c22', 17 | }, 18 | }, 19 | typography: { 20 | fontFamily: DEFAULT_FONT, 21 | }, 22 | }); 23 | 24 | function withRoot(Component) { 25 | function WithRoot(props) { 26 | // MuiThemeProvider makes the theme available down the React tree 27 | // thanks to React context. 28 | return ( 29 | 30 | {/* CssBaseline kickstart an elegant, consistent, and simple baseline to build upon. */} 31 | 32 | 33 | 34 | ); 35 | } 36 | 37 | return WithRoot; 38 | } 39 | 40 | export default withRoot; 41 | -------------------------------------------------------------------------------- /bnd2/util/conf.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "path/filepath" 5 | ) 6 | 7 | const Ver = "2.0.0" 8 | 9 | var SK = []byte("696D887C9AA0611B") 10 | var UserAgent = "BND2/v" + Ver 11 | 12 | const ( 13 | ServerPort = 6804 14 | AriaPort = 6805 15 | ) 16 | 17 | var HomeDir = UserHome() 18 | var BndDir = filepath.Join(HomeDir, ".bnd2") 19 | -------------------------------------------------------------------------------- /bnd2/util/hacpai.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "path/filepath" 5 | ) 6 | 7 | type user struct { 8 | SaveDir string `json:"saveDir"` 9 | } 10 | 11 | var User = &user{SaveDir: filepath.Join(HomeDir, "Downloads")} 12 | -------------------------------------------------------------------------------- /bnd2/util/hidewin.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package util 4 | 5 | import ( 6 | "os/exec" 7 | ) 8 | 9 | func hideWindow(cmd *exec.Cmd) { 10 | } 11 | -------------------------------------------------------------------------------- /bnd2/util/hidewin_windows.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "os/exec" 5 | "syscall" 6 | ) 7 | 8 | func hideWindow(cmd *exec.Cmd) { 9 | cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true} 10 | } 11 | -------------------------------------------------------------------------------- /bnd2/util/result.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | ) 7 | 8 | type Result struct { 9 | Code int `json:"code"` 10 | Cmd string `json:"cmd"` 11 | Msg string `json:"msg"` 12 | Data interface{} `json:"data"` 13 | } 14 | 15 | func NewResult() *Result { 16 | return &Result{ 17 | Code: 0, 18 | Msg: "", 19 | Data: nil, 20 | } 21 | } 22 | 23 | func NewCmdResult(cmd string) *Result { 24 | ret := NewResult() 25 | ret.Cmd = cmd 26 | 27 | return ret 28 | } 29 | 30 | func (r *Result) Bytes() []byte { 31 | ret, err := json.Marshal(r) 32 | if nil != err { 33 | logger.Errorf("marshal result [%#v] failed [%s]", r, err) 34 | } 35 | 36 | return ret 37 | } 38 | -------------------------------------------------------------------------------- /bnd2/util/ws.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "gopkg.in/olahol/melody.v1" 5 | ) 6 | 7 | var s *melody.Session 8 | 9 | func SetPushChan(session *melody.Session) { 10 | s = session 11 | } 12 | 13 | func Push(msg []byte) { 14 | s.Write(msg) 15 | } 16 | --------------------------------------------------------------------------------