Чтение cookies в Mozilla FireFox

code: #java
Connection connection = null;
ResultSet resultSet = null;
Statement statement = null;
HashMap<String, String> firefoxHashMap = new HashMap<String, String>();
 
try {
    Class.forName("org.sqlite.JDBC");
    connection = DriverManager.getConnection("jdbc:sqlite:" + ffArrIndex[i]);
    statement = connection.createStatement();
    resultSet = statement.executeQuery("SELECT * FROM moz_cookies");
 
    while (resultSet.next()) {
        key = resultSet.getString("baseDomain");
 
        if (firefoxHashMap.isEmpty()) {
            firefoxHashMap.put(key + firefoxLinkColor, "Id: " + resultSet.getString("id") + "\n");
        }
    }
} catch(Exception e) {}

автор: CodeGust

Поделиться:

Похожие статьи: