Ejemplo n.º 1
0
        public static Panel show_Gui_with_ListAdmins_Mappings(this API_Mailman apiMailman, Panel topPanel)
        {
            var tableList = topPanel.add_GroupBox("OWASP Mailing list mappings").add_TableList();
            var browser   = topPanel.insert_Right("List Admin WebPage").add_WebBrowser_Control();

            tableList.add_Columns("email", "list name", "list #", "href");
            tableList.afterSelect_get_Cell(3,
                                           (href) => {
                browser.open(href);
            });


            var listNumber = 0;

            foreach (var listName in apiMailman.mailingLists())
            {
                listNumber++;
                foreach (var email in apiMailman.get_Admins_For_MailingList(listName))
                {
                    tableList.add_Row(email,
                                      listName,
                                      listNumber.str(),
                                      "{0}admin/{1}".format(apiMailman.BaseUrl, listName));
                }
            }
            tableList.makeColumnWidthMatchCellWidth();
            return(topPanel);
        }
Ejemplo n.º 2
0
        public static Dictionary <string, Dictionary <string, string> > get_Email_Messages_for_All_Mailing_Lists_in_Month(this API_Mailman apiMailman, string month)
        {
            var emailMessages = new Dictionary <string, Dictionary <string, string> >();

            foreach (var listName in apiMailman.mailingLists())
            {
                emailMessages.Add(listName, apiMailman.get_Email_Messages_for_Mailing_List_Month(listName, month));
            }
            return(emailMessages);
        }
Ejemplo n.º 3
0
        public static Dictionary <string, Dictionary <string, string> > get_Email_Archive_HTML_For_All_Months_for_ALL_MailingLists(this API_Mailman apiMailman)
        {
            var allData        = new Dictionary <string, Dictionary <string, string> >();
            var listNames      = apiMailman.mailingLists();
            var listsProcessed = 0;

            foreach (var listName in listNames)
            {
                "[{0}/{1}] Processing {2}".lineBeforeAndAfter().lineBeforeAndAfter().debug(++listsProcessed, listNames.size(), listName);
                var listData = apiMailman.get_Email_Archive_HTML_For_All_Months_for_MailingList(listName);
                allData.Add(listName, listData);
            }
            return(allData);
        }
Ejemplo n.º 4
0
        public static Dictionary <string, string> get_AdminPage_HTML_for_ALL_MailingLists(this API_Mailman apiMailman)
        {
            var adminPagesHtml = new Dictionary <string, string>();
            var pagesDone      = 0;
            var listNames      = apiMailman.mailingLists();

            foreach (var listName in listNames)
            {
                adminPagesHtml.Add(listName, apiMailman.get_AdminPage_HTML_for_MailingList(listName));
                if (++pagesDone % 25 == 0)
                {
                    "done {0} out of  {1}".debug(pagesDone, listNames.size());
                }
            }
            "get_AdminPage_HTML_for_ALL_MailingLists completed".debug();
            return(adminPagesHtml);
        }
Ejemplo n.º 5
0
        public static Panel show_Gui_with_ListAdmins_Mappings(this API_Mailman apiMailman, Panel topPanel)
        {
            var tableList = topPanel.add_GroupBox("OWASP Mailing list mappings").add_TableList();
            var browser   = topPanel.insert_Right("List Admin WebPage").add_WebBrowser_Control();

            tableList.add_Columns("email", "list name", "list #", "href");
            tableList.afterSelect_get_Cell(3,
                                           (href) => {
                browser.open(href);
            });

            /*browser.onNavigated( // not working the browser still gets the focus
             *      (url)=> {
             *                              "onNavigated".info();
             *                              tableList.listView().focus();
             *                              tableList.focus();
             *
             *                      });*/

            var listNumber = 0;

            tableList.visible(false);
            foreach (var listName in apiMailman.mailingLists().Take(20))
            {
                listNumber++;
                foreach (var email in apiMailman.get_Admins_For_MailingList(listName))
                {
                    tableList.add_Row(email,
                                      listName,
                                      listNumber.str(),
                                      "{0}admin/{1}".format(apiMailman.BaseUrl, listName));
                }
            }
            tableList.visible(true);
            tableList.makeColumnWidthMatchCellWidth();
            return(topPanel);
        }