Exemple #1
0
 public Abuse(IAssetService assetService)
 {
     InitializeComponent();
     m_assetService = assetService;
     AbuseReportsConnector = Aurora.DataManager.DataManager.RequestPlugin<IAbuseReportsConnector>();
     Password = Util.Md5Hash(Microsoft.VisualBasic.Interaction.InputBox("Password for abuse reports database.", "Password Input Required", "", 0, 0));
 }
Exemple #2
0
 public Abuse(IAssetService assetService)
 {
     InitializeComponent();
     m_assetService = assetService;
     AbuseReportsConnector = Aurora.DataManager.DataManager.RequestPlugin<IAbuseReportsConnector>();
     Password = "";
     //Abuse.InputBox("Password Input Required", "Password for abuse reports database", ref Password);
 }
Exemple #3
0
 public Abuse(IAssetService assetService)
 {
     InitializeComponent();
     m_assetService        = assetService;
     AbuseReportsConnector = Aurora.DataManager.DataManager.RequestPlugin <IAbuseReportsConnector>();
     Password = "";
     //Abuse.InputBox("Password Input Required", "Password for abuse reports database", ref Password);
 }
Exemple #4
0
        public void AddAbuseReport(AbuseReport abuse_report)
        {
            IAbuseReportsConnector conn = Aurora.DataManager.DataManager.RequestPlugin <IAbuseReportsConnector>();

            if (conn != null)
            {
                conn.AddAbuseReport(abuse_report);
            }
        }
Exemple #5
0
 public Abuse(IAssetService assetService, IJ2KDecoder j2k)
 {
     InitializeComponent();
     m_decoder             = j2k;
     m_assetService        = assetService;
     AbuseReportsConnector = DataManager.DataManager.RequestPlugin <IAbuseReportsConnector>();
     Password = "";
     Utilities.InputBox("Password Input Required", "Password for abuse reports database", ref Password);
 }
Exemple #6
0
 public Abuse(IAssetService assetService, IJ2KDecoder j2k)
 {
     InitializeComponent();
     m_decoder = j2k;
     m_assetService = assetService;
     AbuseReportsConnector = DataManager.DataManager.RequestPlugin<IAbuseReportsConnector>();
     Password = "";
     Utilities.InputBox("Password Input Required", "Password for abuse reports database", ref Password);
 }
        public void UpdateAbuseReport(AbuseReport report)
        {
            IAbuseReportsConnector conn = DataManager.RequestPlugin <IAbuseReportsConnector>();

            if (conn != null)
            {
                conn.UpdateAbuseReport(report);
            }
        }
        public void UpdateAbuseReport(AbuseReport report, string Password)
        {
            IAbuseReportsConnector conn = Framework.Utilities.DataManager.RequestPlugin <IAbuseReportsConnector>();

            if (conn != null)
            {
                conn.UpdateAbuseReport(report, Password);
            }
        }
Exemple #9
0
        //[CanBeReflected(ThreatLevel = ThreatLevel.Full)]
        public AbuseReport GetAbuseReport(int Number, string Password)
        {
            /*object remoteValue = DoRemote(Number, Password);
             * if (remoteValue != null || m_doRemoteOnly)
             *  return (AbuseReport)remoteValue;*/

            IAbuseReportsConnector conn = Framework.Utilities.DataManager.RequestPlugin <IAbuseReportsConnector>();

            return((conn != null) ? conn.GetAbuseReport(Number, Password) : null);
        }
Exemple #10
0
        public void AddAbuseReport(AbuseReport abuse_report)
        {
            object remoteValue = DoRemote(abuse_report);
            if (remoteValue != null || m_doRemoteOnly)
                return;

            IAbuseReportsConnector conn = Framework.Utilities.DataManager.RequestPlugin<IAbuseReportsConnector>();
            if (conn != null)
                conn.AddAbuseReport(abuse_report);
        }
Exemple #11
0
        public List<AbuseReport> GetAbuseReports(int start, int count, bool active)
        {
            object remoteValue = DoRemote(start, count, active);
            if (remoteValue != null || m_doRemoteOnly)
                return (List<AbuseReport>) remoteValue;

            IAbuseReportsConnector conn = Framework.Utilities.DataManager.RequestPlugin<IAbuseReportsConnector>();
            if (conn != null)
                return conn.GetAbuseReports(start, count, active);
            else
                return null;
        }
        public AbuseReport GetAbuseReport(int Number, string Password)
        {
            object remoteValue = DoRemote(Number, Password);

            if (remoteValue != null || m_doRemoteOnly)
            {
                return((AbuseReport)remoteValue);
            }

            IAbuseReportsConnector conn = DataManager.RequestPlugin <IAbuseReportsConnector>();

            return((conn != null) ? conn.GetAbuseReport(Number, Password) : null);
        }
Exemple #13
0
        public List <AbuseReport> GetAbuseReports(int start, int count, string filter)
        {
            IAbuseReportsConnector conn = Aurora.DataManager.DataManager.RequestPlugin <IAbuseReportsConnector>();

            if (conn != null)
            {
                return(conn.GetAbuseReports(start, count, filter));
            }
            else
            {
                return(null);
            }
        }
Exemple #14
0
        //[CanBeReflected(ThreatLevel = ThreatLevel.Full)]
        public void UpdateAbuseReport(AbuseReport report, string Password)
        {
            /*object remoteValue = DoRemote(report, Password);
             * if (remoteValue != null || m_doRemoteOnly)
             *  return;*/

            IAbuseReportsConnector conn = Framework.Utilities.DataManager.RequestPlugin <IAbuseReportsConnector>();

            if (conn != null)
            {
                conn.UpdateAbuseReport(report, Password);
            }
        }
Exemple #15
0
        public AbuseReport GetAbuseReport(int Number, string Password)
        {
            IAbuseReportsConnector conn = Aurora.DataManager.DataManager.RequestPlugin <IAbuseReportsConnector>();

            if (conn != null)
            {
                return(conn.GetAbuseReport(Number, Password));
            }
            else
            {
                return(null);
            }
        }
        public void AddAbuseReport(AbuseReport abuse_report)
        {
            if (m_doRemoteOnly)
            {
                DoRemote(abuse_report);
                return;
            }

            IAbuseReportsConnector conn = Framework.Utilities.DataManager.RequestPlugin <IAbuseReportsConnector> ();

            if (conn != null)
            {
                conn.AddAbuseReport(abuse_report);
            }
        }
 public void FinishedStartup()
 {
     abuseConnector = Framework.Utilities.DataManager.RequestPlugin<IAbuseReportsConnector> ();
     if (abuseConnector != null)
     {
         if (MainConsole.Instance != null)
         {
             MainConsole.Instance.Commands.AddCommand (
                 "abuse reports",
                 "abuse reports",
                 "Display a summary of current abuse reports", 
                 HandleAbuseReports, false, true);
         }
     }
 }
Exemple #18
0
 public void FinishedStartup()
 {
     abuseConnector = Framework.Utilities.DataManager.RequestPlugin <IAbuseReportsConnector> ();
     if (abuseConnector != null)
     {
         if (MainConsole.Instance != null)
         {
             MainConsole.Instance.Commands.AddCommand(
                 "abuse reports",
                 "abuse reports",
                 "Display a summary of current abuse reports",
                 HandleAbuseReports, false, true);
         }
     }
 }
        public void AddAbuseReport(AbuseReport abuse_report)
        {
            object remoteValue = DoRemote(abuse_report);

            if (remoteValue != null || m_doRemoteOnly)
            {
                return;
            }

            IAbuseReportsConnector conn = DataManager.RequestPlugin <IAbuseReportsConnector>();

            if (conn != null)
            {
                conn.AddAbuseReport(abuse_report);
            }
        }
        public void UpdateAbuseReport(AbuseReport report, string Password)
        {
            object remoteValue = DoRemote(report, Password);

            if (remoteValue != null || m_doRemoteOnly)
            {
                return;
            }

            IAbuseReportsConnector conn = DataManager.RequestPlugin <IAbuseReportsConnector>();

            if (conn != null)
            {
                conn.UpdateAbuseReport(report, Password);
            }
        }
        public List <AbuseReport> GetAbuseReports(int start, int count, bool active)
        {
            if (m_doRemoteOnly)
            {
                object remoteValue = DoRemote(start, count, active);
                return(remoteValue != null ? (List <AbuseReport>)remoteValue : null);
            }

            IAbuseReportsConnector conn = Framework.Utilities.DataManager.RequestPlugin <IAbuseReportsConnector> ();

            if (conn != null)
            {
                return(conn.GetAbuseReports(start, count, active));
            }

            return(null);
        }
        public List <AbuseReport> GetAbuseReports(int start, int count, bool active)
        {
            object remoteValue = DoRemote(start, count, active);

            if (remoteValue != null || m_doRemoteOnly)
            {
                return((List <AbuseReport>)remoteValue);
            }

            IAbuseReportsConnector conn = DataManager.RequestPlugin <IAbuseReportsConnector>();

            if (conn != null)
            {
                return(conn.GetAbuseReports(start, count, active));
            }
            else
            {
                return(null);
            }
        }
        public Dictionary <string, object> Fill(WebInterface webInterface, string filename, OSHttpRequest httpRequest,
                                                OSHttpResponse httpResponse, Dictionary <string, object> requestParameters,
                                                ITranslator translator, out string response)
        {
            response = null;
            var vars             = new Dictionary <string, object> ();
            var abuseReportsList = new List <Dictionary <string, object> > ();

            IAbuseReportsConnector abuseModule = Framework.Utilities.DataManager.RequestPlugin <IAbuseReportsConnector> ();

            string             noDetails = translator.GetTranslatedString("NoDetailsText");
            List <AbuseReport> abuseReports;

            abuseReports = abuseModule.GetAbuseReports(0, 0, true);

            if (abuseReports.Count > 0)
            {
                noDetails = "";

                foreach (var rpt in abuseReports)
                {
                    abuseReportsList.Add(new Dictionary <string, object> {
                        { "Category", rpt.Category },
                        { "ReporterName", rpt.ReporterName },
                        { "Abusername", rpt.AbuserName },
                        { "Summary", rpt.AbuseSummary },
                        { "AssignedTo", rpt.AssignedTo },
                        { "Active", rpt.Active ? "Yes" : "No" },
                        { "CardNumber", rpt.Number.ToString() }
                    });
                }
            }

            if (abuseReports == null)
            {
                abuseReportsList.Add(new Dictionary <string, object> {
                    { "Category", "" },
                    { "ReporterName", "" },
                    { "Abusername", "" },
                    { "Summary", "No abuse reports available" },
                    { "AssignedTo", "" },
                    { "Active", "" },
                    { "CardNumber", "" }
                });
            }

            // always required data
            vars.Add("AbuseReportsList", abuseReportsList);
            vars.Add("NoDetailsText", noDetails);
            vars.Add("AbuseReportText", translator.GetTranslatedString("MenuAbuse"));

            vars.Add("CategoryText", translator.GetTranslatedString("CategoryText"));
            vars.Add("AbuseReporterNameText", translator.GetTranslatedString("AbuseReporterNameText"));
            vars.Add("AbuserNameText", translator.GetTranslatedString("AbuserNameText"));
            vars.Add("SummaryText", translator.GetTranslatedString("SummaryText"));
            vars.Add("AssignedToText", translator.GetTranslatedString("AssignedToText"));
            vars.Add("ActiveText", translator.GetTranslatedString("ActiveText"));
            vars.Add("MoreInfoText", translator.GetTranslatedString("MoreInfoText"));

            return(vars);
        }
        /// <summary>
        ///     Cannot be reflected on purpose, so it can only be used locally.
        ///     Gets the abuse report associated with the number without authentication.
        /// </summary>
        /// <param name="Number"></param>
        /// <returns></returns>
        public AbuseReport GetAbuseReport(int Number)
        {
            IAbuseReportsConnector conn = Framework.Utilities.DataManager.RequestPlugin <IAbuseReportsConnector>();

            return((conn != null) ? conn.GetAbuseReport(Number) : null);
        }
        public Dictionary <string, object> Fill(WebInterface webInterface, string filename, OSHttpRequest httpRequest,
                                                OSHttpResponse httpResponse, Dictionary <string, object> requestParameters,
                                                ITranslator translator, out string response)
        {
            response = null;
            var vars = new Dictionary <string, object> ();

            IAbuseReportsConnector abuseModule       = Framework.Utilities.DataManager.RequestPlugin <IAbuseReportsConnector> ();
            IUserAccountService    accountService    = webInterface.Registry.RequestModuleInterface <IUserAccountService> ();
            IWebHttpTextureService webTextureService = webInterface.Registry.RequestModuleInterface <IWebHttpTextureService> ();

            string noDetails   = translator.GetTranslatedString("NoDetailsText");
            string infoMessage = "";

            AbuseReport rpt;
            var         snapshotURL = "../images/icons/no_screenshot.jpg";

            // the card number can come in a number of ways
            int cardID = httpRequest.Query.ContainsKey("cardid")
                ? int.Parse(httpRequest.Query ["cardid"].ToString())
                : int.Parse(requestParameters ["cardid"].ToString());


            rpt = abuseModule.GetAbuseReport(cardID);
            if (rpt == null)
            {
                vars.Add("NoDetailsText", noDetails);
                return(vars);
            }

            // we have the report
            noDetails = "";
            if (rpt.ScreenshotID != UUID.Zero)
            {
                snapshotURL = webTextureService.GetTextureURL(rpt.ScreenshotID);
            }

            // updating?
            if (requestParameters.ContainsKey("SubmitUpdates"))
            {
                {
                    string newNote = requestParameters ["AbuseNoteText"].ToString();
                    if (newNote != "")
                    {
                        rpt.Notes = newNote;
                    }

                    rpt.Checked    = (requestParameters ["Checked"].ToString().ToLower() == "yes");
                    rpt.Active     = (requestParameters ["Active"].ToString().ToLower() == "yes");
                    rpt.AssignedTo = requestParameters ["AssignedTo"].ToString();

                    abuseModule.UpdateAbuseReport(rpt);

                    infoMessage = translator.GetTranslatedString("ChangesSavedSuccessfully");
                }
            }

            // get admin users
            var adminUsers     = accountService.GetUserAccounts(null, Constants.USER_GOD_CUSTOMER_SERVICE, 0);
            var adminUsersList = new List <Dictionary <string, object> > ();

            if (adminUsers.Count > 0)
            {
                foreach (var user in adminUsers)
                {
                    if (!Utilities.IsSystemUser(user.PrincipalID))
                    {
                        adminUsersList.Add(new Dictionary <string, object> {
                            { "Value", user.Name }
                        });
                    }
                }
                adminUsersList.Add(new Dictionary <string, object> {
                    { "Value", "No One" }
                });
            }
            vars.Add("AdminUsersList", adminUsersList);

            // details
            vars.Add("CardNumber", rpt.Number);
            //vars.Add("Date"), Culture.LocaleDate (transaction.TransferDate.ToLocalTime(), "MMM dd, hh:mm:ss tt");
            vars.Add("Details", rpt.AbuseDetails);
            vars.Add("AbuseLocation", rpt.AbuseLocation);
            vars.Add("Summary", rpt.AbuseSummary);
            vars.Add("AbuserName", rpt.AbuserName);
            vars.Add("IsActive", rpt.Active);
            vars.Add("IsNotActive", !rpt.Active);

            vars.Add("AssignedTo", rpt.AssignedTo);
            vars.Add("Category", rpt.Category);

            vars.Add("IsChecked", rpt.Checked);
            vars.Add("IsNotChecked", !rpt.Checked);

            vars.Add("Notes", rpt.Notes);
            vars.Add("ObjectName", rpt.ObjectName);
            vars.Add("ObjectPosition", rpt.ObjectPosition);
            vars.Add("ObjectUUID", rpt.ObjectUUID);
            vars.Add("RegionName", rpt.RegionName);
            vars.Add("ReporterName", rpt.ReporterName);
            vars.Add("ScreenshotURL", snapshotURL);

            vars.Add("NoDetailsText", noDetails);
            vars.Add("InfoMessage", infoMessage);

            // labels
            vars.Add("AbuseReportText", translator.GetTranslatedString("AbuseReportText"));

            vars.Add("DateText", translator.GetTranslatedString("DateText"));
            vars.Add("CategoryText", translator.GetTranslatedString("CategoryText"));
            vars.Add("SummaryText", translator.GetTranslatedString("SummaryText"));
            vars.Add("AbuserNameText", translator.GetTranslatedString("AbuserNameText"));
            vars.Add("AbuseReporterNameText", translator.GetTranslatedString("AbuseReporterNameText"));
            vars.Add("RegionNameText", translator.GetTranslatedString("RegionNameText"));
            vars.Add("ObjectNameText", translator.GetTranslatedString("ObjectNameText"));
            vars.Add("LocationText", translator.GetTranslatedString("LocationText"));
            vars.Add("UUIDText", translator.GetTranslatedString("UUIDText"));
            vars.Add("DetailsText", translator.GetTranslatedString("DetailsText"));
            vars.Add("NotesText", translator.GetTranslatedString("NotesText"));
            vars.Add("AddNotesText", translator.GetTranslatedString("AddNotesText"));
            vars.Add("ActiveText", translator.GetTranslatedString("ActiveText"));
            vars.Add("CheckedText", translator.GetTranslatedString("CheckedText"));
            vars.Add("AssignedToText", translator.GetTranslatedString("AssignedToText"));
            vars.Add("Submit", translator.GetTranslatedString("SaveUpdates"));
            vars.Add("Yes", translator.GetTranslatedString("Yes"));
            vars.Add("No", translator.GetTranslatedString("No"));

            return(vars);
        }