2011年10月18日 星期二

Dump the Memory

PMDump v1.2


Open up a command prompt type the "pmdump -list" command


"pmdump -listdisplays a list of running Process with their Process ID (PID)


OR type the "tasklist" command


"tasklistdisplays a list of applications and services with their Process ID (PID) for all tasks running on either a local or a remote computer.


then dump the memory contents of a process


type the "pmdump <PID> <filename>" command
ex: pmdump 777 dump.bin



pmdump 1.2 - (c) 2002, Arne Vidstrom (arne.vidstrom@ntsecurity.nu)
           - http://ntsecurity.nu/toolbox/pmdump/


Usage: pmdump <pid> <filename>


        - dumps the process memory contents to a file


       pmdump -list


        - lists all running processes and their PID's





ManTech Physical Memory Dump Utility


mdd_1.3.zip



a physical memory acquisition tool for imaging Windows based computers

ManTech Memory DD 1.3 acquires a forensic image of physical memory and stores it as a raw binary file.

Memory DD must be run with Administrator privileges

type the "mdd_1.3 -o <outputfile>" command
ex: mdd_1.3 -o dump.bin

 -> mdd
 -> ManTech Physical Memory Dump Utility
    Copyright (C) 2008 ManTech Security & Mission Assurance

 -> This program comes with ABSOLUTELY NO WARRANTY; for details use option `-w'
    This is free software, and you are welcome to redistribute it
    under certain conditions; use option `-c' for details.


mdd ManTech Physical Memory Dump Utility

Usage:

mdd <-o OUTPUTFILE> [-qvcw]

     -o OUTPUTFILE     output file for dump
     -q                quiet; no output except on error
     -v                verbose; output offsets of failed mappings
     -c                redistribution conditions for GPL
     -w                warranty information for GPL


2011年10月15日 星期六

pkg_add: unable to fetch

For example, if you try to install a convmv package


# pkg_add -r convmv
Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7.3-release/Latest/convmv.tbz: File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7.3-release/Latest/convmv.tbz' by URL


Modify the PACKAGESITE environment variable
# setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7-stable/Latest/


then
# pkg_add -r convmv
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7-stable/Latest/convmv.tbz... Done.


OR
# pkg_add -r ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7-stable/Latest/convmv.tbz
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7-stable/Latest/convmv.tbz... Done.

2011年10月13日 星期四

Mounting FreeBSD UFS2 File System



Make the directory for mount
sudo mkdir /mnt/<mount-directory>
ex: sudo mkdir /mnt/ufsdisk

Mount the ufs partition
sudo mount -t ufs -r -o ufstype=ufs2 /dev/<partition> /mnt/<mount-directory>
ex: sudo mount -t ufs -r -o ufstype=ufs2 /dev/sda1 /mnt/ufsdisk

Filename Encoding Conversion

Install package
sudo apt-get install convmv

Converts filename

sudo convmv -f <encoding> -t <encoding> -r --notest *

ex: sudo convmv -f big5 -t utf-8 -r --notest *



 USAGE: convmv [options] FILE(S)

-f enc     encoding *from* which should be converted

-t enc     encoding *to* which should be converted
-r         recursively go through directories
-i         interactive mode (ask for each action)
--nfc      target files will be normalization form C for UTF-8 (Linux etc.)
--nfd      target files will be normalization form D for UTF-8 (OS X etc.)
--qfrom    be quiet about the "from" of a rename (if it screws up your terminal e.g.)
--qto      be quiet about the "to" of a rename (if it screws up your terminal e.g.)
--exec c   execute command instead of rename (use #1 and #2 and see man page)
--list     list all available encodings
--lowmem   keep memory footprint low (see man page)
--nosmart  ignore if files already seem to be UTF-8 and convert if posible
--notest   actually do rename the files
--replace  will replace files if they are equal
--unescape convert%20ugly%20escape%20sequences
--upper    turn to upper case
--lower    turn to lower case
--parsable write a parsable todo list (see man page)
--help     print this help

Mount the Windows share on Linux

Install package
sudo apt-get install smbfs


Make the directory for mount
sudo mkdir /mnt/<mount-directory>
ex: sudo mkdir /mnt/share

Mount the share
mount -t cifs //<IP>/<share> /mnt/<mount-directory> -o user=<user>,pass=<pass>,iocharset=<charset>
ex: sudo mount -t cifs //127.0.0.1/share /mnt/share/ -o user=user,iocharset=utf8


OR

mount.cifs //<IP>/<share> /mnt/<mount-directory> -o user=<user>,pass=<pass>,iocharset=<charset>

ex: sudo mount.cifs //127.0.0.1/share /mnt/share/ -o user=user,iocharset=utf8



OR

smbmount //<IP>/<share> /mnt/<mount-directory> -o user=<user>,pass=<pass>,iocharset=<charset>
ex: sudo smbmount //127.0.0.1/share /mnt/share/ -o user=user,iocharset=utf8

Umount the directory
sudo umount /mnt/<mount-directory>
ex: sudo umount /mnt/share



Usage:  mount.cifs <remotetarget> <dir> -o <options>


Mount the remote target, specified as a UNC name, to a local directory.


Options:
user=<arg>
pass=<arg>
dom=<arg>


Less commonly used options:
credentials=<filename>,guest,perm,noperm,setuids,nosetuids,rw,ro,
sep=<char>,iocharset=<codepage>,suid,nosuid,exec,noexec,serverino,
mapchars,nomapchars,nolock,servernetbiosname=<SRV_RFC1001NAME>
directio,nounix,cifsacl,sec=<authentication mechanism>,sign


Options not needed for servers supporting CIFS Unix extensions
(e.g. unneeded for mounts to most Samba versions):
uid=<uid>,gid=<gid>,dir_mode=<mode>,file_mode=<mode>,sfu


Rarely used options:
port=<tcpport>,rsize=<size>,wsize=<size>,unc=<unc_name>,ip=<ip_address>,
dev,nodev,nouser_xattr,netbiosname=<OUR_RFC1001NAME>,hard,soft,intr,
nointr,ignorecase,noposixpaths,noacl,prefixpath=<path>,nobrl


Options are described in more detail in the manual page
man 8 mount.cifs


To display the version number of the mount helper:
mount.cifs -V

2011年10月12日 星期三

Blackfin531 with OV7725+FIFO


將OV7725+FIFO接到Blackfin531非同步記憶體匯流排上
OV7725+FIFO


AL422B的控制流程

  
  
影像進入FIFO的部分利用VSYNC、WRST、WEN來控制,這部分使用GPIO
影像從FIFO讀入DSP記憶體的部分利用D0~D7、RRST、OE、RCK接非同步記憶體介面來達成
SCL、SDA控制CMOS SCCB部分以GPIO模擬達成
XCLK利用Timer產生PWM訊號當作Clock

Num.
OV7725+FIFO
BF531
Num.
OV7725+FIFO
BF531
 1
 VCC
 VCC3
 11
 RCLK
 ARE
 2
 GND
 GND
 12
 GND
 GND
 3
 SCL
 PF11
 13
 D0
 PD0
 4
 SDA
 PF10
 14
 D1
 PD1
 5
 VSYNC
 PF0
 15
 D2
 PD2
 6
 WRST
 PF2
 16
 D3
 PD3
 7
 WEN
 PF1
 17
 D4
 PD4
 8
 XCLK
 TMR2
 18
 D5
 PD5
 9
 RRST
 PA19
 19
 D6
 PD6
 10
 OE
 AMS2
 20
 D7
 PD7


程式流程
先將FIFO write disable,write reset,等到Frame出現打開write enable,抓完一個Frame後write disable
  WEN_OFF

       WRST_OFF
       Delay_us(1);
       WRST_ON
    
  while(VSYNC);
  while(!(VSYNC));
       WEN_ON
  while(VSYNC);
  while(!(VSYNC));
       WEN_OFF
讀取位置0x20200000進行read reset,讀取位置0x20280000將FIFO資料搬回記憶體
    FIFO=(unsigned char *)0x20200000;
    i=*FIFO;

    FIFO=(unsigned char *)0x20280000;
    for(i=0;i<640;i++)
        for(j=0;j<480;j++)
          ima[i][j]=*FIFO;
增加第二組OV7725+FIFO

Num.
OV7725+FIFO
BF531
Num.
OV7725+FIFO
BF531
 1
 VCC
 VCC3
 11
 RCLK
 ARE
 2
 GND
 GND
 12
 GND
 GND
 3
 SCL
 PF11
 13
 D0
 PD0
 4
 SDA
 PF10
 14
 D1
 PD1
 5
 VSYNC2
 PF3
 15
 D2
 PD2
 6
 WRST
 PF2
 16
 D3
 PD3
 7
 WEN2
 PF4
 17
 D4
 PD4
 8
 XCLK
 TMR2
 18
 D5
 PD5
 9
 RRST
 PA19
 19
 D6
 PD6
 10
 OE
 AMS3
 20
 D7
 PD7


程式流程
先將兩組FIFO write disable,同時write reset,等到CMOS1 Frame出現打開FIFO1 write enable,抓完Frame1後FIFO1 write disable
  WEN_OFF
 
WEN2_OFF

       WRST_OFF
       Delay_us(1);
       WRST_ON
    
  while(VSYNC);
  while(!(VSYNC));
       WEN_ON
  while(VSYNC);
  while(!(VSYNC));
       WEN_OFF

等到CMOS2 Frame出現打開FIFO2 write enable,抓完Frame2後FIFO2 write disable

  while(VSYNC2);
  while(!(VSYNC2));
       WEN2_ON
  while(VSYNC2);
  while(!(VSYNC2));
       WEN2_OFF
讀取位置0x20200000進行read reset,讀取位置0x20280000將FIFO資料搬回記憶體
    FIFO=(unsigned char *)0x20200000;
    i=*FIFO;

    FIFO=(unsigned char *)0x20280000;
    for(i=0;i<640;i++)
        for(j=0;j<480;j++)
          ima[i][j]=*FIFO;
讀取位置0x20300000進行read reset,讀取位置0x20380000將FIFO資料搬回記憶體
    FIFO=(unsigned char *)0x20300000;
    i=*FIFO;

    FIFO=(unsigned char *)0x20380000;
    for(i=0;i<640;i++)
        for(j=0;j<480;j++)
          ima2[i][j]=*FIFO;