Otra opción para unir ficheros creados con 'dd' y divididos es hacer un cat file1 file2 file3 >blah.img
si ese blah.img contiene una imagen de un disco, tendrá dentro la tabla de particiones, por lo que no se puede montar con un simple mount -o loop...
Para hacerlo:
# losetup blah.img /dev/loop0
# fdisk -l -u /dev/loop0
Disk /dev/loop0: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
/dev/loop0p1 * 63 156296384 78148161 7 HPFS/NTFS
Seria genial que existiera /dev/loop0p1, pero no es el caso y lo peor es que no se puede crear con un mknod como cualquier otro dispositivo. El remedio es calcular en que offset empieza la particion y usar losetup con el:
(se multiplica el numero de bytes (512) por el offset de comienzo (63))
$ echo $((512*63))
32256
$ losetup -o 32256 /dev/loop1 /dev/loop1
$ mount -t ntfs /dev/loop1 /mnt/hd1
lunes 30 de octubre de 2006
Montar particiones de un loopback.
Montar varias imagenes de un dd como un solo device
Usando mapper y el loop, es posible montar una imagen realizada mediante 'dd' y dividida entre varios archivos...
how-to del pelon:
15:30 Pci: [root@Leviatan tmp]# ls -l root_fs_armeb.*
15:30 Pci: -rw-r--r-- 1 root root 100 Sep 12 15:27 root_fs_armeb.dmsetup
15:30 Pci: -rw-r--r-- 1 root root 41411584 Sep 12 13:17 root_fs_armeb.ext2
15:30 Pci: -rw-r--r-- 1 root root 20971520 Sep 12 13:18 root_fs_armeb.partaa
15:30 Pci: -rw-r--r-- 1 root root 20440064 Sep 12 13:18 root_fs_armeb.partab
15:30 Pci:
15:30 Pci: [root@Leviatan tmp]# losetup /dev/loop0 root_fs_armeb.partaa
15:30 Pci: [root@Leviatan tmp]# losetup /dev/loop1 root_fs_armeb.partab
15:30 Pci: [root@Leviatan tmp]# losetup /dev/loop1 root_fs_armeb.partab
15:30 Pci: [root@Leviatan tmp]# cat root_fs_armeb.dmsetup
15:30 Pci: # List of linear stripes (Pci: r0x++^2)
15:30 Pci: 0 40960 linear /dev/loop0 0
15:30 Pci: 40960 39922 linear /dev/loop1 0
15:31 Pci: [root@Leviatan tmp]# cat root_fs_armeb.dmsetup |dmsetup create test
15:31 Pci: [root@Leviatan tmp]# mount /dev/mapper/test /mnt
15:31 Pci: [root@Leviatan tmp]# ls /mnt
15:31 Pci: bin dev etc home lib linuxrc lost+found mnt opt php proc root sbin tmp usr var
15:34 Pci: solo una cosa..
15:34 Pci: tienes un limite inicial de 256 loop's
15:34 Pci: aunq por defecto son 16
15:35 Pci: tienes q cargar el modulo de loop con max_loop=256 (o X) para poder mapear los N 4gb-ficheros
15:41 dab: como has pillado los datos
15:41 dab: de los bloques
15:42 Pci: dab: tamaño_fichero/512
15:42 Pci: aunq cuidado con hacer $(du -B 512 fichero)
15:43 Pci: pq no da lo mismo q un $[$(ls -l fichero| sed -e 's/^\([0-9]*\) .*/\1/g')/512]
15:44 Pci: yo he puesto los tamaños a partir del size/512 que da el ls
15:44 Pci: si os da probs.. usad el q da el du -B512 y sino.. el del ls
15:44 Pci: me sigues?
miércoles 25 de octubre de 2006
Mapeo de teclado Macos-Windows
Muy útil para super-nuevos en mac como yo
Desde:
http://www.xvsxp.com/misc/keyboard.php
The following table outlines common keyboard shortcuts found on both Mac OS X and Windows XP:
| Task | Mac OS X | Windows XP |
|---|---|---|
| Undo | Command-Z | Ctrl-Z |
| New File | Command-N | Ctrl-N |
| New Window | Command-N | Windows-E (Windows Explorer), Ctrl-N (Internet Explorer). Not available for Command Prompt |
| New Folder | Shift-Command-N | Context-W-F |
| Open | Command-O | Ctrl-O (within applications), Enter (in Windows Explorer), Context-O (on the desktop) |
| Close | Command-W | Alt-F4 (Ctrl-F4 to close a child window of an MDI application) |
| Close All (Files, Windows) | Option-Command-W (available in the Finder, but not all applications) | Shift+Alt+F4 |
| Save | Command-S | Ctrl-S |
| Don't Save (within Close dialog) | Command-D | Alt-N |
| Cancel | Command-. | Esc |
| Copy (Selection, File) | Command-C | Ctrl-C |
| Paste (Selection, File) | Command-V | Ctrl-V |
| Beginning of Line | Command-left arrow | Home |
| End of Line | Command-right arrow | End |
| Beginning of Document | Command-up arrow | Ctrl-Home |
| End of document | Command-down arrow | Ctrl-End |
| Find | Command-F | Ctrl-F (within applications), Windows-F or Windows-S (from the desktop) |
| Quit | Command-Q | Alt-F4 (if the application has only one window open) |
| Desktop (within Save dialog) | Command-D | Tab to "Save in" menu, then arrow up to Desktop (not a "true" shortcut) |
| Next Application | Command-Tab | Alt-tab (next window) |
| Previous Application | Shift-Command-Tab | Shift-Alt-tab (previous window) |
| Rename Selected File | Return | F2 |
| Select All | Command-A | Ctrl-A |
| Eject Disc or Volume | Command-E | |
| Send to Trash/Recycle Bin | Command-Delete | Delete |
| Delete Immediately | Shift-Delete | |
| Empty Trash | Shift-Command-Delete | |
| Minimize All | F11 (shows the desktop) | Windows-M |
| Restore All | F11 | Windows-Shift-M |
| Up Folder Level | Command-Up Arrow | Backspace |
| Down Folder Level | Command-Down Arrow | Enter |
| Expand Selected Folder | Right arrow (when in List or Column view) | Right arrow (when in Tree view) |
| Collapse Selected Folder | Left arrow (when in List or Column view) | Left arrow (when in Tree view) |
| Connect to Server | Command-K | Ctrl-Windows-F |
| Force Quit/End Task Dialog | Command-Option-Esc | Ctrl-Alt-Del |
| Force Quit Current Application | Shift-Command-Option-Esc |
Apple keyboard shortcuts can be found in this Apple Tech Document.
viernes 20 de octubre de 2006
sed
dab: pci
dab: como hago en sed que me borre una linea
dab: y 2 que vienen debajo
Pci: eh?
dab: en sed
dab: quiero matchear una linea
dab: y borrar esa linea y dos que la suceden
Pci: cat /etc/passwd |sed -n '/^andres.*$/{N;N;d;};p'
Pci: dab: con eso borro a andres y a los dos user de debajo
domingo 15 de octubre de 2006
aplicaciones de forense que siempre olvido url
MiTeC, para estudiar el prefetch, thumbnails, lnks, el registro, información de la papelera de reciclaje.... etc etc http://www.mitec.cz/
Parece que el WRA ya no esta disponible en la web oficial, un día subo un backup.
Actualizado: Mon Oct 16 00:04:20 CEST 2006
WRA.zip (danke DS)
Urls de reverse whois y otros..
Nota mental: no olvidar estos links
http://www.netcraft.com
http://webhosting.info
http://www.domainsdb.net/
http://www.searchmee.com/web-info/ip-hunt.php
http://www.domaintools.com/reverse-ip/
http://www.archive.org
http://search.msn.com <-- Buscar por IP:x.x.x.x
Actualizado: Sun Oct 15 23:59:01 CEST 2006
http://www.seologs.com/ip-domains.html (thx aklis)
Actualizado: Sun Thu Mar 15 12:03:33 CET 2007
http://www.tomdns.net/index.php
Nota mental 2: usar algun dia la feature de bookmarks del browser
