• 23-04-2018, 17:17:35
    #1
    Üyeliği durduruldu
    merhabalar. Python perl c veya benzeri herhangi bir dilde bir programa ihtiyacım var. Aslında basit bir sistem

    127.0.0.1
    127.1.1.2
    127.2.2.3


    şeklinde bir ip listesi txt içinde varken ben programa örneğin 80 değerini girince program bütün iplerin sonuna :80 yazmasını istiyorum. veya 21 girilirse :21 şeklinde bütün satırdaki ip listelerinin sonuna eklenmesi gerekli. daha sonra eklediği bu ipleri 2. bir yeni txt kayıt etmeli örnek txt kayıt çıktısı:

    80 girdisi girilirse:


    127.0.0.1:80
    127.1.1.2:80
    127.2.2.3:80



    şeklinde umarım kendimi ifade edebilmişimdir .


    Saygılarımla
  • 23-04-2018, 17:36:41
    #2
    Kimlik doğrulama veya yönetimden onay bekliyor.
    Pm attım hocam
  • 23-04-2018, 17:41:04
    #3
    hocam selamlar eğer c diline az çok hakimseniz beraber yapa biliriz. bende bir bilgi tazelemiş olurum.
  • 23-04-2018, 17:41:43
    #4
    Üyeliği durduruldu
    Merhabalar PM ile whatsapp gönderebilirseniz iletişime geçebilirim
  • 23-04-2018, 17:49:21
    #5
    Üyeliği durduruldu
    burdan indirebilirsiniz exe halini : https://yadi.sk/d/KT8bBqLZ3S8BgA
    https://www.virustotal.com/#/file/ca...9505/detection

    yukardan aşağı doğru kullanım : kelime listesini ekle sonuna eklenecek kelimeyi kutuya yaz sonra kaydet butonuna bas http://prntscr.com/j91bic
    Liste Veriler Klasöründe Kayit.txt olarak kayıt eder
    C# Açık Kaynak Kodları
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using System.IO;
    
    
    namespace kelimeEkle
    {
        public partial class Form1 : Form
        {
            public string ExeDosyaYolu = Application.StartupPath.ToString();
            public Form1()
            {
                InitializeComponent();
            }
    
    
            private void button1_Click(object sender, EventArgs e)
            {
                ListBoxToTxt();
            }
    
    
            private void TxtToListBox()
            {
                OpenFileDialog file = new OpenFileDialog();
                file.InitialDirectory = ExeDosyaYolu + "\ListeVeriler\";
                file.Filter = "Txt Dosyası |*.txt";
                file.FilterIndex = 1;
                file.ShowDialog();
                string txtyolu = file.FileName;
                string rLine;
                try
                {
                    StreamReader okuyucu;
                    okuyucu = File.OpenText(txtyolu);
                    while ((rLine = okuyucu.ReadLine()) != null)
                    {
                        listBox1.Items.Add(rLine.ToString());
    
    
                    }
    
    
                    okuyucu.Close();
    
    
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Hata :" + ex.ToString(), "Error");
                }
               
    
    
            }
    
    
            private void ListBoxToTxt()
            {
                StreamWriter SW = File.AppendText(ExeDosyaYolu + "\ListeVeriler\Kayit.txt");
                for (int i = 0; i < listBox1.Items.Count; i++)
                {
                    SW.WriteLine(listBox1.Items[i].ToString() + textBox1.Text.ToString());
                }
                SW.Close();
            }
    
    
            private void button2_Click(object sender, EventArgs e)
            {
                TxtToListBox();
            }
        }
    }
  • 23-04-2018, 17:54:02
    #6
    Üyeliği durduruldu
    sağol varol hocam @XeroForex hemen deniyorum
  • 23-04-2018, 19:05:11
    #7
    KAYNAK KODLARI:
    using System;
    using System.Windows.Forms;
    using System.IO;
    
    
    namespace WindowsFormsApplication1
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
            string dosya;
            private void button1_Click(object sender, EventArgs e)
            {
                if (openFileDialog1.ShowDialog() == DialogResult.OK)
                {
                    dosya = openFileDialog1.FileName;
                }
            }
    
    
            private void Form1_Load(object sender, EventArgs e)
            {
                openFileDialog1.Filter = "Metin Belgeleri | *.txt";
                openFileDialog1.Title = "Dosya Seç";
                openFileDialog1.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
            }
            private void button2_Click(object sender, EventArgs e)
            {
                if (!string.IsNullOrWhiteSpace(textBox1.Text) && !string.IsNullOrWhiteSpace(dosya))
                {
                    string[] satirlar = File.ReadAllLines(dosya);
                    for (int i = 0; i < satirlar.Length; i++)
                    {
                        satirlar[i] += ":" + textBox1.Text;
                    }
                    File.WriteAllLines(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\yeniDosya.txt", satirlar);
                    MessageBox.Show("Yeni Metin Belgesi Oluşturuldu.nKayıt Yeri:t" + Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\yeniDosya.txt", "İşlem Başarılı", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                }
                else
                {
                    MessageBox.Show("Dosya Seçilmedi veya Port Yazılmadı !", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
    }
    Yapmanız Gereken Visual Studio'da yeni bir Form açıp bi textbox, 2 buton, 1 openfiledialog eklemeniz ve yukarıdaki kaynak kodu ilgili yönlendiricilere eklemeniz.
    Visual Studio'ya erişiminiz yoksa uygulamayı https://drive.google.com/open?id=1xQ...cR2A-ObU6VTPnf buradan indirebilirsiniz.
  • 23-04-2018, 19:38:30
    #8
    Üyeliği durduruldu
    1. Sublime text 3 editörünü indirin.
    2. Not defterini bu editör ile açın.
    3. CTRL + A ile tüm satırları seçin.
    4. CTRL + SHIFT + L tuşu ile tüm satırlar seçili halde satır sonuna imleç bırakın.
    5. -> (sağ ok) tuşuna basarak satırları seçimden çıkarıp satır sonuna gelin.
    6. Eklemek istediğiniz metni (:80) yazın.
    7. ESC ile çoklu imleç modundan çıkın.
    8. CTRL + S ile kaydedin.

    Kolay gelsin.
  • 23-04-2018, 23:21:29
    #9
    #Python 3.x kodu. İlk IP'ler ip.txt, değişmiş IP'ler out.txt içinde
    
    
    sayi = 80 
    
    
    open('out.txt', 'w').write((':' + str(sayi) + 'n').join(open('ip.txt', 'r').read().split()) + ':' + str(sayi))