change access for stuff meant to be private
This commit is contained in:
		
							parent
							
								
									cc8b8d2249
								
							
						
					
					
						commit
						6598602dbc
					
				@ -5,8 +5,8 @@ import java.util.Vector;
 | 
			
		||||
 | 
			
		||||
public class MetaBase extends Win32Bindings
 | 
			
		||||
{
 | 
			
		||||
    static private int IIS_MD_SERVER_BASE             = 1000;
 | 
			
		||||
    static private int IIS_MD_HTTP_BASE               = 2000;
 | 
			
		||||
    private static int IIS_MD_SERVER_BASE             = 1000;
 | 
			
		||||
    private static int IIS_MD_HTTP_BASE               = 2000;
 | 
			
		||||
 | 
			
		||||
    /* NOTE:  This is only a partial list of the information that can 
 | 
			
		||||
     * get from the metabase.
 | 
			
		||||
@ -35,8 +35,8 @@ public class MetaBase extends Win32Bindings
 | 
			
		||||
    //  These properties are specific to HTTP and belong to the website
 | 
			
		||||
    public static int MD_SECURE_BINDINGS             = IIS_MD_HTTP_BASE+21;
 | 
			
		||||
    
 | 
			
		||||
    protected int m_handle;
 | 
			
		||||
    protected long pIMeta;
 | 
			
		||||
    private int m_handle;
 | 
			
		||||
    private long pIMeta;
 | 
			
		||||
 | 
			
		||||
    public MetaBase()
 | 
			
		||||
    {
 | 
			
		||||
@ -128,19 +128,16 @@ public class MetaBase extends Win32Bindings
 | 
			
		||||
        return (String[])coll.toArray(new String[coll.size()]);
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    protected final native long      MetaBaseInit();
 | 
			
		||||
    protected final native void      MetaBaseClose();
 | 
			
		||||
    protected final native void      MetaBaseRelease();
 | 
			
		||||
    protected final native String    MetaBaseEnumKey(int index);
 | 
			
		||||
    protected final native void      MetaBaseOpenSubKey(String subkey);
 | 
			
		||||
    protected final native void      MetaBaseOpenSubKeyAbs(String subkey);
 | 
			
		||||
    protected final native int       MetaBaseGetIntValue(int datakey);
 | 
			
		||||
    protected final native String    MetaBaseGetStringValue(int datakey);
 | 
			
		||||
    protected final native String[]  MetaBaseGetMultiStringValue(int datakey);
 | 
			
		||||
    private final native long      MetaBaseInit();
 | 
			
		||||
    private final native void      MetaBaseClose();
 | 
			
		||||
    private final native void      MetaBaseRelease();
 | 
			
		||||
    private final native String    MetaBaseEnumKey(int index);
 | 
			
		||||
    private final native void      MetaBaseOpenSubKey(String subkey);
 | 
			
		||||
    private final native void      MetaBaseOpenSubKeyAbs(String subkey);
 | 
			
		||||
    private final native int       MetaBaseGetIntValue(int datakey);
 | 
			
		||||
    private final native String    MetaBaseGetStringValue(int datakey);
 | 
			
		||||
    private final native String[]  MetaBaseGetMultiStringValue(int datakey);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Main method for dumping out IIS websites from the MetaBase
 | 
			
		||||
     */
 | 
			
		||||
    public static void main(String args[]) {
 | 
			
		||||
 | 
			
		||||
        try {
 | 
			
		||||
 | 
			
		||||
@ -5,8 +5,8 @@ import java.util.List;
 | 
			
		||||
 | 
			
		||||
public class Pdh extends Win32Bindings {
 | 
			
		||||
 | 
			
		||||
    protected long   h_query;         // Handle to the query
 | 
			
		||||
    protected String hostname;        // Not yet supported
 | 
			
		||||
    private long   h_query;         // Handle to the query
 | 
			
		||||
    private String hostname;        // Not yet supported
 | 
			
		||||
 | 
			
		||||
    private   String counterPath;
 | 
			
		||||
    private   long   h_counter = -1l; // Handle to the counter
 | 
			
		||||
@ -72,15 +72,15 @@ public class Pdh extends Win32Bindings {
 | 
			
		||||
        this.counterPath = cp;
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    protected static final native long pdhOpenQuery();
 | 
			
		||||
    protected static final native void pdhCloseQuery(long query);
 | 
			
		||||
    protected static final native long pdhAddCounter(long query, String cp);
 | 
			
		||||
    protected static final native void pdhRemoveCounter(long counter);
 | 
			
		||||
    protected static final native double pdhGetSingleValue(long query, 
 | 
			
		||||
                                                           long counter);
 | 
			
		||||
    protected static final native String[] pdhGetInstances(String cp);
 | 
			
		||||
    protected static final native String[] pdhGetKeys(String cp);
 | 
			
		||||
    protected static final native String[] pdhGetObjects();
 | 
			
		||||
    private static final native long pdhOpenQuery();
 | 
			
		||||
    private static final native void pdhCloseQuery(long query);
 | 
			
		||||
    private static final native long pdhAddCounter(long query, String cp);
 | 
			
		||||
    private static final native void pdhRemoveCounter(long counter);
 | 
			
		||||
    private static final native double pdhGetSingleValue(long query, 
 | 
			
		||||
                                                         long counter);
 | 
			
		||||
    private static final native String[] pdhGetInstances(String cp);
 | 
			
		||||
    private static final native String[] pdhGetKeys(String cp);
 | 
			
		||||
    private static final native String[] pdhGetObjects();
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Main method for dumping the entire PDH
 | 
			
		||||
 | 
			
		||||
@ -5,25 +5,38 @@ import java.util.Vector;
 | 
			
		||||
 | 
			
		||||
public class RegistryKey extends Win32Bindings
 | 
			
		||||
{
 | 
			
		||||
    protected static final int HKEY_CLASSES_ROOT     = 0x80000000;
 | 
			
		||||
    protected static final int HKEY_CURRENT_USER     = 0x80000001;
 | 
			
		||||
    protected static final int HKEY_LOCAL_MACHINE    = 0x80000002;
 | 
			
		||||
    protected static final int HKEY_USERS            = 0x80000003;
 | 
			
		||||
    protected static final int HKEY_PERFORMANCE_DATA = 0x80000004;
 | 
			
		||||
    protected static final int HKEY_CURRENT_CONFIG   = 0x80000005;
 | 
			
		||||
    protected static final int HKEY_DYN_DATA         = 0x80000006;
 | 
			
		||||
    private static final int HKEY_CLASSES_ROOT     = 0x80000000;
 | 
			
		||||
    private static final int HKEY_CURRENT_USER     = 0x80000001;
 | 
			
		||||
    private static final int HKEY_LOCAL_MACHINE    = 0x80000002;
 | 
			
		||||
    private static final int HKEY_USERS            = 0x80000003;
 | 
			
		||||
    private static final int HKEY_PERFORMANCE_DATA = 0x80000004;
 | 
			
		||||
    private static final int HKEY_CURRENT_CONFIG   = 0x80000005;
 | 
			
		||||
    private static final int HKEY_DYN_DATA         = 0x80000006;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * HKEY_CLASSES_ROOT
 | 
			
		||||
     */
 | 
			
		||||
    public static final RegistryKey ClassesRoot 
 | 
			
		||||
        = new RegistryKey(RegistryKey.HKEY_CLASSES_ROOT);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * HKEY_CURRENT_USER
 | 
			
		||||
     */
 | 
			
		||||
    public static final RegistryKey CurrentUser
 | 
			
		||||
        = new RegistryKey(RegistryKey.HKEY_CURRENT_USER);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * HKEY_LOCAL_MACHINE
 | 
			
		||||
     */
 | 
			
		||||
    public static final RegistryKey LocalMachine 
 | 
			
		||||
        = new RegistryKey(RegistryKey.HKEY_LOCAL_MACHINE);
 | 
			
		||||
    
 | 
			
		||||
    protected long  m_hkey;
 | 
			
		||||
    private long m_hkey;
 | 
			
		||||
    private String subkey;
 | 
			
		||||
 | 
			
		||||
    protected RegistryKey(long hkey)
 | 
			
		||||
    private RegistryKey() { }
 | 
			
		||||
    
 | 
			
		||||
    private RegistryKey(long hkey)
 | 
			
		||||
    {
 | 
			
		||||
        this.m_hkey = hkey;
 | 
			
		||||
    }
 | 
			
		||||
@ -214,32 +227,32 @@ public class RegistryKey extends Win32Bindings
 | 
			
		||||
            this.close();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected static final native int    RegCloseKey(long hkey);
 | 
			
		||||
    protected static final native long   RegCreateKey(long hkey, 
 | 
			
		||||
                                                      String subkey);
 | 
			
		||||
    protected static final native int    RegDeleteKey(long hkey, 
 | 
			
		||||
                                                      String subkey);
 | 
			
		||||
    protected static final native int    RegDeleteValue(long hkey, 
 | 
			
		||||
    private static final native int    RegCloseKey(long hkey);
 | 
			
		||||
    private static final native long   RegCreateKey(long hkey, 
 | 
			
		||||
                                                    String subkey);
 | 
			
		||||
    private static final native int    RegDeleteKey(long hkey, 
 | 
			
		||||
                                                    String subkey);
 | 
			
		||||
    private static final native int    RegDeleteValue(long hkey, 
 | 
			
		||||
                                                      String valueName);
 | 
			
		||||
    private static final native String RegEnumKey(long hkey, 
 | 
			
		||||
                                                  int index);
 | 
			
		||||
    private static final native String RegEnumValueName(long hkey, 
 | 
			
		||||
                                                        int index);
 | 
			
		||||
    private static final native int    RegFlushKey(long hkey);
 | 
			
		||||
    private static final native int    RegLoadKey(long hkey, 
 | 
			
		||||
                                                  String subkey, 
 | 
			
		||||
                                                  String filename);
 | 
			
		||||
    private static final native long   RegOpenKey(long hkey, String subkey);
 | 
			
		||||
    private static final native byte[] RegQueryBufferValue(long hkey, 
 | 
			
		||||
                                                           String valueName);
 | 
			
		||||
    private static final native int    RegQueryIntValue(long hkey,
 | 
			
		||||
                                                        String valueName);
 | 
			
		||||
    protected static final native String RegEnumKey(long hkey, 
 | 
			
		||||
                                                    int index);
 | 
			
		||||
    protected static final native String RegEnumValueName(long hkey, 
 | 
			
		||||
                                                          int index);
 | 
			
		||||
    protected static final native int    RegFlushKey(long hkey);
 | 
			
		||||
    protected static final native int    RegLoadKey(long hkey, 
 | 
			
		||||
                                                    String subkey, 
 | 
			
		||||
                                                    String filename);
 | 
			
		||||
    protected static final native long   RegOpenKey(long hkey, String subkey);
 | 
			
		||||
    protected static final native byte[] RegQueryBufferValue(long hkey, 
 | 
			
		||||
                                                             String valueName);
 | 
			
		||||
    protected static final native int    RegQueryIntValue(long hkey,
 | 
			
		||||
                                                          String valueName);
 | 
			
		||||
    protected static final native String RegQueryStringValue(long hkey, 
 | 
			
		||||
                                                             String valueName);
 | 
			
		||||
    protected static final native int    RegSetIntValue(long hkey, 
 | 
			
		||||
                                                        String valueName,
 | 
			
		||||
                                                        int value);
 | 
			
		||||
    protected static final native int    RegSetStringValue(long hkey, 
 | 
			
		||||
                                                           String valueName, 
 | 
			
		||||
                                                           String value);
 | 
			
		||||
    private static final native String RegQueryStringValue(long hkey, 
 | 
			
		||||
                                                           String valueName);
 | 
			
		||||
    private static final native int    RegSetIntValue(long hkey, 
 | 
			
		||||
                                                      String valueName,
 | 
			
		||||
                                                      int value);
 | 
			
		||||
    private static final native int    RegSetStringValue(long hkey, 
 | 
			
		||||
                                                         String valueName, 
 | 
			
		||||
                                                         String value);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user