Examples of EncryptedNode


Examples of org.rat.free.security.makifx.base.EncryptedNode

            TableCell cell = new TableCell() {
                @Override
                public void updateItem(Object item, boolean empty) {
                    if (item != null && !empty && item instanceof EncryptedNode) {
                        EncryptedNode node = (EncryptedNode) item;
                        Label label_cell = new Label();
                        label_cell.setId("generic_label");
                        try {
                            /*
                             TableColumn title_priority = new TableColumn(RBLoader.ll("Priority"));
                             TableColumn title_name = new TableColumn(RBLoader.ll("Name"));
                             TableColumn title_fdir = new TableColumn(RBLoader.ll("File/Directory"));
                             TableColumn title_action = new TableColumn(RBLoader.ll("Action"));
                             TableColumn title_dest = new TableColumn(RBLoader.ll("Destination"));
                             TableColumn title_status = new TableColumn(RBLoader.ll("Status"));
                             * */
                            switch (column) {
                                case 0: {
                                    if (node.getProperties().containsKey("priority")) {
                                        label_cell.setText(node.getProperties().get("priority"));
                                    }
                                    break;
                                }
                                case 1: {
                                    if (node.getProperties().containsKey("name")) {
                                        label_cell.setText(node.getProperties().get("name"));
                                    }
                                    break;
                                }
                                case 2: {
                                    if (node.getProperties().containsKey("source")) {
                                        label_cell.setText(node.getProperties().get("source"));
                                    }
                                    break;
                                }
                                case 3: {
                                    if (node.getProperties().containsKey("action")) {
                                        label_cell.setText(node.getProperties().get("action"));
                                    }
                                    break;
                                }
                                case 4: {
                                    if (node.getProperties().containsKey("destination")) {
                                        label_cell.setText(node.getProperties().get("destination"));
                                    }
                                    break;
                                }
                                /*case 5: {
                                 if (node.getProperties().containsKey("status")) {
View Full Code Here

Examples of org.rat.free.security.makifx.base.EncryptedNode

        try {

            escaper = LooB.get().fromStock(Escaper.class);

            if (root_node == null || root_node.isLeaf()) {
                root_node = new EncryptedNode();
                root_node.setId(getTabTitle());
                root_node.getProperties().put("process", "");
                manager.putInStoredData(getId(), root_node);
                ctree = executeCommand();
                root_node.addChild(ctree);
View Full Code Here

Examples of org.rat.free.security.makifx.base.EncryptedNode

            __total_proc = 0;
            __proc_over = 0;
            __proc_less = 0;

            EncryptedNode p_act = executeCommand();

            Utility.log("getAllChildOf procAttuali: " + p_act);
            List<EncryptedNode> __curr_proc = getAllChildOf(p_act);

            Utility.log("getAllChildOf root_saved: " + root_saved);
            List<EncryptedNode> __saved_proc = getAllChildOf(root_saved);

            if (__curr_proc != null) {
                for (EncryptedNode natt : __curr_proc) {

                    __total_proc++;
                    EncryptedNode bef = this.evalNodesList(__saved_proc, natt);

                    Map<String, String> m = natt.getProperties();
                    String name = (m.containsKey("name") ? m.get("name") : "...");

                    name = escaper.unescapeValue(name);

                    if (bef != null) {
                        //DLL
                    } else {

                        TreeItem<String> n = new TreeItem<>(name);
                        ImageView iv = new ImageView(Utility.getImage("plus_24.png"));
                        n.setGraphic(iv);

                        result.getChildren().add(n);

                        __proc_over++;
                    }
                }
            } else {
                Utility.log("__curr_proc null");
            }

            if (__saved_proc != null) {
                for (EncryptedNode nsal : __saved_proc) {
                    EncryptedNode min = this.evalNodesList(__curr_proc, nsal);
                    if (min == null) {

                        Map<String, String> m = nsal.getProperties();
                        String name = (m.containsKey("name") ? m.get("name") : "...");
View Full Code Here

Examples of org.rat.free.security.makifx.base.EncryptedNode

                return null;
            }
            List<EncryptedNode> fs = n.getChilds();
            Iterator<EncryptedNode> ite = fs.iterator();
            while (ite.hasNext()) {
                EncryptedNode i = ite.next();
                __list_en.add(i);
            }
        } catch (Exception ex) {
            Utility.log("Err in getAllChildOf:" + ex);
        }
View Full Code Here

Examples of org.rat.free.security.makifx.base.EncryptedNode

        return null;
    }

    private EncryptedNode executeCommand() {

        EncryptedNode root_tree = new EncryptedNode();
        root_tree.setId("Process");

        String result_cmd_proc = "";

        try {

            if (!Utility.isOsLinux()) {
                result_cmd_proc = Utility.executeCommand(COMMAND_TASK_PROC_WIN);
            } else {
                result_cmd_proc = Utility.executeCommand(COMMAND_PS_PROC_LINUX);
            }

            StringTokenizer st = new StringTokenizer(result_cmd_proc, "\n");
            String __proc = null;
            String __ram = null;
            String __pid = null;

            while (st.hasMoreTokens()) {

                String t = st.nextToken().trim();

                if (Utility.isOsLinux()) {

                    if (t.startsWith("UID")) {
                        continue;
                    } else {

                        int cc = 0;
                        String[] str = t.split("\\ ");
                        for (int i = 0; i < str.length; i++) {
                            String s = str[i].trim();
                            if (s != null && s.length() > 0) {
                                switch (cc) {
                                    case 1: {
                                        __pid = s;
                                        break;
                                    }
                                    case 7: {
                                        __proc = t.substring(t.indexOf(s));
                                        break;
                                    }
                                }
                                cc++;
                            }
                        }

                        if (__proc != null && __pid != null) {

                            EncryptedNode node = new EncryptedNode();

                            if (escaper != null) {
                                __proc = escaper.escapeValue(__proc);
                            }

                            node.getProperties().put("name", __proc);
                            node.getProperties().put("ram", "not_set");
                            node.getProperties().put("pid", __pid);
                            root_tree.addChild(node);

                            __proc = null;
                            __pid = null;
                        }
                    }
                } else {

                    /**
                     * ATTENZIONE DA MODIFICARE PER LINGUA DIVERSA.
                     */
                    if (t.startsWith("Image Name") || t.startsWith("Nome immagine")) {
                        __proc = t.substring(t.indexOf(":") + 1);
                        __proc = __proc.trim();
                    }
                    if (t.startsWith("Mem Usage") || t.startsWith("Utilizzo memoria")) {
                        __ram = t.substring(t.indexOf(":") + 1);
                        __ram = __ram.trim();
                    }
                    if (t.startsWith("PID") || t.startsWith("PID")) {
                        __pid = t.substring(t.indexOf(":") + 1);
                        __pid = __pid.trim();
                    }

                    if (__proc != null && __ram != null) {

                        EncryptedNode node = new EncryptedNode();

                        if (escaper != null) {
                            __proc = escaper.escapeValue(__proc);
                        }

                        node.getProperties().put("name", __proc);
                        node.getProperties().put("ram", __ram);
                        node.getProperties().put("pid", __pid);
                        root_tree.addChild(node);

                        __proc = null;
                        __ram = null;
                    }
View Full Code Here

Examples of org.rat.free.security.makifx.base.EncryptedNode

            manager.registerToolBarItems(getId(), __btn_new_acc, __btn_home,
                    __btn_edit, __btn_undo, __btn_del_acc, __btn_print, __btn_explore);

            if (root_node == null) {
                root_node = new EncryptedNode();
                root_node.setId(_FIRST_TAB_TITLE_);
                manager.putInStoredData(getId(), root_node);
            }

            __tabbed = new TabPane();
View Full Code Here

Examples of org.rat.free.security.makifx.base.EncryptedNode

        int size = data_table.size();

        for (int i = 0; i < size; i++) {
            CellPropertiesManager cpm = data_table.get(i);
            EncryptedNode node = cpm.getNode();

            if (node == null) {
                continue;
            }

            String t = node.getProperties().get("title");

            if (t != null && t.startsWith(title)) {
                return cpm;
            }
        }
View Full Code Here

Examples of org.rat.free.security.makifx.base.EncryptedNode

    @Deprecated
    private boolean isAlreadyTitlePresent_OLD(String title) {
        if (data_table != null) {
            int size = data_table.size();
            for (int i = 0; i < size; i++) {
                EncryptedNode node = data_table.get(i).getNode();
                if (title.equals(node.getProperties().get("title"))) {
                    return true;
                }
            }
        }
        return false;
View Full Code Here

Examples of org.rat.free.security.makifx.base.EncryptedNode

        }
    }

    private void makeNewAccount() {

        EncryptedNode node = null;

        int size = data_table.size();
        for (int i = 0; i < size; i++) {
            node = data_table.get(i).getNode();
            if (_IMPOSSIBLE_TITLE_.equals(node.getProperties().get("title"))) {
                openTabbedEditor(data_table.get(i));
                return;
            }
        }

        node = new EncryptedNode();
        node.getProperties().put("title", _IMPOSSIBLE_TITLE_);
        node.getProperties().put("is_open", "false");
        node.getProperties().put("url_value", "");
        node.getProperties().put("comment_value", "");
        node.getProperties().put("email_value", "");

        try {

            manager.setSensibleValue(node, "user_type", String.valueOf(SensibleValueTypeListener.CLEAR_VALUE_TYPE));
            manager.setSensibleValue(node, "password1_type", String.valueOf(SensibleValueTypeListener.PASS_VALUE_TYPE));
View Full Code Here

Examples of org.rat.free.security.makifx.base.EncryptedNode

    }

    private void openTabbedEditor(final CellPropertiesManager EDITOR) {
        try {

            EncryptedNode NODE = EDITOR.getNode();
            String TITLE = NODE.getProperties().get("title");

            ObservableList<Tab> tabs = __tabbed.getTabs();
            if (tabs != null) {
                for (Tab t : tabs) {
                    if (t.getId() != null && t.getId().equals(EDITOR.getInstanceId())) {
                        __tabbed.getSelectionModel().select(t);
                        EDITOR.__tab_edit_title_txt.requestFocus();
                        return;
                    }
                }
            }

            EDITOR.initEditor();

            final Tab TAB = new Tab(!_IMPOSSIBLE_TITLE_.equals(TITLE) ? TITLE : "");

            TAB.setId(EDITOR.getInstanceId());

            BorderPane bpane = new BorderPane();

            SidePane tab_edit_panel = EDITOR.__sider;
            bpane.setCenter(tab_edit_panel);
            TAB.setContent(bpane);

            //****************************************************************//
            //*                  GESTIONE CLOSE TAB                          *//
            //****************************************************************//
            TAB.setOnCloseRequest((javafx.event.Event evt) -> {
                closeEditor(EDITOR, evt, TAB);
            });

            NODE.getProperties().put("is_open", "true");

            //----------------------------------------------------------------//
            //                  SETTO I CAMPI DELLA MASCHERA                  //
            //----------------------------------------------------------------//
            EDITOR.__tab = TAB;

            if (!_IMPOSSIBLE_TITLE_.equals(TITLE)) {
                EDITOR.__tab_edit_title_txt.setText(TITLE);
            } else {
                EDITOR.__tab_edit_title_txt.setPromptText(RBLoader.ll("Please enter your Title here."));
            }

            EDITOR.__tab_edit_email_txt.setText(NODE.getProperties().get("email_value"));
            EDITOR.__tab_edit_url_txt.setText(NODE.getProperties().get("url_value"));
            EDITOR.__tab_edit_area_comment.setText(escaper.unescapeValue(NODE.getProperties().get("comment_value")));

            initSensibleEditor(getSensibleType(NODE, "user_type"), EDITOR.__username_editor, NODE, "user_name_value");
            initSensibleEditor(getSensibleType(NODE, "password1_type"), EDITOR.__pass1_editor, NODE, "password1_value");
            initSensibleEditor(getSensibleType(NODE, "password2_type"), EDITOR.__pass2_editor, NODE, "password2_value");

            //----------------------------------------------------------------//
            //----------------------------------------------------------------//
            //----------------------------------------------------------------//
            EDITOR.__tab_edit_btn_copy_user.setOnAction((ActionEvent e) -> {
                try {
                    EncryptedNode NODE1 = EDITOR.getNode();
                    String value = null;
                    if (SensibleValueTypeListener.HIDDEN_VALUE_TYPE == EDITOR.__username_editor.getType()) {
                        value = getSensibleValue(NODE1, "user_name_value");
                    } else {
                        value = EDITOR.__username_editor.getValue();
                    }
                    manager.copyToScrambledClipboard(value);
                } catch (Exception exc) {
                    exc.printStackTrace();
                }
            });
            EDITOR.__tab_edit_btn_copy_pass1.setOnAction(new EventHandler<ActionEvent>() {
                @Override
                public void handle(ActionEvent e) {
                    try {

                        EncryptedNode NODE = EDITOR.getNode();

                        String value = null;

                        if (SensibleValueTypeListener.HIDDEN_VALUE_TYPE == EDITOR.__pass1_editor.getType()) {

                            value = getSensibleValue(NODE, "password1_value");

                        } else {
                            value = EDITOR.__pass1_editor.getValue();
                        }

                        manager.copyToScrambledClipboard(value);

                    } catch (Exception exc) {
                        exc.printStackTrace();
                    }
                }
            });
            EDITOR.__tab_edit_btn_copy_pass2.setOnAction((ActionEvent e) -> {
                try {
                    EncryptedNode NODE1 = EDITOR.getNode();
                    String value = null;
                    if (SensibleValueTypeListener.HIDDEN_VALUE_TYPE == EDITOR.__pass2_editor.getType()) {
                        value = getSensibleValue(NODE1, "password2_value");
                    } else {
                        value = EDITOR.__pass2_editor.getValue();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.