IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> 网络协议 -> Delphi 7 (Out of Date) + HTTP + Batch + SQLite3 Trick -> 正文阅读

[网络协议]Delphi 7 (Out of Date) + HTTP + Batch + SQLite3 Trick

Enable Long Paths in Windows 10

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
"LongPathsEnabled"=dword:00000001
python -m pip install --upgrade pip
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

GNU Tools

C:\
  └─ dbin
     ├─ curl-ca-bundle.crt
     ├─ libcurl-x64.dll
     ├─ curl.exe
     │ 
     ├─ awk.exe
     ├─ sed.exe
     ├─ wget.exe
     ├─ jq.exe
     └─ sqlite3.exe
C:\dbin>.\curl --version
curl 7.64.0 (x86_64-pc-win32) libcurl/7.64.0 OpenSSL/1.1.1b (Schannel) zlib/1.2.11 brotli/1.0.7 WinIDN libssh2/1.8.0 nghttp2/1.36.0
Release-Date: 2019-02-06
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL libz brotli TLS-SRP HTTP2 HTTPS-proxy MultiSSL
C:\dbin>.\sqlite3 -version
3.33.0 2020-08-14 13:23:32 fca8dc8b578f215a969cd899336378966156154710873e68b3d9ac5881b0alt2
C:\dbin>.\wget --version
GNU Wget 1.21.1 built on mingw32.

+cares +digest +gpgme +https +ipv6 +iri +large-file +metalink -nls
+ntlm +opie +psl +ssl/openssl

Wgetrc:
    /win32dev/misc/wget/out64/etc/wgetrc (system)
Compile:
    x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H
    -DSYSTEM_WGETRC="/win32dev/misc/wget/out64/etc/wgetrc"
    -DLOCALEDIR="/win32dev/misc/wget/out64/share/locale" -I. -I../lib
    -I../lib -I/win32dev/misc/wget/out64/include
    -I/win32dev/misc/wget/out64/include
    -I/win32dev/misc/wget/out64/include -DCARES_STATICLIB
    -I/win32dev/misc/wget/out64/include -DPCRE2_STATIC
    -I/win32dev/misc/wget/out64/include
    -I/win32dev/misc/wget/out64/include -DHAVE_LIBSSL
    -I/win32dev/misc/wget/out64/include
    -I/win32dev/misc/wget/out64/include -DNDEBUG -g -O2
Link:
    x86_64-w64-mingw32-gcc -I/win32dev/misc/wget/out64/include
    -I/win32dev/misc/wget/out64/include -DCARES_STATICLIB
    -I/win32dev/misc/wget/out64/include -DPCRE2_STATIC
    -I/win32dev/misc/wget/out64/include
    -I/win32dev/misc/wget/out64/include -DHAVE_LIBSSL
    -I/win32dev/misc/wget/out64/include
    -I/win32dev/misc/wget/out64/include -DNDEBUG -g -O2
    -L/win32dev/misc/wget/out64/lib -L/win32dev/misc/wget/out64/lib
    -lmetalink -lunistring -liconv -L/win32dev/misc/wget/out64/lib
    -lcares -L/win32dev/misc/wget/out64/lib -lpcre2-8
    -L/win32dev/misc/wget/out64/lib -lssl -lcrypto
    -L/win32dev/misc/wget/out64/lib -lz -L/win32dev/misc/wget/out64/lib
    -lpsl -lidn2 -lunistring -liconv -lws2_32 -lole32 -lcrypt32 -lexpat
    -L/win32dev/misc/wget/out64/lib -lgpgme -lassuan -lgpg-error
    ftp-opie.o mswindows.o openssl.o http-ntlm.o ../lib/libgnu.a
    -lws2_32 -lws2_32 -lws2_32 -lws2_32 -lws2_32
    /win32dev/misc/wget/out64/lib/libiconv.a
    /win32dev/misc/wget/out64/lib/libunistring.a -lws2_32

Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://www.gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Originally written by Hrvoje Niksic <hniksic@xemacs.org>.
Please send bug reports and questions to <bug-wget@gnu.org>.
C:\dbin>.\jq
jq - commandline JSON processor [version 1.6]

Usage:  .\jq [options] <jq filter> [file...]
        .\jq [options] --args <jq filter> [strings...]
        .\jq [options] --jsonargs <jq filter> [JSON_TEXTS...]

jq is a tool for processing JSON inputs, applying the given filter to
its JSON text inputs and producing the filter's results as JSON on
standard output.

The simplest filter is ., which copies jq's input to its output
unmodified (except for formatting, but note that IEEE754 is used
for number representation internally, with all that that implies).

For more advanced filters see the jq(1) manpage ("man jq")
and/or https://stedolan.github.io/jq

Example:

        $ echo '{"foo": 0}' | jq .
        {
                "foo": 0
        }

For a listing of options, use .\jq --help.

Delphi 7 invoker

procedure TFormWorker.ButtonImageClick(Sender: TObject);
var
  line: String;
begin
  line := 'C:\dbin\acquisition.cmd';
  WinExec(PChar(line), SW_SHOW);
end;

DOS Recent 4 Days Arguments

:: ===========================================================================
:: PLEASE DO NOT EDIT THIS FILE
:: ===========================================================================
@D:
@CD D:\HCUnion
:: ===========================================================================
@mkdir tmp >NUL 2>NUL
@CD    tmp
:: ===========================================================================
@SET SQLFILE=recent_4_days.sql

@SET LINE=.output %EXPORT%
@ECHO %LINE%                                                       > %SQLFILE%

@ECHO SELECT 'mars ' ^|^| DATE('NOW', '-4 DAYS')                  >> %SQLFILE%
@ECHO UNION                                                       >> %SQLFILE%
@ECHO SELECT 'mars ' ^|^| DATE('NOW', '-3 DAYS')                  >> %SQLFILE%
@ECHO UNION                                                       >> %SQLFILE%
@ECHO SELECT 'mars ' ^|^| DATE('NOW', '-2 DAYS')                  >> %SQLFILE%
@ECHO UNION                                                       >> %SQLFILE%
@ECHO SELECT 'mars ' ^|^| DATE('NOW', '-1 DAYS');                 >> %SQLFILE%

@SET LINE=.output stdout
@ECHO %LINE%                                                      >> %SQLFILE%

:: TYPE %SQLFILE%

@sqlite3 tmp.db                                                    < %SQLFILE%
:: ===========================================================================
@CD ..
:: ===========================================================================

tok.cmd

:: ===========================================================================
:: PLEASE DO NOT EDIT THIS FILE
:: ===========================================================================
@C:
@CD C:\dbin
:: ===========================================================================
@SET TOKEN_HEADER="Content-Type: multipart/form-data"
@SET TOKEN_URL="https://106.52.243.222:8088/netcaquicksign/docmgr/extintf/apply_new_token"
:: ===========================================================================
@SET POST_ARG1=-F "signer_name=HCUnion"
@SET POST_ARG2=-F "signer_phone_num=13987654321"
@SET POST_ARG3=-F "signer_id_num=110101199003078857"
@SET POST_ARG4=-F "verify_code=5bdLGPT3PQ+wn4lQRWRvUa8fhU0="
@SET POST_ARG5=-F "sign_id_type=1"
@SET POST_ARG6=-F "sign_mode=1"
@SET POST_ARG7=-F "nonce=123456"
@SET POST_ARG8=-F "unique_identity=7d020064-478e-4506-8930-161e5c182e0a"
:: ===========================================================================
@SET POST_ARGC=-k -s
:: ===========================================================================

@curl %POST_ARG1% %POST_ARG2% %POST_ARG3% %POST_ARG4% %POST_ARG5% %POST_ARG6% %POST_ARG7% %POST_ARG8% %TOKEN_URL% %POST_ARGC% | jq .contents.task_token | sed 's/\"//g'

:: ===========================================================================

ack.cmd

:: ===========================================================================
:: PLEASE DO NOT EDIT THIS FILE
:: ===========================================================================
@CALL chcp 936 > NUL
:: ===========================================================================
@C:
@CD C:\dbin
:: ===========================================================================
@SET TARGET_HEADER=-H "Content-Type: multipart/form-data"
@SET TARGET_URL=-X POST "https://106.52.243.222:8088/netcaquicksign/docmgr/extintf/upload_pdf"
:: ===========================================================================
@SET POST_ARGC=-k -s
:: ===========================================================================

@SET POST_FILE=-F "pdf_file=@link.pdf;type=application/pdf"
@SET POST_ARG4=-F "doc_name=link.pdf"

@SET POST_ARG1=-F "task_token=8baa30e3-1b46-487d-b039-acbf5af41734"
@SET POST_ARG2=-F "doc_id=20002"

@SET POST_ARG5=-F "doc_title=测试"
@SET POST_ARG3=-F "doc_description=测试"
@SET POST_ARG6=-F "need_appearance=true"
@SET POST_ARG7=
@SET POST_ARG7=-F "key_words=['女方签名','男方签名']"

@.\curl -H %TARGET_HEADER% %POST_FILE% %POST_ARG1% %POST_ARG2% %POST_ARG3% %POST_ARG4% %POST_ARG5% %POST_ARG6% %POST_ARG7% %TARGET_URL% %POST_ARGC% | jq

:: ===========================================================================
:: @timeout 3
:: ===========================================================================
C:\dbin>tok
7978a8be-c2d3-438b-83c1-1ad37c9f671b

C:\dbin>ack
{
  "status": 1,
  "message": "成功",
  "contents": {
    "code": 1,
    "result_message": "成功"
  }
}

tok.cmd ? token ? ack.cmd

acquisition.cmd

:: ===========================================================================
:: PLEASE DO NOT EDIT THIS FILE
:: ===========================================================================
@CALL chcp 936 > NUL
:: ===========================================================================
@C:
@CD C:\dbin
:: ===========================================================================
@SET DOC_ID=%1
@SET PDF_FILE=%2
:: ===========================================================================
@ECHO OFF
@SET tokenOut=
@for /F %%i in ('tok.cmd') do ( @SET tokenOut=%%i)
@ECHO ON
:: ===========================================================================
@SET TARGET_HEADER=-H "Content-Type: multipart/form-data"
@SET TARGET_URL=-X POST "https://106.52.243.222:8088/netcaquicksign/docmgr/extintf/upload_pdf"
:: ===========================================================================
@SET POST_ARGC=-k -s
:: ===========================================================================
@SET POST_ARG1=-F "task_token=%tokenOut%"
@SET POST_ARG2=-F "doc_id=%DOC_ID%"

@SET POST_FILE=-F "pdf_file=@%PDF_FILE%;type=application/pdf"
@SET POST_ARG3=-F "doc_name=%PDF_FILE%"

@SET POST_ARG4=-F "doc_title=建档"
@SET POST_ARG5=-F "doc_description=建档"
@SET POST_ARG6=-F "need_appearance=true"
@SET POST_ARG7=-F "key_words=['女方签名','男方签名']"
:: ===========================================================================

@.\curl -H %TARGET_HEADER% %POST_FILE% %POST_ARG1% %POST_ARG2% %POST_ARG3% %POST_ARG4% %POST_ARG5% %POST_ARG6% %POST_ARG7% %TARGET_URL% %POST_ARGC% | jq

:: ===========================================================================
  网络协议 最新文章
使用Easyswoole 搭建简单的Websoket服务
常见的数据通信方式有哪些?
Openssl 1024bit RSA算法---公私钥获取和处
HTTPS协议的密钥交换流程
《小白WEB安全入门》03. 漏洞篇
HttpRunner4.x 安装与使用
2021-07-04
手写RPC学习笔记
K8S高可用版本部署
mySQL计算IP地址范围
上一篇文章      下一篇文章      查看所有文章
加:2022-04-07 23:04:59  更:2022-04-07 23:05:29 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年11日历 -2024/11/26 4:39:27-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码