򾺲*

 һܴa
 ע

QQ

ֻһ_ʼ

123456һ
б l
鿴: 3082|؏: 57
ӡ һ} һ}

篮球竞彩专家 : [macOS] ְֽƽ MacOS ϵ֮ Bartender 3 - 5

    [朽]
  • TAÿ
    _
    2019-3-17 22:44
  • 씵: 132

    [LV.7]סIII

    Dָnj
    l 2019-9-19 02:33:54 | ֻԓ |ֻD |g[ |xģʽ
    tree_fly 2019-9-19 09:36 ݋

    ְֽ򾺲* MacOSϵ֮Bartender 3
    ݽٳ׷ݱ㷨QעԙC


    ߡtree_fly/P.Y.G
    ]䡿[email protected]
    퓡itreefly.com
    ƽƽ_MacOS
    ƽ•ՈăHо





    һ_ʼ
      Һtree_fly?꠭?a href="//www.mckkx.com" target="_blank" class="relatedlink">hwһmacOSƽ_ܛ@һˆΙڈD˵ܛ Bartender 3 v3.0.64LԇIJͬĽǶMUƫڲҪһܳr


    Bartender 3 پWwww.macbartender.com/



    ռY


    ȺηһЩAϢעԽ漰Ƶă





    • ÑעԴaCģʽ
    • ]оWjC
    • 4ܕrgȫԇ
    • ԇڽYʧЧ^ُI




    򌍑

    ռһЩYϺ[Hopper V4]d`/Applications/Bartender 3.app/Contents/MacOS/Bartender 3`һЩPI~`license`뵽עCPĺ
    Hopper V4Hopper Disassembler V4ĺQپWhttps://www.hopperapp.com/ v4.0.8һ[؄eİ汾](https://chinapyg.com/thread-87967-1-1.html)




    `[Class* isLicensed]`@ӵBoolֵҪcPע

    ** 1**

    fע뵽׌`[Class* isLicensed]`trueyԇһò

    @҂QHopperք޸ĺ_^ąRa

    [Asm] ı鿴 ƴa
    /* return true */
    mov rax, 0x1
    ret


    {ԇ **Frida**

    \Bartender 3_iTermϵyĽKˣݔעa

    [Bash shell] ı鿴 ƴa
    ~ frida-trace -m "-[*Bartender* *icense*]" "Bartender 3"


    o`rK˕@ʾϢ
    [Bash shell] ı鿴 ƴa
    Instrumenting functions...
    -[Bartender_3.AboutPreferencesController isLicensed]: Auto-generated handler at "/Users/lg/__handlers__/__Bartender_3.AboutPreferencesCo_07d0e87a.js"
    -[Bartender_3.LicensePreferencesController licenseBartenderWithSender:]: Auto-generated handler at "/Users/lg/__handlers__/__Bartender_3.LicensePreferences_b42e61ac.js"
    -[Bartender_3.LicensePreferencesController licenseSegmentClickedWithSender:]: Auto-generated handler at "/Users/lg/__handlers__/__Bartender_3.LicensePreferences_c4914f22.js"
    -[Bartender_3.LicensePreferencesController isLicensed]: Auto-generated handler at "/Users/lg/__handlers__/__Bartender_3.LicensePreferences_aa4237d6.js"
    -[Bartender_3.AppDelegate showPreferencesLicenseView:]: Auto-generated handler at "/Users/lg/__handlers__/__Bartender_3.AppDelegate_showPr_ad1fa37a.js"
    -[Bartender_3.AppDelegate isLicensed]: Auto-generated handler at "/Users/lg/__handlers__/__Bartender_3.AppDelegate_isLicensed_.js"
    Started tracing 6 functions. Press Ctrl+C to stop.


    һʾӋ6hookѽڮǰĿ„ˡ__handlers __ļAаˌ6jsļ

    **Ctrl+C**Дм鿴KʾϢ3`isLicensed`քeǣ

    [Objective-C] ı鿴 ƴa
    -[Bartender_3.AboutPreferencesController isLicensed]
    -[Bartender_3.LicensePreferencesController isLicensed]
    -[Bartender_3.AppDelegate isLicensed]


    Ҫһ޸Čjsļ_`-[Bartender_3.AppDelegate isLicensed]``Bartender_3.AppDelegate_isLicensed_.js`ǣ

    [JavaScript] ı鿴 ƴa
    {
      onEnter: function (log, args, state) {
        log('-[Bartender_3.AppDelegate isLicensed]');
      },
      onLeave: function (log, retval, state) {
      }
    }


    ޸onLeaveHHһдa`retval.replace(1);`a˼ں\нYr޸ķֵ1true£

    [JavaScript] ı鿴 ƴa
    {
      onEnter: function (log, args, state) {
        log('-[Bartender_3.AppDelegate isLicensed]');
      },
      onLeave: function (log, retval, state) {
        retval.replace(1);  /* Just add one line code. */
      }
    }


    2hooka޸ͬϲеjsļ޸ĺٴݔעa

    [Bash shell] ı鿴 ƴa
    ~ frida-trace -m "-[*Bartender* *icense*]" "Bartender 3"


    ˕ryԇBartender 3lF]ԇ]ԇõӋrҲ]עԴaݔÓÓѼBϲѽ˲ 1ă

    ȻҪd̫ǰļԻp4ܵԇÕrg߀]еô֪аء

    ˽c̶ք޸ϵyrg4ܺȻʧЧҪйĿǰ֪ԓMһ`isLicensed`Ăδa


    ** 2**

    ˲ 1Ľeһ`isLicensed`ļ

    xһ鿴һ‚δa

    [C] ı鿴 ƴa
    /* @class _TtC11Bartender_311AppDelegate */
    -(char)isLicensed {
        rax = sub_100068310();
        rax = ObjectiveC._convertBoolToObjCBool(rax & 0xff);
        rax = sign_extend_64(rax);
        return rax;
    }


    ГQHopperąRapMӺ`sub_100068310`, IcRaһx`References to 0x100068310`鿴Ϣ



    ĵǷlF֮ǰ򽻵3`isLicensed`߀3̎Ҳ{עC`sub_10068310`ˆο 1ʲôкˆ˰

    ^mx`sub_10068310`Ăδa*߉݋ȥչʾĴa޼һЩɔ_*

    [C] ı鿴 ƴa
    int sub_100068310() {
        r13 = Swift.String() -> __C.NSString(0x8000000000000000 | "license2HoldersName", 0x13);
        rbx = Swift.String() -> __C.NSString(0xe800000000000000, 0x3265736e6563696c);
        r13 = sub_100068b50(var_30, r14, r15, r12, 0xea00000000003272);
        rbx = 0x1;
        if ((r13 & 0x1) == 0x0) {
                rbx = sub_100068f30(var_30, r15, r12, r14);
        }
        rax = rbx;
        return rax;
    }


    `0x3265736e6563696c`Dַ`2esnecil`ֹߵDλ`license2`

    axȡļʹ**AppDelete**ٲ鿴ļ·



    _ļ`com.surteesstudiOS.Bartender.plist`@ӛ˺ܶϢnj]ʲôPIc



    PIǴaе2`sub_100068b50` `sub_100068f30`߉݋ϿһtrueC

    οƒɂĂδaLLLۻyЛ]ʲô~{ԇͷa

    oB

    oBڄӑB{ԇԇLԇxδaa߉݋Pϵ`sub_10068b50`H1`return`YβĴaǣ

    [C] ı鿴 ƴa
                }
        }
        else {
                rbx = 0x0;
        }
        rax = rbx;
        return rax;
    }


    @elseʾfalse^mϿPע`rbx`Ĵֵ

    [C] ı鿴 ƴa
                   if (r13 != 0x0) {
                         rbx = sub_1000627c0(r12, r14, r15, var_50, r13);
                   }
                    else {
                         rbx = 0x0;
                   }
             }
        }
        else {
                rbx = 0x0;
        }
        rax = rbx;
        return rax;
    }


    `sub_1000627c0`ķֵҪ뷵`0x1`ͺ^m߉݋Pϵ*߉݋ȥչʾĴa޼һЩɔ_*

    [C] ı鿴 ƴa
    int sub_100068b50(int arg0, int arg1, int arg2, int arg3, int arg4) {
        if ((r14 != 0x0) && (rdx != 0x0)) {
                rbx = sub_100062dc0(r13, rbx, rdx, rcx, r8);
                if (rbx != 0x0) {
                    r13 = sub_1000627c0(var_38, var_40, var_58, var_30, rbx);
                    if ((r13 & 0x1) != 0x0) {
                            rbx = 0x1;
                    }
                }
                else {
                    if (r13 != 0x0) {
                        rbx = sub_1000627c0(r12, r14, r15, var_50, r13);
                    }
                    else {
                        rbx = 0x0;
                    }
                }
        }
        else {
                rbx = 0x0;
        }
        rax = rbx;
        return rax;
    }


    v[@δaֻҪ`sub_1000627c0``0x1`һоͶMһ`sub_1000627c0`䌍ѽo޽ӽעԴa㷨㷨҂ٷƺЩ΢

    deep layer  |      func call layer
    -------------------------
      4             |       עԴa㷨
      3             |      sub_1000627c0
      2             |      sub_10068b50
      1             |        isLicensed

    ^ 2ķѽ`isLicesed`ĵһ𲽷˵ϲɾ潛ָտɴ

    }׌`sub_1000627c0``true`



    ** 3**

    ^ 2ķҪע뺯`sub_1000627c0``true`^m{ԇ **Frida**

    \Bartender 3_iTermϵyĽKˣݔעa

    [Bash shell] ı鿴 ƴa
    ~ frida-trace -i "sub_1000627c0" "Bartender 3"


    ʾעʧ텢`-i`ڟo̖ĺ

    мxһעጃҲ]x헿ɹʹã

    [Bash shell] ı鿴 ƴa
    ~ frida-trace -h
    Usage: frida-trace [options] target
    
    Options:
      --version             show program's version number and exit
      -h, --help            show this help message and exit
      -I MODULE, --include-module=MODULE
                            include MODULE
      -X MODULE, --exclude-module=MODULE
                            exclude MODULE
      -i FUNCTION, --include=FUNCTION
                            include FUNCTION
      -x FUNCTION, --exclude=FUNCTION
                            exclude FUNCTION
      -a MODULE!OFFSET, --add=MODULE!OFFSET
                            add MODULE!OFFSET
      -T, --include-imports
                            include program's imports
      -t MODULE, --include-module-imports=MODULE
                            include MODULE imports
      -m OBJC_METHOD, --include-objc-method=OBJC_METHOD
                            include OBJC_METHOD
      -M OBJC_METHOD, --exclude-objc-method=OBJC_METHOD
                            exclude OBJC_METHOD
      -s DEBUG_SYMBOL, --include-debug-symbol=DEBUG_SYMBOL
                            include DEBUG_SYMBOL
      -q, --quiet           do not format output messages
      -o OUTPUT, --output=OUTPUT


    䌍`sub_xxxxxxx`ֻHopper@ӵܛ@ʾĺȴоͲ@ӵĺ̖HʾƫƵַ_`ASLR`rÿμdĵַSCַf@ôǸV**@a**

    ڟo̖ĺFridahook

    ԓҪҵdĻַ`module address`ַƫ`offset`ܶλȴе挍ַ`target address`



    ҪһЩôsһһ

    עĴa inject.py

    [JavaScript] ı鿴 ƴa
    import frida
    import sys
    import codecs
    
    def on_message(message, data):
        print("[{}] => {}".format(message, data))
    
    def main(target_process):
        session = frida.attach(target_process)
    
        with codecs.open(sys.argv[2], 'r', 'utf-8') as f:
            source = f.read()
    
        script = session.create_script(source)
        script.on("message", on_message)
        script.load()
        print("[!] Ctrl+D or Ctrl+Z to detach from instrumented program.\n\n")
        sys.stdin.read()
        session.detach()
    
    
    if __name__ == "__main__":
        main(sys.argv[1])
    



    ҪעĴa Bartender3.js

    [JavaScript] ı鿴 ƴa
    function get_rva(module, offset) {
        var base_addr = Module.findBaseAddress(module);
        if (base_addr == null)
            base_addr = enum_to_find_module(module);
        console.log(module + ' addr: ' + base_addr);
        var target_addr = base_addr.add(offset);
     
        return target_addr;
    }
     
    var target_addr = get_rva("Bartender 3", 0x627c0);
    console.log("sub_1000627c0 addr: " + target_addr);
    
    Interceptor.attach(target_addr, {
        onEnter: function(args) {
        },
        onLeave: function(retval) {
            console.log("sub_1000627c0 return:" + retval + " replaced: 0x1");
            retval.replace(0x1);
        },
    });


    CEĕr̵

    \Bartender 3_iTermϵyĽKˣݔ

    [Bash shell] ı鿴 ƴa
    ~ python3 inject.py "Bartender 3" Bartender3.js




    **Surprise??** ԇʾʧܛѼB{ϵyrg4ܺܛȻʾBҹܜyԇ@βǂƽ

    Խ^Frida{ԇѵPatchķ޸`sub_1000627c0`_^ąRaôϤζ

    [Asm] ı鿴 ƴa
    /* return true */
    mov rax, 0x1
    ret


    ϲɲ 3ĿҌWFridaЃɷNHooking FunctionsǕrMһ



    ** 4**

    ߀ʲôȹܛעԴaCCƲҌעԙCd^cıِ߀]нYδ^mxȥ

    Ǖr`sub_1000627c0`?J?ôLôLĴaӲ^Ƥϰؓ؟εĸVܿһЩַFǰ

    ӑB{ԇ

    ǕrúչʾĄӑB{ԇgǰP]ѽ\еBartender 3_Hopper{ԇеĔcc\аoһСDˣԵƬ



    \к_עԴaݔݔÑtree_flyԼܴaAAAABBBBCCCCDDDDEEEEcע԰o֮ǰ`sub_100627c0`^‚ccע԰o`sub_100627c0`

    ^mF6ψDĵ5СDStep Over\ЅRa

    ܿһַ`SecDecodeTransformCreate`Fˣ

    SecDecodeTransformCreate(**_kSecBase32Encoding, &var_60);

    PSecurity Transforms APIԅٷęn: [Security Transforms Programming Guide-Signing and Verifying](https://developer.apple.com/libr ... ansformsBasics.html)

    ȥMBase32ĪǽעԴa¶λAPI`SecTransformSetAttribute`

    `0000000100062919 call imp___stubs__SecTransformSetAttribute`@һ”cֱc\аoRIPָ
    [Asm] ı鿴 ƴa
    000000010006290b  lea  rcx, qword [rbp+var_60]     ; argument "error" for SecTransformSetAttribute
    000000010006290f  mov  rdi, qword [rbp+var_48]     ; argument "transformRef" for SecTransformSetAttribute
    0000000100062913  mov  rsi, r14                    ; argument "key" for SecTransformSetAttribute
    0000000100062916  mov  rdx, rbx                    ; argument "value" for SecTransformSetAttribute
    0000000100062919  call imp___stubs__SecTransformSetAttribute  ; SecTransformSetAttribute


    㲻ǺϤMacOS x64ļĴֵҎtĵHopperѽעጳ

    ]e\$rbx惦Base32ܵvalue¾֪ГQDebugger Console˺ݔ{ԇ

    [Asm] ı鿴 ƴa
    po $rdx
    <41414141 42424242 43434343 44444444 45454545>
    
    x $rdx
    0x1019a2010: 81 49 28 8e ff ff 1d 02 14 00 00 00 00 00 00 00  .I(.............
    0x1019a2020: 41 41 41 41 42 42 42 42 43 43 43 43 44 44 44 44  AAAABBBBCCCCDDDD
    
    x -c0x40 $rdx
    0x1019a2010: 81 49 28 8e ff ff 1d 02 14 00 00 00 00 00 00 00  .I(.............
    0x1019a2020: 41 41 41 41 42 42 42 42 43 43 43 43 44 44 44 44  AAAABBBBCCCCDDDD
    0x1019a2030: 45 45 45 45 00 00 00 00 00 00 00 00 00 00 00 00  EEEE............
    0x1019a2040: 31 00 00 00 00 00 00 00 1d 00 00 00 00 00 00 00  1...............

    lldbx memorry readĿs-c @ʾֹLĬJ0x20

    xȡDŽݔעԴa**njעԴaMBase32**

    _ĵ·ԽԽһBase32ַעԴa

    Base32EncString("hello, tree_fly") = NBSWY3DPFQQHI4TFMVPWM3DZ

    ^@עԴaݔݔµļַc^m

    ܿһֵĴaFֻҊӽ܈API`SecTransformExecute`δҊӽ܌API`SecTransformSetAttribute`Լwļӽܷ

    [C] ı鿴 ƴa
        rax = sub_100063140(var_70, r14, rdx, var_50, r13, r15, rbx);
        if (0x0 == 0x0) goto loc_100062b41;
    
    loc_100062cc8:
        rax = rbx;
        return rax;
    
    loc_100062b41:
        rax = SecTransformExecute(rdi, &var_60);
        r15 = rax;
        if (r15 == 0x0) goto loc_100062cd9;


    м鿴a@7Ӻ`sub_100063140`ҪM뿴һ

    M`sub_100063140`ܿ쿴 `SecVerifyTransformCreate` `_kSecDigestSHA1`@һж

    *ȿȿúڰ*”@ЩϢXDzѽF˾wļӽ㷨

    ]eRSAĔֺ㷨Sign&Verify

    Ȼ]RSA㷨ɂ}˼£

    ַʲôķNhashʽ

    Ĺʲôʲô˽ʲô

    **ַܷܵʽ**

    ٶλ `SecVerifyTransformCreate` ĵһ`SecTransformSetAttribute``000000010006320c         call       imp___stubs__SecTransformSetAttribute`@һ”c^m\гɹڴ

    [Asm] ı鿴 ƴa
    00000001000631fc mov rbx, rax
    00000001000631ff lea rcx, qword [rbp+var_28]  ; argument "error" 
    0000000100063203 mov rdi, r14                 ; argument "transformRef" 
    0000000100063206 mov rsi, r13                 ; argument "key"
    0000000100063209 mov rdx, rbx                 ; argument "value"
    000000010006320c call imp___stubs__SecTransformSetAttribute       ; SecTransformSetAttribute


    ݔ{ԇa

    [Asm] ı鿴 ƴa
    po $rdx
    <42617274 656e6465 72322c74 7265655f 666c79>
    
    x -c0x40 $rdx
    0x108fc27c0: 81 49 28 8e ff ff 1d 02 13 00 00 00 00 00 00 00  .I(.............
    0x108fc27d0: 42 61 72 74 65 6e 64 65 72 32 2c 74 72 65 65 5f  Bartender2,tree_
    0x108fc27e0: 66 6c 79 00 00 00 00 00 00 00 00 00 00 00 00 00  fly.............
    0x108fc27f0: ff ff ff ff 00 00 01 00 00 00 00 00 00 00 00 00  ................


    ԴַܵǣBartender2,tree_flyַBartender2,cÑƴ

    ڷ͵{ԇ^װlF@ַ߀׃
    [Asm] ı鿴 ƴa
    x -c0x40 $rdx
    0x100ebef30: 81 49 28 8e ff ff 1d 02 1a 00 00 00 00 00 00 00  .I(.............
    0x100ebef40: 42 61 72 74 65 6e 64 65 72 32 55 70 67 72 61 64  Bartender2Upgrad
    0x100ebef50: 65 2c 74 72 65 65 5f 66 6c 79 00 00 00 00 00 00  e,tree_fly......
    0x100ebef60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................


    һµֵFBartender2Upgrade,tree_fly

    @Ҳ˲ 2еǾԒ

    PI2`sub_100068b50` `sub_100068f30`߉݋ϿһtrueC

    ܛOӋעԴaĽǶȿ䌍փ@Ҫxһ

    Pıhashʽѽ@SHA1

    **Ĺ**

    耵IJ֮̎ҪȥеĴ惦ļеԭPEMַʽ惦ܛе߀ҪMнܲܫ@ȡĹ

    PI~**SecItemImport**@”c

    [Asm] ı鿴 ƴa
    ; ================ B E G I N N I N G   O F   P R O C E D U R E ================
    ; Variables:
    ;    outItems: void *, 16
    ;    importKeychain: int, 8
    
     imp___stubs__SecItemImport:        // SecItemImport
    00000001000a62e8  jmp  qword [_SecItemImport_ptr]


    º{×λλã

    [Asm] ı鿴 ƴa
    0000000100062f29  lea  rdx, qword [rbp+var_50]     ; argument "inputFormat" for SecItemImport
    0000000100062f2d  lea  rcx, qword [rbp+var_48]     ; argument "itemType" for SecItemImport
    0000000100062f31  lea  r9, qword [rbp+var_B8]      ; argument "keyParams" for SecItemImport
    0000000100062f38  mov  esi, 0x0                    ; argument "fileNameOrExtension" for SecItemImport
    0000000100062f3d  xor  r8d, r8d                    ; argument "flags" for SecItemImport
    0000000100062f40  mov  rdi, r13                    ; argument "importedData" for SecItemImport
    0000000100062f43  push rax                         ; argument "outItems" for SecItemImport
    0000000100062f44  push 0x0                         ; argument "importKeychain" for SecItemImport
    0000000100062f46  call imp___stubs__SecItemImport  ; SecItemImport


    HopperĺעimportedData\$rdi惦ǹ耔ӡһ£

    [Asm] ı鿴 ƴa
    po $r13
    <2d2d2d2d 2d424547 494e2050 55424c49 43204b45 592d2d2d 2d2d0a4d 4948774d 49476f42 67637168 6b6a4f4f 4151424d 49476341 6b45416b 61346f73 3865494d 59375469 6d58696e 51673136 5453754e 456c794d 70744c4e 6b6a680a 70474363 51763331 56446d73 36637630 52397248 6d2f4c69 4c624741 6c495146 36624c55 4f48706f 556a5333 56743947 6b514956 414d394a 7353556c 455a4461 0a415562 43467649 50706c52 3266314e 74416b41 5249652f 35415242 41583252 6676715a 52753465 37737556 65714f64 58614534 4e787064 512b2b48 57473246 790a3035 614d4e56 48367351 55755962 6133725a 78695472 3079716d 31565946 45354450 5a5a3849 36444130 4d41416b 42304b67 7245394a 6a47656c 34653566 58630a7a 6e6c7269 77314f38 48422b2b 316b476a 32793632 635a336b 76663669 76654132 6e5a786b 4e533956 4c443775 30393154 5a737464 4854456f 6b393577 4177430a 64674e7a 0a2d2d2d 2d2d454e 44205055 424c4943 204b4559 2d2d2d2d 2d0a>
    
    x -c0x200 $r13
    0x101998270: 31a3df8dffff1d008414000001000000  1...............
    0x101998280: 7e010000000000007e01000000000000  ~.......~.......
    0x101998290: 00000000000000000000000000000000  ................
    0x1019982a0: 2d2d2d2d2d424547494e205055424c49  -----BEGIN PUBLI
    0x1019982b0: 43204b45592d2d2d2d2d0a4d4948774d  C KEY-----.MIHwM
    0x1019982c0: 49476f42676371686b6a4f4f4151424d  IGoBgcqhkjOOAQBM
    0x1019982d0: 494763416b45416b61346f733865494d  IGcAkEAka4os8eIM
    0x1019982e0: 593754696d58696e516731365453754e  Y7TimXinQg16TSuN
    0x1019982f0: 456c794d70744c4e6b6a680a70474363  ElyMptLNkjh.pGCc
    0x101998300: 5176333156446d733663763052397248  Qv31VDms6cv0R9rH
    0x101998310: 6d2f4c694c6247416c49514636624c55  m/LiLbGAlIQF6bLU
    0x101998320: 4f48706f556a5333567439476b514956  OHpoUjS3Vt9GkQIV
    0x101998330: 414d394a7353556c455a44610a415562  AM9JsSUlEZDa.AUb
    0x101998340: 4346764950706c523266314e74416b41  CFvIPplR2f1NtAkA
    0x101998350: 5249652f35415242415832526676715a  RIe/5ARBAX2RfvqZ
    0x101998360: 527534653773755665714f6458614534  Ru4e7suVeqOdXaE4
    0x101998370: 4e787064512b2b4857473246790a3035  NxpdQ++HWG2Fy.05
    0x101998380: 614d4e5648367351557559626133725a  aMNVH6sQUuYba3rZ
    0x101998390: 786954723079716d3156594645354450  xiTr0yqm1VYFE5DP
    0x1019983a0: 5a5a3849364441304d41416b42304b67  ZZ8I6DA0MAAkB0Kg
    0x1019983b0: 7245394a6a47656c3465356658630a7a  rE9JjGel4e5fXc.z
    0x1019983c0: 6e6c726977314f3848422b2b316b476a  nlriw1O8HB++1kGj
    0x1019983d0: 32793632635a336b7666366976654132  2y62cZ3kvf6iveA2
    0x1019983e0: 6e5a786b4e5339564c44377530393154  nZxkNS9VLD7u091T
    0x1019983f0: 5a7374644854456f6b3935774177430a  ZstdHTEok95wAwC.
    0x101998400: 64674e7a0a2d2d2d2d2d454e44205055  dgNz.-----END PU
    0x101998410: 424c4943204b45592d2d2d2d2d0a0000  BLIC KEY-----...
    


    {ԇ@ѽăȴҵܛĹδ惦ʹַBEGIN PUBLICDzԭַ惦ܛ



    ôPatch耲Ԓ

    ͨ^ 4҂RSAֺ㷨ܵııhashʽSHA1考@ЩϢxעԙC߀h



    ** 5**

    @ĶǺÝhܰ

    L

    ĹPEMʽĹlܿ팦˽LǶλՈe

    [Plain Text] ı鿴 ƴa
    -----BEGIN PUBLIC KEY-----
    MIHwMIGoBgcqhkjOOAQBMIGcAkEAka4os8eIMY7TimXinQg16TSuNElyMptLNkjh
    pGCcQv31VDms6cv0R9rHm/LiLbGAlIQF6bLUOHpoUjS3Vt9GkQIVAM9JsSUlEZDa
    AUbCFvIPplR2f1NtAkARIe/5ARBAX2RfvqZRu4e7suVeqOdXaE4NxpdQ++HWG2Fy
    05aMNVH6sQUuYba3rZxiTr0yqm1VYFE5DPZZ8I6DA0MAAkB0KgrE9JjGel4e5fXc
    znlriw1O8HB++1kGj2y62cZ3kvf6iveA2nZxkNS9VLD7u091TZstdHTEok95wAwC
    dgNz
    -----END PUBLIC KEY-----


    ĽƜyLȽ1024-2048֮gҜyԇһ1024λ˽而ĹPatchߵĹlFLșzyעʧһLͬĹü

    ȵʲôҪPatchDDfԒ



    ^mصLȆ}҇Lԇopensslʾe`Ϣ
    [Bash shell] ı鿴 ƴa
    ~ openssl rsa -pubin -text -in public.pem
    4415460972:error:06FFF07F:digital envelope routines:CRYPTO_internal:expecting an rsa key:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.250.1/libressl-2.6/crypto/evp/p_lib.c:295:



    Ȼʹ2ָLλ 1024-2048֮göַCڹ耵Lͬ

    [Bash shell] ı鿴 ƴa
    openssl genrsa -out pri.pem 1024
    openssl rsa -in pri.pem -pubout > pub1024.pem



    KlFL1678rǡ֣LȵΨһֵLȶԼ耰

    [Bash shell] ı鿴 ƴa
    openssl genrsa -out pri.1678.pem 1678
    openssl rsa -in pri.1678.pem -pubout > pub.1678.pem





    քPatch

    кֹܶ݋ܛ]010 EditorxַԭλN뼴16MֹճNķxEdit->Paste From->Paste from Hex TextעмzQ_





    Swift עԙC

    ՓGoRSA㷨עԙC@QSwift 5
    [Bash shell] ı鿴 ƴa
    mkdir Bartender3KeyMaker
    cd Bartender3KeyMaker
    swift package init --type executable



    τBartender3KeyMakerļAԼͬSwiftĿ

    _Package.swift2dependencies

    [Swift] ı鿴 ƴa
    // swift-tools-version:5.1
    // The swift-tools-version declares the minimum version of Swift required to build this package.
    
    import PackageDescription
    
    let package = Package(
        name: "Bartender3KeyMaker",
        dependencies: [
            .package(url: "https://github.com/IBM-Swift/BlueRSA", from: "1.0.0"),
            .package(url: "https://github.com/norio-nomura/Base32", from: "0.5.4"),
        ],
        targets: [
    
            .target(
                name: "Bartender3KeyMaker",
                dependencies: ["CryptorRSA", "Base32"]),
            .testTarget(
                name: "Bartender3KeyMakerTests",
                dependencies: ["Bartender3KeyMaker"]),
        ]
    )




    ޸main.swift:

    [Swift] ı鿴 ƴa
    import CryptorRSA
    import Base32
    
    if #available(OSX 10.12, *) {
        
        print("*** Bartender 3 KeyMaker ***")
        
        let publicKeyPEM = """
    -----BEGIN PUBLIC KEY-----
    MIHwMA0GCSqGSIb3DQEBAQUAA4HeADCB2gKB0i4NHp5du5mNFuKif70Ra4Au7d3s
    5id3pgD5X7IO6oRtDvIqWYVFON2iY01T48hUxN8BCHpbt575PAhT0cV2mUeeElNW
    QxhhXo2VcP98wlbzvTM4+jnwytK7kqNQINjyuxJucm9/Ak7VuIrZpvAR72UHN2dz
    FGKEie4liTy4u7/rYAqlWTjp5GvPgkk9Fspdisjm8MSxpv8q+bO6cY3sUXfN8lHI
    t3HLOOuyEYnhBJ2429xrtveKEAogxagLexmucAyo3J7CYR/D6sPwjJF/SoHykwID
    AQAB
    -----END PUBLIC KEY-----
    """
        
        let privateKeyPEM = """
    -----BEGIN RSA PRIVATE KEY-----
    MIIDyQIBAAKB0i4NHp5du5mNFuKif70Ra4Au7d3s5id3pgD5X7IO6oRtDvIqWYVF
    ON2iY01T48hUxN8BCHpbt575PAhT0cV2mUeeElNWQxhhXo2VcP98wlbzvTM4+jnw
    ytK7kqNQINjyuxJucm9/Ak7VuIrZpvAR72UHN2dzFGKEie4liTy4u7/rYAqlWTjp
    5GvPgkk9Fspdisjm8MSxpv8q+bO6cY3sUXfN8lHIt3HLOOuyEYnhBJ2429xrtveK
    EAogxagLexmucAyo3J7CYR/D6sPwjJF/SoHykwIDAQABAoHSEeoqqiL+swpvB7V9
    ifi34ELhaD8bfekO3Dwm3SbuVpvyf4S4FJ9MMvRUOyXSbAGGINbPDIKXmTGOCBNL
    fMzZbkHxERhyu45NcTjcn5dSJu9lAAM/XMDutjIgJoYqcRtkaRQsUnGPXUnIztPZ
    S8mTiyUkOUwAyjHn5XwEam5mDj42gkrbIZk/S0THnQOdrbSZnnwcq8jmvS3g0xup
    ryjOhKwe2174khAP2bD1emEM5UyygJEcsJV91NTSlqKrPbVPre5DdibGX73aWOCw
    6GMv2l9RAml4eKeKZ9DIr98IJbXBIDjQaTM1HxT3ekAyWm+eiBo0qXsfvZCEOJkS
    KgTzkiQ1GSh9y/N9qmixgCLKiqqsli4vHnMgwsOMnO7Lf913ELFvA7/DgOpLTOTB
    lu3KLaXH+lnx6Obvsdk+6ysCaWHbutRcHcezwrQ6cO77r9IYp9xf8J6RRMqXwOGp
    Gn1Qy2i5pV5KYm9wL1Mmkxr+zymTeJ964EuItPl2a/NMx7ln0UQNBU7oGG5rK1Sc
    xUYWjWJGPyXA/eF80UFDryM/5nG+nA1Nb1vCOQJpFbYQ47Wv/+sKM+qv5d1Lv+ul
    qeYvHiavGSQJR7XZmzIMGX1NZTbaB1cBS3BEDDm7fWhbOoOSmKKyInR5K99o9V70
    eqv/GAFUW+JwZDvi7lHrpm0+TFHQTD9KHYy6et7YhOtnaz1PHLK/AmlDf1/6oh8Y
    Y/FkhvrmnEvFyqPd6X76oJCmfM3Z2N4gmd3zujlKNFx5KRQ7clv9Psx9jO6icgrL
    jtvlRb1n8AnC5Mz+90w2BPj1EI6uqgOYOG4E3xcnX1q+cW2Uaq8ezTCSPDs/Ia4x
    yGECaTg3UbgNnQGhmrwbrtqIt+/aVjiE7UMDCl+svCvaaHHZCY1J/aRqu6JAnURU
    I5qqQ46zTzJR+i9A9jryT1S11sIxuVr5hDmKC+2JA/9ogrwbYuHnCZrCx2P53Bhm
    kDd2Ypk3F7cQTVgQTA==
    -----END RSA PRIVATE KEY-----
    """
    
        let publicKey = try! CryptorRSA.createPublicKey(withPEM: publicKeyPEM)
        let privateKey = try! CryptorRSA.createPrivateKey(withPEM: privateKeyPEM)
    
        print("Please input your name: ", separator: "", terminator: "")
        let userName = readLine() ?? "tree_fly"
        
        let data = "Bartender2,\(userName)".data(using: String.Encoding.utf8)!
        let plainText = CryptorRSA.createPlaintext(with: data)
    
        let signature = try plainText.signed(with: privateKey, algorithm: .sha1)!
        let verification = try plainText.verify(with: publicKey, signature: signature, algorithm: .sha1)
        print("Key Verification: ", verification)
    
        let signBase32String = signature.data.base32EncodedString
        
        print("\nName:", userName)
        print("SN:", signBase32String)
        
    } else {
        print("ERROR(OSX NEED 10.12+)")
    }



    Ȼ\г

    [Bash shell] ı鿴 ƴa
    swift run



    һr_ӋעԴa




    ߣ

    [Plain Text] ı鿴 ƴa
    Name: [url=//www.mckkx.com]򾺲*  www.mckkx.com[/url]
    SN: BR7K5KAGMS4PIM2KNJOVCLP4XYHWNL6VM7C6XF2DJYZFJPR7CBJ5YUCOQBMQHDFXN6EMI6YT4P4VZ4XL543G733FXYGNRDGKKHPPXKZG2LCZX433BY7BAAQNVJZ54GBNJS6DG5ASX5D3A6LQ24FBKX5NX2A4XOR2NLMY32FOL7PVDN6GZKAAUPBTX3Z65TYBEPMYW76T4XDTPUONUNLXAUNMTPVT37G73C5HNX2QUVC5XOQCUCTTJVXDINP4NYP73FAQTBGWDNZY6LREV6QUKIA3ZYLI26NXR5XLPA4VGBNYK7Z36SXPTUHGUHSRQTMAGGAKJRFX4UNKEMPV





    YZ

    ԔB5һ

    rg}©yּ،˼·uϣܽoxߎһЩl͌


    xxgӭ



    ʽRŰPDFĩIPYB ^_^


    tree_fly/P.Y.G


    2019-09-18



    Y








    PDFęnd ְֽƽMacOSϵ֮ Bartender 3 - tree_fly:P.Y.G.pdf.zip (1.04 MB, dΔ: 21, ۃr: 5 öhƎ)


    u

    18 +29 +28
    atpyg + 1 + 1 fˮǧɽouN
    + 1 + 1 xlԭƷPYG
    leskady + 1 + 1 xlԭƷPYG
    jolly_800 + 1 + 1 PYG
    xianmua + 1 + 1 PYG
    ppff931111 + 1 + 1 PYG
    + 1 + 1 PYG
    zhczf + 1 + 1 PYG
    deadlybugs + 1 ٝһ@Ӻܽo!
    y2019 + 1 xlԭƷPYG

    鿴ȫu

    Ԍ݋]:

    h
  • TAÿ
    _
    2016-6-16 14:07
  • 씵: 10

    [LV.3]żII

    12#
    l 2019-9-19 21:01:17 | ֻԓ
    //www.mckkx.com/thread-135992-1-1.html
    [macOS] [haƪ]ְֽƽ MacOS ϵ֮ Bartender 3 az
  • TAÿ
    _
    9 Сrǰ
  • 씵: 842

    [LV.10]ԉIII

    ɳl
    l 2019-9-19 06:53:55 | ֻԓ
    ɳlǰŌW
  • TAÿ
    _
    2020-2-25 08:23
  • 씵: 1089

    [LV.10]ԉIII

    l 2019-9-19 07:23:28 | ֻԓ
    w666ؼҸWmach߀òT.
  • TAÿ
    _
    5 Сrǰ
  • 씵: 147

    [LV.7]סIII

    l 2019-9-19 08:32:37 | ֻԓ
    ႀСһ
  • TAÿ

    3 ǰ
  • 씵: 1213

    [LV.10]ԉIII

    l 2019-9-19 09:18:05 | ֻԓ
    ȰbһOܸ
  • TAÿ
    ^
    2016-1-13 12:25
  • 씵: 3

    [LV.2]żI

    ذ
    l 2019-9-19 09:42:29 | ֻԓ
    xw,ǰW
  • TAÿ
    ^
    9 Сrǰ
  • 씵: 392

    [LV.9]ԉII

    7#
    l 2019-9-19 10:08:48 | ֻԓ
    ֵÌW
  • TAÿ
    _
    2019-10-22 20:27
  • 씵: 16

    [LV.4]żIII

    8#
    l 2019-9-19 12:59:09 | ֻԓ
    Ʒɜ\ٝ
  • TAÿ
    ˥
    2020-1-9 10:13
  • 씵: 136

    [LV.7]סIII

    9#
    l 2019-9-19 13:31:44 | ֻԓ
    @Ҫղ
  • TAÿ
    ^
    2015-10-29 08:08
  • 씵: 3

    [LV.2]żI

    10#
    l 2019-9-19 14:40:35 | ֻԓ
    6޴xw䲩ʿĈDĽ̳
    123456һ
    б l

    eҎt

    P]

    վL]һl /1 һl

    С|֙C|Archiver|򾺲* ( ICP15107817̖-2 )|ߴaٝ

    Powered by Discuz! X3.3© 2001-2017 Comsenz Inc.

      
    ٻ؏ 򾺲* б