Login() публичный Метод

public Login ( string Username, string Password, int LoginTimeOutMs ) : string
Username string
Password string
LoginTimeOutMs int
Результат string
Пример #1
0
        static void Main(string[] args)
        {
            //create a new telnet connection to hostname "gobelijn" on port "23"
            TelnetConnection tc = new TelnetConnection("gobelijn", 23);

            //login with user "root",password "rootpassword", using a timeout of 100ms, and show server output
            string s = tc.Login("root", "rootpassword",100);
            Console.Write(s);

            // server output should end with "$" or ">", otherwise the connection failed
            string prompt = s.TrimEnd();
            prompt = s.Substring(prompt.Length -1,1);
            if (prompt != "$" && prompt != ">" )
                throw new Exception("Connection failed");

            prompt = "";

            // while connected
            while (tc.IsConnected && prompt.Trim() != "exit" )
            {
                // display server output
                Console.Write(tc.Read());

                // send client input to server
                prompt = Console.ReadLine();
                tc.WriteLine(prompt);

                // display server output
                Console.Write(tc.Read());
            }
            Console.WriteLine("***DISCONNECTED");
            Console.ReadLine();
        }
Пример #2
0
        static void Main(string[] args)
        {
            //create a new telnet connection to host "192.168.2.111" on port "23"
            //连接telnet服务器, 23号端口就是telnet端口
            TelnetConnection tc = new TelnetConnection("192.168.2.111", 23);

            string s = tc.Login("root", "root", 100);

            Console.Write(s);

            string prompt = "";

            // while connected
            while (tc.IsConnected && prompt.Trim() != "exit")
            {
                // display server output
                Console.Write(tc.Read());

                // send client input to server
                prompt = Console.ReadLine();
                tc.WriteLine(prompt);

                // display server output
                Console.Write(tc.Read());
            }
            Console.WriteLine("***DISCONNECTED");
            Console.ReadLine();
        }
Пример #3
0
        public void Connect(ToolStripStatusLabel toolStatus, ToolStripProgressBar toolProgress)
        {
            TelnetConnection tc = new TelnetConnection(settings.Address, 23);
            string s = tc.Login(settings.Username, settings.Password, 100);
            Console.Write(s);

            tc.WriteLine("/etc/enigma2/AutoRecorder/reconf /etc/enigma2/AutoRecorder/SearchProfiles/Automaatti.prof >/etc/enigma2/AutoRecorder/SearchProfiles/AutomaattiOut.py");

            ftp ftpClient = new ftp(@"ftp://" + settings.Address, settings.Username, settings.Password);

            toolProgress.Value = 65;
            toolStatus.Text = "Downloading...";
            ftpClient.download("/etc/enigma2/AutoRecorder/SearchProfiles/AutomaattiOut.py", @".\AutomaattiOut.py");
        }
Пример #4
0
        static void Main(string[] args)
        {
            try
            {
                //Создает Telnet-соединение по IP:Port
                TelnetConnection tc = new TelnetConnection("46.172.182.72", 23);

                //Указываем логин, пароль и время ожидания
                string s = tc.Login(" ", " ", 100);

                // Строка ответа должна заканчиватсья на "$" или ">", иначе соединение неудачно
                string prompt = s.TrimEnd();
                prompt = s.Substring(prompt.Length - 1, 1);
                if (prompt != "$" && prompt != ">")
                {
                    throw new Exception("Connection failed");
                }

                Console.WriteLine("OMG! TelNet Connection is success! U can do everything! Hahahaha: ");

                prompt = "";

                // Цикл обработки
                while (tc.IsConnected && prompt.Trim() != "exit")
                {
                    // Вывод ответа сервера
                    Console.Write(tc.Read());

                    // Отправляем серверу команду
                    prompt = Console.ReadLine();
                    tc.WriteLine(prompt);

                    // Вывод ответа сервера
                    Console.Write(tc.Read());
                }

                Console.WriteLine("Disconnected");
                Console.ReadLine();
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception.ToString());
            }
            finally
            {
                Console.ReadKey();
            }
        }
        /// <summary> 
        /// Establish a Telnet connection with the router 
        /// </summary>
        public RouterCnx(string aIPAddress, string aLogin, string aPassword)
        {
            IPAdress = aIPAddress;
            Login = aLogin;
            Password = aPassword;

            TelnetCnx = new TelnetConnection(IPAdress, 23);

            string Response = TelnetCnx.Login(Login, Password, 300);
            string prompt = Response.TrimEnd();

            prompt = Response.Substring(prompt.Length - 1, 1);

            if (prompt != "$" && prompt != ">" && prompt != "#")
            {
                throw new Exception("Unable to connect to the requested IP");
            }
        }
Пример #6
0
        static void Main(string[] args)
        {
            //create a new telnet connection to hostname "gobelijn" on port "23"
            TelnetConnection tc = new TelnetConnection("192.168.7.2", 23);

            //login with user "root",password "rootpassword", using a timeout of 100ms, and show server output
            string s = tc.Login("debian", "temppwd", 100);

            //Thread.Sleep(5000);
            Console.Write(s);

            // server output should end with "$" or ">", otherwise the connection failed
            string prompt = s.TrimEnd();

            /* prompt = s.Substring(prompt.Length -1,1);
             * if (prompt != "$" && prompt != ">" )
             *   throw new Exception("Connection failed");
             *
             * prompt = "";*/

            // while connected
            string test;

            // display server output
            Console.Write(tc.Read());
            tc.WriteLine("pwd");
            Console.Write(tc.Read());
            tc.WriteLine("cd evl/");
            Console.Write(tc.Read());
            tc.WriteLine("./run_Evlsrv.sh stdin");
            Console.Write(tc.Read());
            tc.WriteLine("openc");
            Console.Write(tc.Read());
            tc.WriteLine("set i 17260 1");
            Console.Write(tc.Read());
            tc.WriteLine("closec");
            Console.Write(tc.Read());
            tc.WriteLine("test ../letuan1/Function_test/C128/C128B/C128_B.bmp");
            Console.Write(tc.Read());
            tc.WriteLine("loop 0");
            test = tc.Read();
            Console.Write(tc.Read());
        }
Пример #7
0
        static void Main(string[] args)
        {
            // var exploit = new WebExploiter("192.168.1.254", "8894501933");
              //  exploit.EnableBackdoor(true);

            var fixer=new ProblemFixer("192.168.1.254", 28, "8894501933");
            fixer.DisableDhcp();

            //fixer.FactoryReset();
            return;
            //create a new telnet connection to hostname "gobelijn" on port "23"
            TelnetConnection tc = new TelnetConnection("192.168.1.254", 23);

            //login with user "root",password "rootpassword", using a timeout of 100ms,
            //and show server output
            string s = tc.Login("admin", "0387371392", 1000);
            Console.Write(s);

            // server output should end with "$" or ">", otherwise the connection failed
            string prompt = s.TrimEnd();
            prompt = s.Substring(prompt.Length - 1, 1);
            if (prompt != "$" && prompt != ">")
                throw new Exception("Connection failed");

            prompt = "";

            // while connected
            while (tc.IsConnected)
            {
                // display server output
                Console.Write(tc.Read());

                // send client input to server
                prompt = Console.ReadLine();
                tc.WriteLine(prompt);

                // display server output
                Console.Write(tc.Read());
            }

            Console.WriteLine("***DISCONNECTED");
            Console.ReadLine();
        }
Пример #8
0
        public void UploadConfig(ToolStripStatusLabel toolStatus, ToolStripProgressBar toolProgress)
        {
            TelnetConnection tc = new TelnetConnection(settings.Address, 23);
            string s = tc.Login(settings.Username, settings.Password, 100);
            Console.Write(s);

            tc.WriteLine("mv /etc/enigma2/AutoRecorder/SearchProfiles/Automaatti.py /etc/enigma2/AutoRecorder/SearchProfiles/Automaatti-2.py");

            ftp ftpClient = new ftp(@"ftp://" + settings.Address, settings.Username, settings.Password);
            Thread.Sleep(1000);
            toolProgress.Value = 65;
            toolStatus.Text = "Uploading...";

            //ftpClient.upload(@".\AutomaattiIn.py", "/etc/enigma2/AutoRecorder/SearchProfiles/Automaatti.py");
            ftpClient.upload("/etc/enigma2/AutoRecorder/SearchProfiles/Automaatti.py", "AutomaattiIn.py");

            tc.WriteLine("cd /etc/enigma2/AutoRecorder/SearchProfiles");
            tc.WriteLine("chmod 777 Automaatti.py");
            tc.WriteLine("./Automaatti.py");

            toolProgress.Value = 0;
            toolStatus.Text = "Ready";
        }
Пример #9
0
        static void Main(string[] args)
        {
            //create a new telnet connection to hostname "gobelijn" on port "23"
            TelnetConnection tc = new TelnetConnection("gobelijn", 23);

            //login with user "root",password "rootpassword", using a timeout of 100ms, and show server output
            string s = tc.Login("root", "rootpassword", 100);

            Console.Write(s);

            // server output should end with "$" or ">", otherwise the connection failed
            string prompt = s.TrimEnd();

            prompt = s.Substring(prompt.Length - 1, 1);
            if (prompt != "$" && prompt != ">")
            {
                throw new Exception("Connection failed");
            }

            prompt = "";

            // while connected
            while (tc.IsConnected && prompt.Trim() != "exit")
            {
                // display server output
                Console.Write(tc.Read());

                // send client input to server
                prompt = Console.ReadLine();
                tc.WriteLine(prompt);

                // display server output
                Console.Write(tc.Read());
            }
            Console.WriteLine("***DISCONNECTED");
            Console.ReadLine();
        }
Пример #10
0
        public bool GetPCMStatus(int bsc, int pcm)
        {
            //string line;
            string bscMap;
            BscMap aMap=new BscMap();
            bool pcmUP = false;
            bool connected;

            System.IO.StreamReader ipMap=new StreamReader(@"D:\input\ip_map.csv");

            while ((bscMap = ipMap.ReadLine()) != null)
            {

                if (bscMap.Contains(bsc.ToString()))
                {
                    string[] map=bscMap.Split(',');
                    aMap.Name = map[1];
                    aMap.IPaddress = map[2];
                    aMap.BSCuser = map[3];
                    aMap.BSCpass = map[4];
                }
            }
            try
            {
                TelnetConnection aTelnetConnection = new TelnetConnection(aMap.IPaddress, 23);
                aTelnetConnection.Login(aMap.BSCuser, aMap.BSCpass, 100, out connected);
                string output = aTelnetConnection.ExecuteCommand("ZDTI:::PCM=" + pcm + ";");

                if (output.Contains("WO-EX"))
                {
                    pcmUP = true;

                    //break;
                }
            }
            catch
            {
                pcmUP = false;}
            //string[] outputArray = output.Split('\n');
            //foreach (string s in outputArray)
            //{
            //    if (s.Contains("NETW"))
            //    {
            //        s.Remove('"');
            //        s.Remove(' ');
            //      //  string[] aLAPD = s.Split();
            //        if (s.Contains("WO-EX"))
            //        {
            //            pcmUP = true;
            //            break;
            //        }
            //    }
            //}

            //System.IO.StreamReader file =
            //    new System.IO.StreamReader(output);
            //while ((line = file.ReadLine()) != null)
            //{
            //    if (line.Contains("NETW"))
            //    {
            //        string [] aLAPD=line.Split();
            //        if (aLAPD[6] == "WO")
            //        {
            //            pcmUP = true;
            //            break;
            //        }
            //    }
            //}
            return pcmUP;
        }
Пример #11
0
        public List<TRXInfo> GetAllPcmInStatus(List<TRXInfo> trxThisPCM,
            Dictionary<int, List<int>> pcmStatusDictionary)
        {
            BscMap aMap = new BscMap();
            string bscMap;
            bool connected;

            List<PCMInfo> apcmList = new List<PCMInfo>();

            foreach (KeyValuePair<int, List<int>> pcmInfo in pcmStatusDictionary)
            {

                System.IO.StreamReader ipMap = new StreamReader(@"D:\input\ip_map.csv");
                while ((bscMap = ipMap.ReadLine()) != null)
                {

                    if (bscMap.Contains(pcmInfo.Key.ToString()))
                    {
                        string[] map = bscMap.Split(',');
                        aMap.Name = map[1];
                        aMap.IPaddress = map[2];
                        aMap.BSCuser = map[3];
                        aMap.BSCpass = map[4];

                        ipMap.Close();
                        break;

                    }

                }
                TelnetConnection aTelnetConnection = new TelnetConnection(aMap.IPaddress, 23);
                aTelnetConnection.Login(aMap.BSCuser, aMap.BSCpass, 100, out connected);
                foreach (int eachPCM in pcmInfo.Value)
                {
                    string output = aTelnetConnection.ExecuteCommand("ZDTI:::PCM=" + eachPCM + ";");

                    if (output.Contains("WO-EX"))
                    {
                        //pcmUP = true;
                        PCMInfo aPcmInfo = new PCMInfo();
                        aPcmInfo.BSC = pcmInfo.Key;
                        aPcmInfo.PCMno = eachPCM;
                        aPcmInfo.PCmStatus = true;
                        apcmList.Add(aPcmInfo);

                        //break;
                    }
                    else
                    {
                        PCMInfo aPcmInfo = new PCMInfo();
                        aPcmInfo.BSC = pcmInfo.Key;
                        aPcmInfo.PCMno = eachPCM;
                        aPcmInfo.PCmStatus = false;
                        apcmList.Add(aPcmInfo);

                    }
                }
                aTelnetConnection.ExecuteCommand("Z;");

            }

             foreach (TRXInfo aTrxInfo in trxThisPCM)
                {
                    aTrxInfo.PCmStatus =
                        apcmList.Where(d => d.BSC == aTrxInfo.BSC && d.PCMno == aTrxInfo.PCM).First().PCmStatus;

                }

            return trxThisPCM;
        }
Пример #12
0
        public List<BCSU> GetLogicalBCSU(List<string> bscList )
        {
            System.IO.StreamReader ipMap = new StreamReader(@"D:\input\ip_map.csv");
            BscMap aMap = new BscMap();
            string bscMap;
            bool connected;
            foreach (string bsc in bscList)
            {

                while ((bscMap = ipMap.ReadLine()) != null)
                {

                    if (bscMap.Contains(bsc))
                    {
                        string[] map = bscMap.Split(',');
                        aMap.Name = map[1];
                        aMap.IPaddress = map[2];
                        aMap.BSCuser = map[3];
                        aMap.BSCpass = map[4];
                    }
                }
                try
                {
                    TelnetConnection aTelnetConnection = new TelnetConnection(aMap.IPaddress, 23);
                    aTelnetConnection.Login(aMap.BSCuser, aMap.BSCpass, 100, out connected);
                    aTelnetConnection.ExecuteCommand("ZDDS;");
                    string logBCSU = aTelnetConnection.ExecuteCommand("ZLE:U,RCBUGGGX");
                    logBCSU += aTelnetConnection.ExecuteCommand("U");
                    logBCSU += aTelnetConnection.ExecuteCommand("ZUSI:BCSU");
                    logBCSU += aTelnetConnection.ExecuteCommand("Z");
                    logBCSU += aTelnetConnection.ExecuteCommand("Z");
                    logBCSU += aTelnetConnection.ExecuteCommand("ZE");
                }
                catch
                {
                    connected = false;
                }
            }

            return null;
        }
Пример #13
0
 void NshLogin(TelnetConnection telnet)
 {
     Logger.Log("Logging in as admin..");
     string output=telnet.Login("admin", Password, 2000);
     if (output.Contains("Login incorrect"))
     {
         Logger.Log("Got incorrect login message! Ensure that you typed the correct access code!");
         throw new ApplicationException("Can not reach nsh shell");
     }
     output = telnet.Read();
     telnet.WriteLine(""); //because apparently it doesn't always print the prompt otherwise
     output = telnet.Read(3000);
     Assert(output.Contains("Axis"), "nsh shell does not appear to be working... or something");
 }
Пример #14
0
        public void BcsuShift(List<InputData> aInputList)
        {
            BscMap aMap = new BscMap();
            string bscMap;
            bool connected;
            string createLAPD = "";
            string createTRX = "";
            string deleteTRX = "";
            string queryPart = "";
            List<string> bscList=new List<string>();
            List<BscMap> aMapList=new List<BscMap>();
            List<BCSU> bcsuList = new List<BCSU>();
            for (int i = 0; i < aInputList.Count - 1; i++)
            {
                queryPart += "(trx.BSC=" + aInputList[i].BSC + " and trx.BCF=" + aInputList[i].BCF + " and trx.TRX=" + aInputList[i].TRX + " and lapd.name='" + aInputList[i].LAPD + "') or";
                if (!bscList.Contains(aInputList[i].BSC))
                {
                    bscList.Add(aInputList[i].BSC);
                }
            }

            System.IO.StreamReader ipMap = new StreamReader(@"D:\input\ip_map.csv");
            while ((bscMap = ipMap.ReadLine()) != null)
            {
                BscMap aBscMap = new BscMap();

                string[] map = bscMap.Split(',');
                aBscMap.BSC = map[0];
                aBscMap.Name = map[1];
                aBscMap.IPaddress = map[2];
                aBscMap.BSCuser = map[3];
                aBscMap.BSCpass = map[4];

                aMapList.Add(aBscMap);

            }

            foreach (string aBsc in bscList)
            {

                BscMap aBscMap=aMapList.Where(d => d.BSC == aBsc).First();

                TelnetConnection aTelnetConnection = new TelnetConnection(aBscMap.IPaddress, 23);
                aTelnetConnection.Login(aBscMap.BSCuser, aBscMap.BSCpass, 100, out connected);

                aTelnetConnection.ExecuteCommand("ZDDS;");
                string logBCSU = aTelnetConnection.ExecuteCommand("ZLE:U,RCBUGGGX");
                logBCSU += aTelnetConnection.ExecuteCommand("U");
                logBCSU = aTelnetConnection.ExecuteCommand("ZUSI:BCSU");
                aTelnetConnection.ExecuteCommand("Z");
                aTelnetConnection.ExecuteCommand("Z");
                aTelnetConnection.ExecuteCommand("ZE");
                // System.Security

                logBCSU = Regex.Unescape(logBCSU);
                logBCSU = logBCSU.Replace("     ", " ");

                string[] aStrings = logBCSU.Split('\n');

                foreach (string line in aStrings)
                {
                    if (line.Contains("BCSU-"))
                    {
                        string[] a1 = line.Split(' ');
                        BCSU aBcsu = new BCSU();
                        aBcsu.BSC = aBsc;
                        string[] bcsuSplit=a1[0].Split('-');
                        aBcsu.BCSUiD = bcsuSplit[1];
                        int decAgain = int.Parse(a1[2], System.Globalization.NumberStyles.HexNumber);
                        aBcsu.BCSUlogical = decAgain.ToString();
                        bcsuList.Add(aBcsu);
                    }
                }

            }

            queryPart += "(trx.BSC=" + aInputList[aInputList.Count - 1].BSC + " and trx.BCF=" + aInputList[aInputList.Count - 1].BCF + " and trx.TRX=" + aInputList[aInputList.Count - 1].TRX + " and lapd.name='" + aInputList[aInputList.Count - 1].LAPD + "')";
            List<BCSU> aBCSUList = new List<BCSU>();
            List<TrxLAPD> trxLapds = fetchDB.GetLAPDBitrate(queryPart, out aBCSUList);
            foreach (InputData data in aInputList)
            {

                try
                {
                    //string targetBCSU = aBCSUList.Where(d => d.BSC == data.BSC && d.BCSUiD == data.BCSU).First().BCSUlogical;

                    //trxLapds.Where(d => d.BSC == data.BSC && d.BCF == data.BCF && d.TRX == data.TRX)
                    //    .First()
                    //    .TargetLAPDlogicalBCSUAddress = targetBCSU;

                    string LogicalBCSU =
                        bcsuList.Where(d => d.BSC == data.BSC && d.BCSUiD == data.BCSU).First().BCSUlogical;

                    trxLapds.Where(d => d.BSC == data.BSC && d.BCF == data.BCF && d.TRX == data.TRX)
                        .First()
                        .TargetLAPDlogicalBCSUAddress = LogicalBCSU;
                }
                catch
                {
                    trxLapds.RemoveAll(d => d.BSC == data.BSC && d.BCF == data.BCF && d.TRX == data.TRX);
                }

                //trxLapds.Where(d => d.BSC == data.BSC && d.BCF == data.BCF && d.TRX == data.TRX)
                //    .First()
                //    .TargetLAPDlogicalBCSUAddress = "16734";

            }

            foreach (TrxLAPD trxLapd in trxLapds)
            {

               deleteTRX+= "<managedObject class=\"LAPD\" version=\"S15\" distName=\""+trxLapd.LAPDplmn+"\" operation=\"delete\"> </managedObject>\n";
            deleteTRX+="<managedObject class=\"TRX\" version=\"S15\" distName=\""+trxLapd.TRXPlmn+"\" operation=\"delete\"> </managedObject>\n";

                createLAPD = "<managedObject class=\"LAPD\" version=\"S15.3\" distName=\"" + trxLapd.LAPDplmn + "\" operation=\"create\">\n";

                createLAPD += "<p name=\"bitRate\">" + trxLapd.LAPDbitRate + "</p>\n";
                createLAPD += "<p name=\"abisSigChannelTimeSlotPcm\">" + trxLapd.LAPDabisSigChannelTimeSlotPcm + "</p>\n";
                createLAPD += "<p name=\"abisSigChannelTimeSlotTsl\">" + trxLapd.LAPDabisSigChannelTimeSlotTsl + "</p>\n";
                createLAPD += "<p name=\"abisSigChannelSubSlot\">" + trxLapd.LAPDabisSigChannelSubSlot + "</p>\n";
                createLAPD += "<p name=\"adminState\">" + trxLapd.LAPDadminState + "</p>\n";
                createLAPD += "<p name=\"parentBSCId\">" + trxLapd.LAPDBSCId + "</p>\n";
                createLAPD += "<p name=\"dChannelType\">" + trxLapd.LAPDdChannelType + "</p>\n";
                createLAPD += "<p name=\"name\">" + trxLapd.LAPDname + "</p>\n";
                createLAPD += "<p name=\"parameterSetNumber\">" + trxLapd.LAPDparameterSetNumber + "</p>\n";
                createLAPD += "<p name=\"sapi\">" + trxLapd.LAPDsapi + "</p>\n";
                createLAPD += "<p name=\"tei\">" + trxLapd.LAPDtei + "</p>\n";
                createLAPD += "<p name=\"logicalBCSUAddress\">" + trxLapd.TargetLAPDlogicalBCSUAddress + "</p>\n";
               // createLAPD += "<p name=\"bcsuID\">" + trxLapd.TargetLAPDlogicalBCSUAddress + "</p>\n";
                createLAPD += "</managedObject>\n";

                createTRX+=createLAPD+"<managedObject class=\"TRX\" version=\"S15.3\" distName=\""+trxLapd.TRXPlmn+"\" operation=\"create\">\n";

               // createTRX += "<p name=\"trxPlmn\">" + trxLapd.TRXPlmn +"</p>\n";
                createTRX += "<p name=\"name\">" + trxLapd.TRXname +"</p>\n";
                createTRX += "<p name=\"adminState\">" + trxLapd.TRXadminState +"</p>\n";
                createTRX += "<p name=\"channel0AdminState\">" + trxLapd.TRXchannel0AdminState +"</p>\n";
                createTRX += "<p name=\"channel0Pcm\">" + trxLapd.TRXchannel0Pcm +"</p>\n";
                createTRX += "<p name=\"channel0Subslot\">" + trxLapd.TRXchannel0Subslot +"</p>\n";
                createTRX += "<p name=\"channel0Tsl\">" + trxLapd.TRXchannel0Tsl +"</p>\n";
                createTRX += "<p name=\"channel0Type\">" + trxLapd.TRXchannel0Type +"</p>\n";
                createTRX += "<p name=\"channel1AdminState\">" + trxLapd.TRXchannel1AdminState +"</p>\n";
                createTRX += "<p name=\"channel1Pcm\">" + trxLapd.TRXchannel1Pcm +"</p>\n";
                createTRX += "<p name=\"channel1Subslot\">" + trxLapd.TRXchannel1Subslot +"</p>\n";
                createTRX += "<p name=\"channel1Tsl\">" + trxLapd.TRXchannel1Tsl +"</p>\n";
                createTRX += "<p name=\"channel1Type\">" + trxLapd.TRXchannel1Type +"</p>\n";
                createTRX += "<p name=\"channel2AdminState\">" + trxLapd.TRXchannel2AdminState +"</p>\n";
                createTRX += "<p name=\"channel2Pcm\">" + trxLapd.TRXchannel2Pcm +"</p>\n";
                createTRX += "<p name=\"channel2Subslot\">" + trxLapd.TRXchannel2Subslot +"</p>\n";
                createTRX += "<p name=\"channel2Tsl\">" + trxLapd.TRXchannel2Tsl +"</p>\n";
                createTRX += "<p name=\"channel2Type\">" + trxLapd.TRXchannel2Type +"</p>\n";
                createTRX += "<p name=\"channel3AdminState\">" + trxLapd.TRXchannel3AdminState +"</p>\n";
                createTRX += "<p name=\"channel3Pcm\">" + trxLapd.TRXchannel3Pcm +"</p>\n";
                createTRX += "<p name=\"channel3Subslot\">" + trxLapd.TRXchannel3Subslot +"</p>\n";
                createTRX += "<p name=\"channel3Tsl\">" + trxLapd.TRXchannel3Tsl +"</p>\n";
                createTRX += "<p name=\"channel3Type\">" + trxLapd.TRXchannel3Type +"</p>\n";
                createTRX += "<p name=\"channel4AdminState\">" + trxLapd.TRXchannel4AdminState +"</p>\n";
                createTRX += "<p name=\"channel4Pcm\">" + trxLapd.TRXchannel4Pcm +"</p>\n";
                createTRX += "<p name=\"channel4Subslot\">" + trxLapd.TRXchannel4Subslot +"</p>\n";
                createTRX += "<p name=\"channel4Tsl\">" + trxLapd.TRXchannel4Tsl +"</p>\n";
                createTRX += "<p name=\"channel4Type\">" + trxLapd.TRXchannel4Type +"</p>\n";
                createTRX += "<p name=\"channel5AdminState\">" + trxLapd.TRXchannel5AdminState +"</p>\n";
                createTRX += "<p name=\"channel5Pcm\">" + trxLapd.TRXchannel5Pcm +"</p>\n";
                createTRX += "<p name=\"channel5Subslot\">" + trxLapd.TRXchannel5Subslot +"</p>\n";
                createTRX += "<p name=\"channel5Tsl\">" + trxLapd.TRXchannel5Tsl +"</p>\n";
                createTRX += "<p name=\"channel5Type\">" + trxLapd.TRXchannel5Type +"</p>\n";
                createTRX += "<p name=\"channel6AdminState\">" + trxLapd.TRXchannel6AdminState +"</p>\n";
                createTRX += "<p name=\"channel6Pcm\">" + trxLapd.TRXchannel6Pcm +"</p>\n";
                createTRX += "<p name=\"channel6Subslot\">" + trxLapd.TRXchannel6Subslot +"</p>\n";
                createTRX += "<p name=\"channel6Tsl\">" + trxLapd.TRXchannel6Tsl +"</p>\n";
                createTRX += "<p name=\"channel6Type\">" + trxLapd.TRXchannel6Type +"</p>\n";
                createTRX += "<p name=\"channel7AdminState\">" + trxLapd.TRXchannel7AdminState +"</p>\n";
                createTRX += "<p name=\"channel7Pcm\">" + trxLapd.TRXchannel7Pcm +"</p>\n";
                createTRX += "<p name=\"channel7Subslot\">" + trxLapd.TRXchannel7Subslot +"</p>\n";
                createTRX += "<p name=\"channel7Tsl\">" + trxLapd.TRXchannel7Tsl +"</p>\n";
                createTRX += "<p name=\"channel7Type\">" + trxLapd.TRXchannel7Type +"</p>\n";
                createTRX += "<p name=\"daPool_ID\">" + trxLapd.TRXdaPool_ID +"</p>\n";
                createTRX += "<p name=\"gprsEnabledTrx\">" + trxLapd.TRXgprsEnabledTrx +"</p>\n";
                createTRX += "<p name=\"halfRateSupport\">" + trxLapd.TRXhalfRateSupport +"</p>\n";
                createTRX += "<p name=\"initialFrequency\">" + trxLapd.TRXinitialFrequency +"</p>\n";
                createTRX += "<p name=\"lapdLinkName\">" + trxLapd.TRXlapdLinkName +"</p>\n";
                createTRX += "<p name=\"subslotsForSignalling\">" + trxLapd.TRXsubslotsForSignalling +"</p>\n";
                createTRX += "<p name=\"tsc\">" + trxLapd.TRXtsc +"</p>\n";
                createTRX += "<p name=\"preferredBcchMark\">" + trxLapd.PreferedBcchTRX +"</p>\n";

                createTRX += "</managedObject>\n";

            }

            string xmlFileCreate="<?xml version=\"1.0\"?>\n <!DOCTYPE raml SYSTEM 'raml20.dtd'>\n <raml version=\"2.0\" xmlns=\"raml20.xsd\">\n<cmData type=\"plan\">\n<header>\n<log dateTime=\"\" action=\"created\" user=\"blOMC\" appInfo=\"blNokiaTool\"/>\n</header>";
            xmlFileCreate += createTRX;
            xmlFileCreate += "</cmData>\n</raml>";

            using (StreamWriter aWriter = new StreamWriter("createTRX.xml"))
            {
                aWriter.Write(xmlFileCreate);
                aWriter.Close();
            }

            string xmlFileDelete = "<?xml version=\"1.0\"?>\n <!DOCTYPE raml SYSTEM 'raml20.dtd'>\n <raml version=\"2.0\" xmlns=\"raml20.xsd\">\n<cmData type=\"plan\">\n<header>\n<log dateTime=\"\" action=\"created\" user=\"blOMC\" appInfo=\"blNokiaTool\"/>\n</header>";
            xmlFileDelete += deleteTRX;
            xmlFileDelete += "</cmData>\n</raml>";
            using (StreamWriter aWriter = new StreamWriter("deleteTRX.xml"))
            {

                aWriter.Write(xmlFileDelete);
                aWriter.Close();
            }
        }