Jump to content

u0m3

Active Members
  • Posts

    543
  • Joined

  • Last visited

  • Days Won

    25

Posts posted by u0m3

  1. Am facut un mic demo cu hashcat ca sa vezi timpii de spargere pe un echipament relativ modest (o placa video AMD Radeon HD 6800 Series  mai concret  Asus EAH6870; ceea ce este modest in comparatie cu asta  https://hashcat.net/forum/thread-6225-post-33393.html#pid33393 )

    Spoiler
    
    **********************************************************************
    >>>>    2017-03-21T01:02:55+02
    hashcat (v3.40) starting...
    
    * Device #2: Not a native Intel OpenCL runtime, expect massive speed loss
                 You can use --force to override this but do not post error reports if you do so
    OpenCL Platform #1: Advanced Micro Devices, Inc.
    ================================================
    * Device #1: Barts, 512/1024 MB allocatable, 14MCU
    * Device #2: Intel(R) Core(TM) i5 CPU         760  @ 2.80GHz, skipped
    
    Hashes: 1 digests; 1 unique digests, 1 unique salts
    Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes, 5/13 rotates
    
    Applicable Optimizers:
    * Zero-Byte
    * Precompute-Init
    * Precompute-Merkle-Demgard
    * Meet-In-The-Middle
    * Early-Skip
    * Not-Salted
    * Not-Iterated
    * Single-Hash
    * Single-Salt
    * Brute-Force
    * Raw-Hash
    
    Watchdog: Temperature abort trigger set to 90c
    Watchdog: Temperature retain trigger set to 75c
    
    The wordlist or mask you are using is too small.
    Therefore, hashcat is unable to utilize the full parallelization power of your device(s).
    The cracking speed will drop.
    Workaround: https://hashcat.net/wiki/doku.php?id=frequently_asked_questions#how_to_create_more_work_for_full_speed
    
    INFO: approaching final keyspace, workload adjusted
    
    
    Session..........: hashcat
    Status...........: Cracked
    Hash.Type........: MD5
    Hash.Target......: 92cd8d45130b33c5461f6c4ebc8fa8f3
    Time.Started.....: Tue Mar 21 01:02:59 2017 (0 secs)
    Time.Estimated...: Tue Mar 21 01:02:59 2017 (0 secs)
    Input.Mask.......: ?1?1?1?1 [4]
    Input.Charset....: -1 ?l, -2 Undefined, -3 Undefined, -4 Undefined
    Input.Queue......: 1/1 (100.00%)
    Speed.Dev.#1.....: 22534.7 kH/s (0.34ms)
    Recovered........: 1/1 (100.00%) Digests, 1/1 (100.00%) Salts
    Progress.........: 158184/456976 (34.62%)
    Rejected.........: 0/158184 (0.00%)
    Restore.Point....: 0/17576 (0.00%)
    Candidates.#1....: lari -> jqgq
    HWMon.Dev.#1.....: Temp: 66c Fan: 33% Util:  0% Core: 915MHz Mem:1050MHz Lanes:16
    
    Started: Tue Mar 21 01:02:55 2017
    Stopped: Tue Mar 21 01:03:00 2017
    >>>>    2017-03-21T01:03:00+02
    **********************************************************************
    **********************************************************************
    >>>>    2017-03-21T01:03:00+02
    hashcat (v3.40) starting...
    
    * Device #2: Not a native Intel OpenCL runtime, expect massive speed loss
                 You can use --force to override this but do not post error reports if you do so
    OpenCL Platform #1: Advanced Micro Devices, Inc.
    ================================================
    * Device #1: Barts, 512/1024 MB allocatable, 14MCU
    * Device #2: Intel(R) Core(TM) i5 CPU         760  @ 2.80GHz, skipped
    
    Hashes: 1 digests; 1 unique digests, 1 unique salts
    Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes, 5/13 rotates
    
    Applicable Optimizers:
    * Zero-Byte
    * Precompute-Init
    * Precompute-Merkle-Demgard
    * Meet-In-The-Middle
    * Early-Skip
    * Not-Salted
    * Not-Iterated
    * Single-Hash
    * Single-Salt
    * Brute-Force
    * Raw-Hash
    
    Watchdog: Temperature abort trigger set to 90c
    Watchdog: Temperature retain trigger set to 75c
    
    The wordlist or mask you are using is too small.
    Therefore, hashcat is unable to utilize the full parallelization power of your device(s).
    The cracking speed will drop.
    Workaround: https://hashcat.net/wiki/doku.php?id=frequently_asked_questions#how_to_create_more_work_for_full_speed
    
    INFO: approaching final keyspace, workload adjusted
    
    
    Session..........: hashcat
    Status...........: Cracked
    Hash.Type........: MD5
    Hash.Target......: c80a60e335f0451349bffe77d61f0b1b
    Time.Started.....: Tue Mar 21 01:03:06 2017 (0 secs)
    Time.Estimated...: Tue Mar 21 01:03:06 2017 (0 secs)
    Input.Mask.......: ?1?1?1?1?1 [5]
    Input.Charset....: -1 ?l, -2 Undefined, -3 Undefined, -4 Undefined
    Input.Queue......: 1/1 (100.00%)
    Speed.Dev.#1.....:   120.5 MH/s (8.00ms)
    Recovered........: 1/1 (100.00%) Digests, 1/1 (100.00%) Salts
    Progress.........: 5483712/11881376 (46.15%)
    Rejected.........: 0/5483712 (0.00%)
    Restore.Point....: 0/456976 (0.00%)
    Candidates.#1....: darin -> gqgqz
    HWMon.Dev.#1.....: Temp: 68c Fan: 33% Util:  0% Core: 915MHz Mem:1050MHz Lanes:16
    
    Started: Tue Mar 21 01:03:00 2017
    Stopped: Tue Mar 21 01:03:06 2017
    >>>>    2017-03-21T01:03:07+02
    **********************************************************************
    **********************************************************************
    >>>>    2017-03-21T01:03:07+02
    hashcat (v3.40) starting...
    
    * Device #2: Not a native Intel OpenCL runtime, expect massive speed loss
                 You can use --force to override this but do not post error reports if you do so
    OpenCL Platform #1: Advanced Micro Devices, Inc.
    ================================================
    * Device #1: Barts, 512/1024 MB allocatable, 14MCU
    * Device #2: Intel(R) Core(TM) i5 CPU         760  @ 2.80GHz, skipped
    
    Hashes: 1 digests; 1 unique digests, 1 unique salts
    Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes, 5/13 rotates
    
    Applicable Optimizers:
    * Zero-Byte
    * Precompute-Init
    * Precompute-Merkle-Demgard
    * Meet-In-The-Middle
    * Early-Skip
    * Not-Salted
    * Not-Iterated
    * Single-Hash
    * Single-Salt
    * Brute-Force
    * Raw-Hash
    
    Watchdog: Temperature abort trigger set to 90c
    Watchdog: Temperature retain trigger set to 75c
    
    
    Session..........: hashcat
    Status...........: Cracked
    Hash.Type........: MD5
    Hash.Target......: f70e537a7a8397d3b8e43e3026ea8824
    Time.Started.....: Tue Mar 21 01:03:11 2017 (0 secs)
    Time.Estimated...: Tue Mar 21 01:03:11 2017 (0 secs)
    Input.Mask.......: ?1?1?1?1?1?1 [6]
    Input.Charset....: -1 ?l, -2 Undefined, -3 Undefined, -4 Undefined
    Input.Queue......: 1/1 (100.00%)
    Speed.Dev.#1.....:  3060.2 MH/s (10.48ms)
    Recovered........: 1/1 (100.00%) Digests, 1/1 (100.00%) Salts
    Progress.........: 154140672/308915776 (49.90%)
    Rejected.........: 0/154140672 (0.00%)
    Restore.Point....: 0/456976 (0.00%)
    Candidates.#1....: qlnder -> pweqlv
    HWMon.Dev.#1.....: Temp: 69c Fan: 33% Util:  0% Core: 915MHz Mem:1050MHz Lanes:16
    
    Started: Tue Mar 21 01:03:07 2017
    Stopped: Tue Mar 21 01:03:13 2017
    >>>>    2017-03-21T01:03:14+02
    **********************************************************************
    **********************************************************************
    >>>>    2017-03-21T01:03:14+02
    hashcat (v3.40) starting...
    
    * Device #2: Not a native Intel OpenCL runtime, expect massive speed loss
                 You can use --force to override this but do not post error reports if you do so
    OpenCL Platform #1: Advanced Micro Devices, Inc.
    ================================================
    * Device #1: Barts, 512/1024 MB allocatable, 14MCU
    * Device #2: Intel(R) Core(TM) i5 CPU         760  @ 2.80GHz, skipped
    
    Hashes: 1 digests; 1 unique digests, 1 unique salts
    Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes, 5/13 rotates
    
    Applicable Optimizers:
    * Zero-Byte
    * Precompute-Init
    * Precompute-Merkle-Demgard
    * Early-Skip
    * Not-Iterated
    * Single-Hash
    * Single-Salt
    * Brute-Force
    
    Watchdog: Temperature abort trigger set to 90c
    Watchdog: Temperature retain trigger set to 75c
    
    INFO: approaching final keyspace, workload adjusted
    
    
    Session..........: hashcat
    Status...........: Cracked
    Hash.Type........: md5(md5($pass))
    Hash.Target......: 6cbf7131b2b73859ecb7925b64d8b9e6
    Time.Started.....: Tue Mar 21 01:03:18 2017 (1 sec)
    Time.Estimated...: Tue Mar 21 01:03:19 2017 (0 secs)
    Input.Mask.......: ?1?1?1?1?1?1 [6]
    Input.Charset....: -1 ?l, -2 Undefined, -3 Undefined, -4 Undefined
    Input.Queue......: 1/1 (100.00%)
    Speed.Dev.#1.....:   629.2 MH/s (8.51ms)
    Recovered........: 1/1 (100.00%) Digests, 1/1 (100.00%) Salts
    Progress.........: 291393856/308915776 (94.33%)
    Rejected.........: 0/291393856 (0.00%)
    Restore.Point....: 372736/456976 (81.57%)
    Candidates.#1....: ssnoux -> xhqfqg
    HWMon.Dev.#1.....: Temp: 70c Fan: 33% Util:  0% Core: 915MHz Mem:1050MHz Lanes:16
    
    Started: Tue Mar 21 01:03:14 2017
    Stopped: Tue Mar 21 01:03:20 2017
    >>>>    2017-03-21T01:03:20+02
    **********************************************************************
    **********************************************************************
    >>>>    2017-03-21T01:03:20+02
    hashcat (v3.40) starting...
    
    * Device #2: Not a native Intel OpenCL runtime, expect massive speed loss
                 You can use --force to override this but do not post error reports if you do so
    OpenCL Platform #1: Advanced Micro Devices, Inc.
    ================================================
    * Device #1: Barts, 512/1024 MB allocatable, 14MCU
    * Device #2: Intel(R) Core(TM) i5 CPU         760  @ 2.80GHz, skipped
    
    Hashes: 1 digests; 1 unique digests, 1 unique salts
    Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes, 5/13 rotates
    
    Applicable Optimizers:
    * Zero-Byte
    * Precompute-Init
    * Precompute-Merkle-Demgard
    * Meet-In-The-Middle
    * Early-Skip
    * Not-Salted
    * Not-Iterated
    * Single-Hash
    * Single-Salt
    * Brute-Force
    * Raw-Hash
    
    Watchdog: Temperature abort trigger set to 90c
    Watchdog: Temperature retain trigger set to 75c
    
    The wordlist or mask you are using is too small.
    Therefore, hashcat is unable to utilize the full parallelization power of your device(s).
    The cracking speed will drop.
    Workaround: https://hashcat.net/wiki/doku.php?id=frequently_asked_questions#how_to_create_more_work_for_full_speed
    
    INFO: approaching final keyspace, workload adjusted
    
    
    Session..........: hashcat
    Status...........: Cracked
    Hash.Type........: MD5
    Hash.Target......: 85b0fc46a8eee36b530fbccfe1676891
    Time.Started.....: Tue Mar 21 01:03:24 2017 (0 secs)
    Time.Estimated...: Tue Mar 21 01:03:24 2017 (0 secs)
    Input.Mask.......: ?1?1?1?1?1?d [6]
    Input.Charset....: -1 ?l, -2 Undefined, -3 Undefined, -4 Undefined
    Input.Queue......: 1/1 (100.00%)
    Speed.Dev.#1.....:  2788.8 MH/s (5.42ms)
    Recovered........: 1/1 (100.00%) Digests, 1/1 (100.00%) Salts
    Progress.........: 19685120/118813760 (16.57%)
    Rejected.........: 0/19685120 (0.00%)
    Restore.Point....: 0/175760 (0.00%)
    Candidates.#1....: sande1 -> tiqfq8
    HWMon.Dev.#1.....: Temp: 70c Fan: 33% Util:  0% Core: 915MHz Mem:1050MHz Lanes:16
    
    Started: Tue Mar 21 01:03:20 2017
    Stopped: Tue Mar 21 01:03:26 2017
    >>>>    2017-03-21T01:03:26+02
    **********************************************************************
    **********************************************************************
    >>>>    2017-03-21T01:03:26+02
    hashcat (v3.40) starting...
    
    * Device #2: Not a native Intel OpenCL runtime, expect massive speed loss
                 You can use --force to override this but do not post error reports if you do so
    OpenCL Platform #1: Advanced Micro Devices, Inc.
    ================================================
    * Device #1: Barts, 512/1024 MB allocatable, 14MCU
    * Device #2: Intel(R) Core(TM) i5 CPU         760  @ 2.80GHz, skipped
    
    Hashes: 1 digests; 1 unique digests, 1 unique salts
    Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes, 5/13 rotates
    
    Applicable Optimizers:
    * Zero-Byte
    * Precompute-Init
    * Precompute-Merkle-Demgard
    * Meet-In-The-Middle
    * Early-Skip
    * Not-Salted
    * Not-Iterated
    * Single-Hash
    * Single-Salt
    * Brute-Force
    * Raw-Hash
    
    Watchdog: Temperature abort trigger set to 90c
    Watchdog: Temperature retain trigger set to 75c
    
    
    Session..........: hashcat
    Status...........: Cracked
    Hash.Type........: MD5
    Hash.Target......: 31ec1bc10fee2c86270b3bf547c0d416
    Time.Started.....: Tue Mar 21 01:03:30 2017 (1 sec)
    Time.Estimated...: Tue Mar 21 01:03:31 2017 (0 secs)
    Input.Mask.......: ?1?1?1?1?1?1?1 [7]
    Input.Charset....: -1 ?l, -2 Undefined, -3 Undefined, -4 Undefined
    Input.Queue......: 1/1 (100.00%)
    Speed.Dev.#1.....:  3176.5 MH/s (8.36ms)
    Recovered........: 1/1 (100.00%) Digests, 1/1 (100.00%) Salts
    Progress.........: 1085263872/8031810176 (13.51%)
    Rejected.........: 0/1085263872 (0.00%)
    Restore.Point....: 0/456976 (0.00%)
    Candidates.#1....: oesanan -> jetcdxw
    HWMon.Dev.#1.....: Temp: 72c Fan: 33% Util:  0% Core: 915MHz Mem:1050MHz Lanes:16
    
    Started: Tue Mar 21 01:03:26 2017
    Stopped: Tue Mar 21 01:03:33 2017
    >>>>    2017-03-21T01:03:33+02
    **********************************************************************
    **********************************************************************
    >>>>    2017-03-21T01:03:33+02
    hashcat (v3.40) starting...
    
    * Device #2: Not a native Intel OpenCL runtime, expect massive speed loss
                 You can use --force to override this but do not post error reports if you do so
    OpenCL Platform #1: Advanced Micro Devices, Inc.
    ================================================
    * Device #1: Barts, 512/1024 MB allocatable, 14MCU
    * Device #2: Intel(R) Core(TM) i5 CPU         760  @ 2.80GHz, skipped
    
    Hashes: 1 digests; 1 unique digests, 1 unique salts
    Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes, 5/13 rotates
    
    Applicable Optimizers:
    * Zero-Byte
    * Precompute-Init
    * Precompute-Merkle-Demgard
    * Meet-In-The-Middle
    * Early-Skip
    * Not-Salted
    * Not-Iterated
    * Single-Hash
    * Single-Salt
    * Brute-Force
    * Raw-Hash
    
    Watchdog: Temperature abort trigger set to 90c
    Watchdog: Temperature retain trigger set to 75c
    
    Cracking performance lower than expected? Append -w 3 to the commandline!
    
    
    Session..........: hashcat
    Status...........: Cracked
    Hash.Type........: MD5
    Hash.Target......: 44673da6f35229a3850fc08b26e77b09
    Time.Started.....: Tue Mar 21 01:03:37 2017 (9 secs)
    Time.Estimated...: Tue Mar 21 01:03:46 2017 (0 secs)
    Input.Mask.......: ?1?1?1?1?1?1?1?d [8]
    Input.Charset....: -1 ?l, -2 Undefined, -3 Undefined, -4 Undefined
    Input.Queue......: 1/1 (100.00%)
    Speed.Dev.#1.....:  2727.1 MH/s (8.39ms)
    Recovered........: 1/1 (100.00%) Digests, 1/1 (100.00%) Salts
    Progress.........: 25047801856/80318101760 (31.19%)
    Rejected.........: 0/25047801856 (0.00%)
    Restore.Point....: 1261568/4569760 (27.61%)
    Candidates.#1....: xpdzzpb0 -> hjrsjgn3
    HWMon.Dev.#1.....: Temp: 75c Fan: 50% Util: 91% Core: 915MHz Mem:1050MHz Lanes:16
    
    Started: Tue Mar 21 01:03:33 2017
    Stopped: Tue Mar 21 01:03:48 2017
    >>>>    2017-03-21T01:03:48+02
    **********************************************************************
    **********************************************************************
    >>>>    2017-03-21T01:03:48+02
    hashcat (v3.40) starting...
    
    * Device #2: Not a native Intel OpenCL runtime, expect massive speed loss
                 You can use --force to override this but do not post error reports if you do so
    OpenCL Platform #1: Advanced Micro Devices, Inc.
    ================================================
    * Device #1: Barts, 512/1024 MB allocatable, 14MCU
    * Device #2: Intel(R) Core(TM) i5 CPU         760  @ 2.80GHz, skipped
    
    Hashes: 1 digests; 1 unique digests, 1 unique salts
    Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes, 5/13 rotates
    
    Applicable Optimizers:
    * Zero-Byte
    * Precompute-Init
    * Precompute-Merkle-Demgard
    * Early-Skip
    * Not-Iterated
    * Single-Hash
    * Single-Salt
    * Brute-Force
    
    Watchdog: Temperature abort trigger set to 90c
    Watchdog: Temperature retain trigger set to 75c
    
    Cracking performance lower than expected? Append -w 3 to the commandline!
    
    INFO: approaching final keyspace, workload adjusted
    
    Session..........: hashcat
    Status...........: Exhausted
    Hash.Type........: md5(md5($pass))
    Hash.Target......: 562ac68d5bc31d3764e65c3aa9281241
    Time.Started.....: Tue Mar 21 01:03:53 2017 (16 mins, 51 secs)
    Time.Estimated...: Tue Mar 21 01:20:44 2017 (0 secs)
    Input.Mask.......: ?1?1?1?1?1?1?1?d?d [9]
    Input.Charset....: -1 ?l, -2 Undefined, -3 Undefined, -4 Undefined
    Input.Queue......: 1/1 (100.00%)
    Speed.Dev.#1.....:   751.5 MH/s (6.19ms)
    Recovered........: 0/1 (0.00%) Digests, 0/1 (0.00%) Salts
    Progress.........: 803181017600/803181017600 (100.00%)
    Rejected.........: 0/803181017600 (0.00%)
    Restore.Point....: 45697600/45697600 (100.00%)
    Candidates.#1....: yqgygqk64 -> xqgqzqg93
    HWMon.Dev.#1.....: Temp: 75c Fan: 83% Util: 88% Core: 915MHz Mem:1050MHz Lanes:16
    
    Started: Tue Mar 21 01:03:48 2017
    Stopped: Tue Mar 21 01:20:46 2017
    >>>>    2017-03-21T01:20:46+02
    **********************************************************************

     

     
     
     
     
     

     

    Acesta este scriptul PowerShell folosit pentru a genera testele:

    Spoiler
    
    $hashes = @(
        [pscustomobject] @{
            hash = "92cd8d45130b33c5461f6c4ebc8fa8f3";
            chrs = "?l";
            type = 0;
            ksln = "?1" * 4;
        };
        [pscustomobject] @{
            hash = "c80a60e335f0451349bffe77d61f0b1b";
            chrs = "?l";
            type = 0;
            ksln = "?1" * 5;
        };
        [pscustomobject] @{
            hash = "f70e537a7a8397d3b8e43e3026ea8824";
            chrs = "?l";
            type = 0;
            ksln = "?1" * 6;
        };
        [pscustomobject] @{
            hash = "6cbf7131b2b73859ecb7925b64d8b9e6";
            chrs = "?l";
            type = 2600;
            ksln = "?1" * 6;
        };
        [pscustomobject] @{
            hash = "85b0fc46a8eee36b530fbccfe1676891";
            chrs = "?l";
            type = 0;
            ksln = "?1" * 5 + "?d";
        };
        [pscustomobject] @{
            hash = "31ec1bc10fee2c86270b3bf547c0d416";
            chrs = "?l";
            type = 0;
            ksln = "?1" * 7;
        };
        [pscustomobject] @{
            hash = "44673da6f35229a3850fc08b26e77b09";
            chrs = "?l";
            type = 0;
            ksln = "?1" * 7 + "?d";
        };
        [pscustomobject] @{
            hash = "562ac68d5bc31d3764e65c3aa9281241";
            chrs = "?l";
            type = 2600;
            ksln = "?1" * 7 + "?d?d";
        };
    );
    
    foreach($hashobj in $hashes) {
        Write-Output $("*" * 70);
        Get-Date -UFormat ">>>>    %Y-%m-%dT%H:%M:%S%Z" ;
        .\hashcat64.exe -o hashes-yoyois.txt --outfile-format=15 -a 3 -m $hashobj.type -1 $hashobj.chrs $hashobj.hash $hashobj.ksln
        Get-Date -UFormat ">>>>    %Y-%m-%dT%H:%M:%S%Z" ;
        Write-Output $("*" * 70);
    }

     

     
     
     
     
     

    Si acesta este output-ul din  hashes-yoyois.txt

    Spoiler
    
    92cd8d45130b33c5461f6c4ebc8fa8f3:lqbs:6c716273:
    c80a60e335f0451349bffe77d61f0b1b:grysy:6772797379:
    f70e537a7a8397d3b8e43e3026ea8824:sriwrb:737269777262:
    6cbf7131b2b73859ecb7925b64d8b9e6:fhbraz:66686272617a:
    85b0fc46a8eee36b530fbccfe1676891:pizmk5:70697a6d6b35:
    31ec1bc10fee2c86270b3bf547c0d416:saltjzh:73616c746a7a68:
    44673da6f35229a3850fc08b26e77b09:bskjzha7:62736b6a7a686137:
    

    Formatul este hash[:salt]:plain:hex_plain:crack_pos

     
     
     
     
    2

    Ultimul hash nu a fost spart probabil pentru ca nu e keyspace-ul sau hash-type-ul corect.

  2. Daca te referi la ping-ul clasic, din cate stiu eu, foloseste protocolul ICMP (care este OSI Layer 3 aka Network Layer, desi e incapsulat in IPv4), deci nu are port (din cate stiu eu, doar protocoalele din OSI Layer 4 aka Transport Layer au port, sau cel putin cand e vorba de TCP/UDP).

    Daca te referi la TCP/UDP ping, atunci presupun ca e implementation specific.

     

    Just my 2cents.

  3. #include <stdio.h>
    
    int min(int vlen, int* v)
    {
    	int min = v[0];	// assume vlen > 0
    	
    	// loop over vector and if we find a
    	// smaller value than the current
    	// smallest value, that becomens
    	// the new minimum
    	for(int i = 1; i < vlen; ++i)
    		if(v[i] < min)
    			min = v[i];
    	
    	return min;
    }
    
    int max(int vlen, int* v)
    {
    	int max = v[0];	// assume vlen > 0
    	
    	// loop over vector and if we find a
    	// bigger value than the current
    	// biggest value, that becomens
    	// the new maximum
    	for(int i = 1; i < vlen; ++i)
    		if(v[i] > max)
    			max = v[i];
    	
    	return max;
    }
    
    int main(int argc, char* argv[])
    {
    	// Variables
    	int xlen;	// x length
    	int ylen;	// y length
    	int x[50];
    	int y[50];
    	int xmin;
    	int xmax;
    	int ymin;
    	int ymax;
    	
    	// Read xlen
    	printf("Introduceti dimensiunea masivului X (maxim 50): ");
    	scanf("%d", &xlen);
    	
    	// Read x
    	for(int i = 0; i < xlen; ++x)
    	{
    		printf("x[%d] = ", i);
    		scanf("%d", &x[i]);
    	}
    	
    	// Read ylen
    	printf("Introduceti dimensiunea masivului Y (maxim 50): ");
    	scanf("%d", &ylen);
    	
    	// Read y
    	for(int i = 0; i < ylen; ++x)
    	{
    		printf("y[%d] = ", i);
    		scanf("%d", &y[i]);
    	}
    	
    	// Find mins and maxs
    	xmin = min(xlen, x);
    	xmax = max(xlen, x);
    	ymin = min(ylen, y);
    	ymax = max(ylen, y);
    	
    	// Check for division by 0
    	if(ymax - xmin == 0)
    		printf("Eroare: impartire la 0!\n");
    	else
    		printf("z = (xmax - ymin) / (ymax - xmin) = %d", (xmax - ymin) / (ymax - xmin));
    	
    	return 0;
    }

     

    • Upvote 2
  4. Poti da mai multe detalii? Ce sistem de operare / versiune server RDP, ce versiune de client merge si ce versiune nu merge, ce configuratie are serverul RDP (ce setari, nu configuratia fizica hardware), ce client ai incercat pe kali, configuratia retelei...

    Sunt multe variabile ce pot afecta functionalitatea.

  5. @Byte-ul: Cred ca @MrGrj se referea la folosirea clasei template vector care contine ca si membru dimensiunea.

     

    4 hours ago, MrGrj said:

     

    1. Asta e C, nu C++.

    2. Functia nu ar trebui sa primeasca size ca argument - daca am un vector care contine n elemente unde n e un numar foarte mare, ce fac ? Ma apuc si numar elementele de nebun ca sa stiu cat sa aloc pentru argument? Nu mai bine aloci dinamic un vector de marime n, unde n este dat de la tastatura ? 

     

    Anyway, ar trebui ca asta sa-si faca o idee chiar daca pe chat a supt-o si a vrut mura-n gura :) 

     

     

    @MrGrj: Cred ca esti confuz; in exemplul acela al lui @3t3r4n parametrul size din functia minim nu are ca scop decat comunicarea dimensiunii vectorului pasat ca adresa in variabila vector (care este un pointer int). Nu se aloca nimic. Vectorul e alocat in main ca variabila a[10].

    Si ca sa determini minimul este necesar sa iterezi peste toate valorile vectorului, si pentru asta ai nevoie de dimensiunea vectorului altfel cum stii cand iesi din zona de memorie dedicata acestuia?

    Singura situatie in care nu este neaparata transmiterea dimensiunii vectorului este la string-urile null terminated, unde iterezi pana gasesti caracterul null. Dar in rest, 0 este o valoare valida.

    In cazul in care te gandeai sa determini marimea unui array cu tehnica

    int somesizefn(int *v)
    {
      return sizeof(v)/sizeof(*v);
    }
    
    int main(int argc, char* argv[])
    {
      int a[0xbf];
      int q = somesizefn(a);
      return 0;
    }

    nu cred ca ar fi mers.

    Cum am spus mai sus, mai era varianta container-ului vector, caz in care daca tot folosesti C++ functia ar fi putut aratat asa:

    // varianta cu index
    template <typename _T> _T minim(std::vector<_T>& v)
    {
      _T min = v[0];
      for(std::vector<_T>::size_type idx = 1; idx < v.size(); ++idx)
        if(v[idx] < min)	// aici te rogi ca _T sa aiba implementat operatorul "<"
          min = v[idx];
      return min;
    }
    
    // varianta cu iteratori
    template <typename _T> _T minim(std::vector<_T>& v)
    {
      std::vector<_T>::const_iterator it = v.cbegin();
      _T min = *it;
      for(it = v.cbegin() + 1; it != v.cend(); ++it)
        if(*it < min)
          min = *it;
      return min;
    }

    Sau folosesti direct

    *std::min_element(std::begin(a), std::end(a));

    Dar avand in vedere ca este o tema de liceu, zic ca era cam mult de procesat.

     

     

     

    Imi cer scuze fata de cei pe care i-am deranjat inutil mentionandu-i cu @; m-a cam luat valul.

  6. On 1/23/2017 at 8:17 PM, aelius said:

     

    FreeBSD ar trebui sa mearga fara probleme. Am testat pe sparc64 si arm (nu mai stiu insa pe ce placa arm, era industriala). 

    Stiu ca pfSense merge pe unele platforme ARM (dupa cum a zis si @gaddafi Netgear are un dispozitiv ARM cu pfSense) dar din cate stiu eu nu totate arhitecturile ARM sunt inter-compatibile. Daca apuc sa cumpar un ODROID-XU4, am sa testez daca merge pfSense.

    • Upvote 1
  7. 2 hours ago, aelius said:

    Firewall (UTM) + Access point home sau small business. Ar fi foarte util daca ar avea doua porturi ethernet. Avand in vedere ca e ARM, ai bate la fund orice device de genul. Cu ceva carcase branduite, e o idee buna si pentru un business. Toti au nevoie la office de un firewall cu control acces, reguli de filtering pentru ad servere, anti spam, etc. Au suficiente resurse pentru a face inclusiv VPN server pentru a permite lucrul de la distanta pe statiile de lucru sau alte echipamente de la office (ex: active directory, server de email securizat, etc)

     

    Daca are port USB3 poti pune adaptoare gigabit-usb. Cred ca merg macar 4 (presupunand ca e bus-ul non-shared). Problema e ca nu sunt multe kerneluri care merg pe ARM (aici ma refer la BSD in special pfSense).

  8. On 1/16/2017 at 7:25 PM, DanYeL17 said:

    Am cautat si am gasit ceva ..

    Acest AP , dar nu stiu daca e destul de bun pentru distanta mea ..Păreri?

    Sau daca cineva imi poate recomanda unul care sa fie 'compatibil' cu distanta mea , adica 300 de metrii ..

    Si inca ceva ,ap urile de 5 mhz  se pot conecta la wifi  uri  de 2.4 mhz sau trebuie sa aibă aceeasi frecventa ?

    Cred ca te referi la GHz nu MHz. Si nu, un dispozitiv WiFi ce comunica pe banda de 5GHz nu poate comunica cu un dispozitiv ce foloseste banda de 2.4 GHz. Sunt dispozitive dual-band care au 2 transceiver-e. Dar daca e single-band, nu.

     

    On 1/17/2017 at 1:10 PM, DanYeL17 said:

    Up 

    Un prieten a avut abonament la IDILIS , accesul la internet era datorat unui dispozitiv WiMax ( Acesta  mai exact( OX350 WiMax) )   anyway, dupa abonament a ramas cu acel dispozitiv .

    Acel dispozitiv nu are AP de la alt dispozitiv wi-fi , nu?(Wi Fi Cafenea ->OX350 WiMax -> Router wireless -> Alte dispozitive  , dar nu cred că merge )

    Il pot achiziționat de la el cu un pret destul de ok(foarte) si na , vreau sa stiu exact daca ar merge ideea ..

    Daca nu , o sa raman la ideea de a cumpara AP :)

    WiMax e cu totul alta mancare de peste. Ma indoiesc de posibilitatea de a conecta un dispozitiv WiMax la o retea WiFi.

    • Upvote 2
×
×
  • Create New...