close
Warning:
Failed to sync with repository "ogBrowser-Git": (1366, "Incorrect string value: '\\xF0\\x9F\\x93\\xA6 I...' for column 'message' at row 1"); repository information may be out of date. Look in the Trac log for more information including mitigation strategies.
- Timestamp:
-
Feb 25, 2012, 6:52:33 PM (14 years ago)
- Author:
-
paqui
- Comment:
-
Finish. Review
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v1
|
v2
|
|
9 | 9 | == PostconfEAC.lib == |
10 | 10 | |
11 | | El acceso al registro de windows, en está librerias está orientada a gestionar un importador de los ficheros tipo .reg de windows. |
12 | | * Fase1: |
13 | | * Localizar todos los hive(fichero de registro) del sistema windows y todos los hive de los usuarios. |
| 11 | To access to Windows registry, this library is oriented to manage a files importer type .reg of Windows. |
| 12 | |
| 13 | * Phase 1: |
| 14 | * Locate all hive (register file) of Microsoft Windows and all users hive. |
14 | 15 | * ogLoadHiveWindows(int_disk int_partition) |
15 | | * Esta función exportará las variables del sistema: hiveSAM hiveSYSTEM hiveSOFTWARE que contendrá la ruta del fichero hive correspondiente. |
16 | | * También exportará las variables de usuario windows: $usuraio=hiveUserX; hiveUserX=ruta_fichero_registro_usuario(.dat) |
| 16 | * This function exports all system variable: hiveSAM hiveSYSTEM hiveSOFTWARE with the corresponding file path hive. |
| 17 | * Microsoft Windows user variable will be exported: $user=hiveUserX; hiveUserX=path_to_register_file_user(.dat) |
17 | 18 | |
18 | | * Fase2: |
19 | | * Componer un fichero tipo *.reg pero con formato chntpwd (programa linux de acceso al registro windows). |
20 | | * Ya existen algunas funciones, de este tipo. |
21 | | * Esta fase, puede contener todos los accesos que queramos, el fichero *.reg formato chntpwd irá creciendo, permitiendo multiples accesos a distintos hives. |
22 | | * Algunas funciones de este tipo son: |
| 19 | * Phase 2: |
| 20 | * Compose a file *.reg but with format chntpwd (program Linux to access to Windows registry). |
| 21 | * This phase may contain all the accesses that we want, the file *.reg with format chntpwd will grown. This allow access multiple to differents hives. |
| 22 | * Some functions are: |
23 | 23 | * ogNTPolUserOn() |
24 | 24 | * NTChangeName() |
… |
… |
|
30 | 30 | * NTRunUser() |
31 | 31 | * NTStatusBootChk() |
32 | | * Por ejemplo, si queremos que windows, cuando arranque ejecute un comando, se debe llamar a ogHiveNTRunMachine "cmd /c del c:\ogboot.* " ogcleanboot |
| 32 | * For example, when Windows boots run an instruction, you should call ogHiveNTRunMachine "cmd /c del c:\ogboot.* " ogcleanboot |
33 | 33 | |
34 | 34 | {{{ |
35 | 35 | function ogHiveNTRunMachine (path_script|instruccion idscript) { |
36 | | cat >> $TEMPhive << EOF # Generamos el fichero *reg de formato chntpwd. |
37 | | h 2 # Usamos el hive con id 2 que es hive correspondiente a SYSTEM. |
38 | | cd \Microsoft\Windows\CurrentVersion\Run # Nos desplazamos hasta la rama correspondiente |
39 | | nv 1 $2 # Creamos una nueva entrada coyo nombre el el parametro2 (identificación) |
40 | | ed $2 # Editamos la entrada creada con: |
41 | | $1 # Incluimos el valor de la ruta del scripts a ejecutar, o directamente la instrucción cmd. |
| 36 | cat >> $TEMPhive << EOF # Generate a *reg file with format chntpwd. |
| 37 | h 2 # Use hive with id 2. It is corresponding to SYSTEM. |
| 38 | cd \Microsoft\Windows\CurrentVersion\Run # Go to corresponding path |
| 39 | nv 1 $2 # Create a new entry with the name of the parameter2 (identification) |
| 40 | ed $2 # Edit the entry with: |
| 41 | $1 # Include the path to run scripts or directly the cmd command. |
42 | 42 | EOF |
43 | 43 | } |
… |
… |
|
46 | 46 | |
47 | 47 | |
48 | | * Fase 4. |
49 | | * Actualizamos los hive indicados en fichero *.reg-chntpwd. |
| 48 | * Phase 3: |
| 49 | * Update hive in file *.reg-chntpwd. |
50 | 50 | * ogUpdateHiveWindows() |
51 | 51 | |
52 | | * Ejemplo para que windows ejecute una instrucción cada vez que arranque. |
| 52 | * Example where Windows run an instruction every time it boots. |
53 | 53 | http://www.opengnsys.es/browser/trunk/client/engine/Boot.lib#L77 |