• www.7seasnft.com、数字藏品、总结


    项目思路:

    Iv: 随机16位Uint8Array的数组,再转成16进制字符串。

    this._transport.send('{"data":"3c993da0f00f3fd751ba6947ff31305c4d15f193e7bb31ac06846dd29790b6af177447f8c5bfd0632d5352041376f26b97318b5459f860f51037d240d5481fc217359537aff61a39eea05ff430d93568511c605712f3975a29529dbcaee815472babaad5a28039855105e039282b4c33757abbf5ed0346f4813c7825481b045c6a62846e30d5425770da8bc5bf3f58324f5895f70a4253d1884db25a3aeb1f1096c6f6b984f810558f53d52d45e0e57e98382df0897528ae6fc987f16d6ebc2c8f22af9cd5268c6fb7248580fb8c7efbb2e7dafcc6b076e62cb74818849cbf143ff86ce2ae711c58abde74cff913f9ddc8daa062abc7a7bf04c2def67a8c12a9e2355eb274f89273576d0ed2cd0ab88a1f805d8940957abcf7440bccc124c97c642701991c2486f61959267558f1fd8202714b92cd560ca9f97e9770f135ecc0a97bfedaa8e6d79186f9470ada27ae14c745693e829b306194a5199694816cedc47399346746087839e918abf1acd7b9","hmac":"eb2c2878987c04c1cd86ba818ebc05e8e717825a96d1f82debe087c1704ca079","iv":"2addb8e84ce047b4b5c4b5e4267f62f1"}', '111111', false)

    Websocket send

    "{\"topic\":\"111111\",\"type\":\"pub\",\"payload\":\"{\\\"data\\\":\\\"948a32e1d283138aaa0f0943034f403550c1972f32bff65d5b46397cd668627063457a7add137a6a20b44446556f0a28c9b33a4ead983343e2873cf6f5aa3685fe75ef6771ac5852538f77083665f988eb481ad1a8a734a701a9cf2df0955b527f59c31e86183386dddab89f67ab6d214f584bafe5104d3a818ea0a459a0007e2379f39a1d4e51dee80f92e20eac8891ccb821bf6da10f4c83d060d3d8267bd22ad4be77e1a9c6c9f67cb23eae294d5213048f36bcd2ab58e6d72aac2ccf37d9c3d3680486ecb5be60b34556064352c9f11c28042c5f9a5b2ed0612f9cace1d97a8d56851cca90c4b63da418fa4d86c8625e1137d7fee7a1a9d16d4615f11d8dd4e410e9aeb1fb4c3b20b3f077a36b5dd799f148f6382f4f43f48798e5d2db11ec784e55c1b6eddcfb4408c01844bc1860c9df6c44bb5bc94520320995dbbbb28bc63e31ad1e10fc08c8fb86504f6224a7c1305122ea1ef346cba35fb1aeab34ed7b3602ed871d8e8df077525d8fbe5d\\\",\\\"hmac\\\":\\\"566e762888c6e88b316cb5f99f7371ddc193f3544cd1892adff08a89d7ca7d80\\\",\\\"iv\\\":\\\"7204ef8d52d2dca3679bcdec71f51205\\\"}\",\"silent\":false}"

    https://u.bridge.walletconnect.org/?env=browser&host=www.7seasnft.com&protocol=wc&version=1

    JavaScript加密部分

    1. App……..27fd.js
    2. 868 erc20Approve: function() {
    3. 106757 f.prototype._encodeMethodABI = function() {
    4. var e = this._method.signature
    5. , t = this.arguments || []
    6. , n = !1
    7. , r = this._parent.options.jsonInterface.filter((function(t) {
    8. return "constructor" === e && t.type === e || (t.signature === e || t.signature === e.replace("0x", "") || t.name === e) && "function" === t.type
    9. }
    10. )).map((function(e) {
    11. var r = Array.isArray(e.inputs) ? e.inputs.length : 0;
    12. if (r !== t.length)
    13. throw new Error("The number of arguments is not matching the methods required number. You need to pass " + r + " arguments.");
    14. return "function" === e.type && (n = e.signature),
    15. Array.isArray(e.inputs) ? e.inputs : []
    16. }
    17. )).map((function(e) {
    18. return l.encodeParameters(e, t).replace("0x", "")
    19. }
    20. ))[0] || "";
    21. if ("constructor" === e) {
    22. if (!this._deployData)
    23. throw new Error("The contract has no contract data option set. This is necessary to append the constructor parameters.");
    24. return this._deployData.startsWith("0x") || (this._deployData = "0x" + this._deployData),
    25. this._deployData + r
    26. }
    27. var a = n ? n + r : r;
    28. if (!a)
    29. throw new Error("Couldn't find a matching contract method named \"" + this._method.name + '".');
    30. return a
    31. }
    32. processTransaction: async(e,t)=>{
    33. try {
    34. const n = await this.getWalletConnector()
    35. , r = await n.sendTransaction(e);
    36. t(null, r)
    37. } catch (n) {
    38. t(n)
    39. }
    40. }
    41. async sendTransaction(e) {
    42. if (!this._connected)
    43. throw new Error(c);
    44. const t = Object(a["z"])(e)
    45. , n = this._formatRequest({
    46. method: "eth_sendTransaction",
    47. params: [t]
    48. })
    49. , r = await this._sendCallRequest(n);
    50. return r
    51. }
    52. -----------------------------------------------------------------------------------------------------------------------------
    53. 23449 "2eaf": function(e, t, n) {
    54. 24038 async _sendRequest(e, t) {
    55. const n = this._formatRequest(e)
    56. , r = await this._encrypt(n)
    57. , i = "undefined" !== typeof (null === t || void 0 === t ? void 0 : t.topic) ? t.topic : this.peerId
    58. , o = JSON.stringify(r)
    59. , c = "undefined" !== typeof (null === t || void 0 === t ? void 0 : t.forcePushNotification) ? !t.forcePushNotification : Object(a["v"])(n);
    60. this._transport.send(o, i, c)
    61. 24273 async _encrypt(e) {
    62. const t = this._key;
    63. if (this._cryptoLib && t) {
    64. const n = await this._cryptoLib.encrypt(e, t);
    65. return n
    66. }
    67. return null
    68. 24364 async function z(e, t, n) {
    69. const r = R["f"](Object(a["b"])(t))
    70. , i = n || await I(128)
    71. , o = R["f"](Object(a["b"])(i))
    72. , c = R["c"](o, !1)
    73. , s = JSON.stringify(e)
    74. , d = R["z"](s)
    75. , l = await P["aesCbcEncrypt"](o, r, d)
    76. , f = R["c"](l, !1)
    77. , u = R["j"](l, o)
    78. , b = await P["hmacSha256Sign"](r, u)
    79. , h = R["c"](b, !1);

    此项目是针对 www.7seasnft.com 这个站进行编写,获取最新合适竞标,跟踪此标不断的进行加价出价,核心通信竞标采用了加密数据的websocket提交竞标金额。

  • 相关阅读:
    Prompts(二)
    同步与异步调用。什么是同步调用?什么是异步调用?异步调用和同步调用有什么区别?
    初步认识JAVA
    学生管理系统学生分数查询系统
    Linux基础篇——认识指令
    XML是不是主要用做配置文件?
    让 Serverless 更普惠,阿里云函数计算 FC 宣布全面降价,最大幅度达 37.5%
    GaiaX开源解读 | 基于优酷业务特色的跨平台技术
    Python内置函数enumerate操作可迭代对象及for迭代
    云计算 - 负载均衡SLB方案全解与实战
  • 原文地址:https://blog.csdn.net/qiuxue110/article/details/126408313