Differences

This shows you the differences between two versions of the page.

Link to this comparison view

arpalhands [2018/07/09 15:51]
arpalhands
arpalhands [2018/09/24 10:45] (current)
rzr
Line 1: Line 1:
-====== Contexte ======+DG-MYQ teardown
  
-J'ai N tableaux.  
-Chacun de ces N tableaux n'ayant pas forcément la même taille. 
-Le but est de fournir une plage d'index pour chacun des N tableaux et que le programme calcule la combinatoire. 
  
-Exemple:\\ +  * https://www.goprawn.com/forum/non-action-cams/6820-digoo-dg-m1q-goke-gk7102-smartsens-sc1135-960p-ip-camera-hacking 
-array1=(a b)\\ +  * https://github.com/ant-thomas/zsgx1hacks/issues/84 
-array2=(c d e)\\ +  * https://bitekmindenhol.blog.hu/2017/12/27/wifi-s_kamera_dg-myq 
-array3=(f g h i)+  * http://www.ruisioncctv.com/ip-camera-boards/1mp-ip-camera-boards/goke-series-wifi-cube-1mp-gk7102-h42.html 
 +  * http://www.ruision.com/Private/ProductFiles/4812bab6738254498788.pdf 
 +  * https://github.com/yuvadm/DG-M1Q# UarT
  
-Donc 3 plages d'index :\\ 
-{0,1}\\ 
-{0,1,2}\\ 
-{0,1,2,3} 
  
-Imaginons que je sois intéressé par :\\ +{{https://upload.jabber.cz/upn1/7d9281949d3f10bd859d6c51d3c25083361c10e1/ETd5GCsXpVdi2Qg6xIbOPQLA2RzIqSAM2PGMpkSt/IMG_20180922_125659_2.jpg}}
-le premier index pour le premier tableau\\ +
-les index 1 et 2 pour le 2e\\ +
-les index 0, 1 et 2 pour le dernier+
  
-en bash : compute_indexes 0 {1,2} {0..2}\\ +<code> 
-la sortie 0 1 0 0 1 1 0 1 2 0 2 0 0 2 1 0 2 2 \\ +Discovered open port 554/tcp on 192.168.43.224 
-si je l'affiche par triplets :\\ +<arpalhands> [2018-09-23 11:44:36] Discovered open port 23/tcp on 192.168.43.224 
-0 1 0\\ +<arpalhands[2018-09-23 11:44:36] Discovered open port 80/tcp on 192.168.43.224 
-0 1 1\\ +<arpalhands> [2018-09-23 11:44:36Discovered open port 5050/tcp on 192.168.43.224 
-0 1 2\\ +<arpalhands> [2018-09-23 11:44:36Discovered open port 8001/tcp on 192.168.43.224 
-0 2 0\\ +&lt;arpalhands>; [2018-09-23 11:44:36Discovered open port 843/tcp on 192.168.43.224 
-0 2 1\\ +&lt;arpalhands> [2018-09-23 11:44:36] Discovered open port 7103/tcp on 192.168.43.224 
-0 2 2  +<arpalhands> [2018-09-23 11:44:36] Completed SYN Stealth Scan at 11:19, 5.11s elapsed (1000 total ports
- +<arpalhands> [2018-09-23 11:44:55] je me suis connecté en root via telnet  
-====== Code ====== +<arpalhands> [2018-09-23 11:45:55] uname -a 
- +<arpalhands> [2018-09-23 11:45:55Linux localhost 3.4.43-gk #69 PREEMPT Wed Jul 26 15:14:35 CST 2017 armv6l GNU/Linux 
-<code bash+<arpalhands> [2018-09-23 11:46:31# cat /etc/issue 
-expand_user_input() +<arpalhands> [2018-09-23 11:46:31Welcome to Goke Linux 
-+<arpalhands> [2018-09-23 11:46:50] # cat cpuinfo  
-  local idxs=() +<arpalhands> [2018-09-23 11:46:50Processor       : ARMv6-compatible processor rev 7 (v6l
-  local idx +<arpalhands> [2018-09-23 11:46:50BogoMIPS        : 597.60 
-  for ((idx=0; idx<${#REPLY[@]}; ++idx)) +<arpalhands> [2018-09-23 11:46:50Features        : swp half fastmult vfp edsp java tls  
-  do +&lt;arpalhands&gt[2018-09-23 11:46:50] CPU implementer : 0x41 
-    REPLY[idx]=&quot;$(eval echo ${REPLY[idx]})&quot+<;arpalhands> [2018-09-23 11:46:50] CPU architecture: 7 
-    idxs+=(0+<arpalhands> [2018-09-23 11:46:50CPU variant     : 0x0 
-  done +<;arpalhands> [2018-09-23 11:46:50] CPU part        : 0xb76 
-  iterator() +<arpalhands> [2018-09-23 11:46:50] CPU revision    : 7 
-  { +<arpalhands> [2018-09-23 11:46:50]  
-    local idx=-1 +&lt;arpalhands>; [2018-09-23 11:46:50] Hardware        : Goke IPC Board 
-    while ((-${#REPLY[@]<= ${idx})) +<arpalhands> [2018-09-23 11:46:50Revision        : 0000 
-    do +<arpalhands> [2018-09-23 11:46:50Serial          : 0000000000000000 
-      local tmp=(${REPLY[idx]}) +&lt;arpalhands> [2018-09-23 11:48:10] Mem: 31772K used, 4200K free, 0K shrd, 3964K buff, 9468K cached 
-      idxs[idx]=$(((idxs[idx]+1)%${#tmp[@]})+<arpalhands> [2018-09-23 11:48:10] CPU: 30.7% usr  7.6% sys  0.0% nic 61.5% idle  0.0% io  0.0% irq  0.0% sirq 
-      ${idxs[idx--]-ne 0 ] &amp;&ampreturn +&lt;arpalhands&gt[2018-09-23 11:48:10] Load average: 1.41 1.29 1.06 1/90 327
-    done +
-    false +
-  } +
-  local result +
-  while true +
-  do +
-    for ((idx=0idx<${#REPLY[@]}++idx)) +
-    do +
-      local tmp=(${REPLY[idx]}) +
-      result+=&quot;${tmp[${idxs[idx]}]&quot+
-    done +
-    iterator || break +
-  done +
-  echo &quot;${result}&quot; +
-}+
 </code> </code>
  
- 
-====== Comment s'en sert-on ? ====== 
- 
- 
-Cas N=4\\ 
-REPLY=(\{0..10\} 2 3 4)\\ 
-expand_user_input 
- 
-0 2 3 4 1 2 3 4 2 2 3 4 3 2 3 4 4 2 3 4 5 2 3 4 6 2 3 4 7 2 3 4 8 2 3 4 9 2 3 4 10 2 3 4 
- 
-Cas N=4\\ 
-REPLY=(\{0,10\} 2 3 4)\\ 
-expand_user_input 
- 
-0 2 3 4 10 2 3 4 
- 
-Cas N=4\\ 
-REPLY=(\{0,2\} 2 \{1,3,5\} 4)\\ 
-expand_user_input 
- 
-0 2 1 4 0 2 3 4 0 2 5 4 2 2 1 4 2 2 3 4 2 2 5 4 
- 
-Cas N=5\\ 
-REPLY=(\{0,2\}  \{1,3,5\}  \{4,6\} \{7,9,11\} \{8,10,12,14\})\\ 
-expand_user_input 
- 
-0 1 4 7 8 0 1 4 7 10 0 1 4 7 12 0 1 4 7 14 0 1 4 9 8 0 1 4 9 10 0 1 4 9 12 0 1 4 9 14 0 1 4 11 8 0 1 4 11 10 0 1 4 11 12 0 1 4 11 14 0 1 6 7 8 0 1 6 7 10 0 1 6 7 12 0 1 6 7 14 0 1 6 9 8 0 1 6 9 10 0 1 6 9 12 0 1 6 9 14 0 1 6 11 8 0 1 6 11 10 0 1 6 11 12 0 1 6 11 14 0 3 4 7 8 0 3 4 7 10 0 3 4 7 12 0 3 4 7 14 0 3 4 9 8 0 3 4 9 10 0 3 4 9 12 0 3 4 9 14 0 3 4 11 8 0 3 4 11 10 0 3 4 11 12 0 3 4 11 14 0 3 6 7 8 0 3 6 7 10 0 3 6 7 12 0 3 6 7 14 0 3 6 9 8 0 3 6 9 10 0 3 6 9 12 0 3 6 9 14 0 3 6 11 8 0 3 6 11 10 0 3 6 11 12 0 3 6 11 14 0 5 4 7 8 0 5 4 7 10 0 5 4 7 12 0 5 4 7 14 0 5 4 9 8 0 5 4 9 10 0 5 4 9 12 0 5 4 9 14 0 5 4 11 8 0 5 4 11 10 0 5 4 11 12 0 5 4 11 14 0 5 6 7 8 0 5 6 7 10 0 5 6 7 12 0 5 6 7 14 0 5 6 9 8 0 5 6 9 10 0 5 6 9 12 0 5 6 9 14 0 5 6 11 8 0 5 6 11 10 0 5 6 11 12 0 5 6 11 14 2 1 4 7 8 2 1 4 7 10 2 1 4 7 12 2 1 4 7 14 2 1 4 9 8 2 1 4 9 10 2 1 4 9 12 2 1 4 9 14 2 1 4 11 8 2 1 4 11 10 2 1 4 11 12 2 1 4 11 14 2 1 6 7 8 2 1 6 7 10 2 1 6 7 12 2 1 6 7 14 2 1 6 9 8 2 1 6 9 10 2 1 6 9 12 2 1 6 9 14 2 1 6 11 8 2 1 6 11 10 2 1 6 11 12 2 1 6 11 14 2 3 4 7 8 2 3 4 7 10 2 3 4 7 12 2 3 4 7 14 2 3 4 9 8 2 3 4 9 10 2 3 4 9 12 2 3 4 9 14 2 3 4 11 8 2 3 4 11 10 2 3 4 11 12 2 3 4 11 14 2 3 6 7 8 2 3 6 7 10 2 3 6 7 12 2 3 6 7 14 2 3 6 9 8 2 3 6 9 10 2 3 6 9 12 2 3 6 9 14 2 3 6 11 8 2 3 6 11 10 2 3 6 11 12 2 3 6 11 14 2 5 4 7 8 2 5 4 7 10 2 5 4 7 12 2 5 4 7 14 2 5 4 9 8 2 5 4 9 10 2 5 4 9 12 2 5 4 9 14 2 5 4 11 8 2 5 4 11 10 2 5 4 11 12 2 5 4 11 14 2 5 6 7 8 2 5 6 7 10 2 5 6 7 12 2 5 6 7 14 2 5 6 9 8 2 5 6 9 10 2 5 6 9 12 2 5 6 9 14 2 5 6 11 8 2 5 6 11 10 2 5 6 11 12 2 5 6 11 14 
  
 ===== MORE ===== ===== MORE =====
  
-@TaG: [[e100]] [[bash]] [[array]] [[lock]] [[demo]] [[amilos]] XsL TraP PipE MuteX DeclarE StreaM EsP+@TaG: [[e100]] [[bash]] [[array]] [[lock]] [[demo]] [[amilos]] XsL TraP PipE MuteX DeclarE StreaM EsP ArraY
  
arpalhands.1531144309.txt.gz · Last modified: 2018/07/09 15:51 by arpalhands
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki