mIRCForumlari - mIRC ve IRC Kullanıcılarının Paylaşım Platformu
  https://www.mircforumlari.net/iletisim/


SohbetG.Com

Kullanıcı Etiket Listesi

Yeni Konu aç Cevapla
 
Seçenekler
Alt 12 Aralık 2022, 03:24   #1
Çevrimdışı
Üyelik tarihi: 07 Aralık 2022
Konular: 21245
Mesajlar: 24.248
Nerden: İstanbul
Cinsiyet: Erkek
Web Site: TRmIRC.Net
IRC Sunucu: IRC.TRmIRC.Net
Alınan Beğeni: 3770
Beğendikleri: 6794
@RahmetLi
Ruh Hali : : Olu Gibi
Standart mIRC - Skype bağlantısı (Python/Sockets)

Çalışması için gerekenler: Herhangi bir python sürümü. https://www.python.org/

Kullanım:

/pycalistir yaparak python scriptini çalıştırıyoruz.
/baglan KullanıcıAdı Şifre yaparak Skypede oturum açıyoruz.
/kisiler yaparak Skype kişi listesini alıyoruz.
/mesaj ID Mesajınız yaparak belirtilen id'ye mesaj atıyoruz.
/kapat yaparak loop'u durdurup bağlantıyı koparıyoruz.



Kod : Kodu kopyalamak için üzerine çift tıklayın!

;###################### ;mIRC/Python Skype Bağlantısı by SuLh ;Python/Skype bağlantısını başlatmak için -> /pycalistir ;Bağlanmak için -> /baglan KullanıcıAdı Şifre ;Kişi listesini görmek için -> /kisiler ;Kişi listesindeki bir kişi mesaj atmak için -> /mesaj ID Mesajınız ;Mesaj yalnızca id üzerinden çalışır kullanıcı adına atmayınız. ;###################### alias baglan { pybaglan baglanti $1 $2 } alias kisiler { pybaglan kisiler } alias mesaj { pybaglan Mesaj: $1- } alias kapat { pybaglan Kapat } alias pyip return 127.0.0.1 alias pyport return 2000 alias c return $chr(9) alias pybaglan { sockudp -k skype $pyip $pyport $1- } alias pycalistir { echo 2 -a Python Bağlantısı Başlatıldı! write -c sky.py write sky.py try: from skpy import Skype write sky.py except ImportError: write sky.py $c $+ from pip._internal import main as pip write sky.py $c $+ pip(['install', '--user', 'skpy']) write sky.py $c $+ from skpy import Skype write sky.py import socket write sky.py a = $+(",$pyip,") write sky.py b = $pyport write sky.py s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) write sky.py s.bind((a,b)) write sky.py def skyfonksiyon(mesaj, adres): write sky.py $c $+ k = mesaj.split(" ") write sky.py $c $+ if k[0] == "baglanti": write sky.py $c $c $+ try: write sky.py $c $c $c $+ usern = str(k[1]) write sky.py $c $c $c $+ passw = str(k[2]) write sky.py $c $c $c $+ global sk write sky.py $c $c $c $+ sk = Skype(usern, passw) write sky.py $c $c $c $+ geri = "Basarili baglanti" write sky.py $c $c $c $+ geri = str.encode(geri) write sky.py $c $c $c $+ s.sendto(geri, adres) write sky.py $c $c $+ except: write sky.py $c $c $c $+ geri = "Basarisiz baglanti" write sky.py $c $c $c $+ geri = str.encode(geri) write sky.py $c $c $c $+ s.sendto(geri, adres) write sky.py $c $+ if k[0] == "kisiler": write sky.py $c $c $+ try: write sky.py $c $c $c $+ kisi = sk.contacts write sky.py $c $c $c $+ for i in kisi: write sky.py $c $c $c $c $+ idsi = str(i.id) write sky.py $c $c $c $c $+ ismi = str(i.name) write sky.py $c $c $c $c $+ geri = "ID: " + idsi + " Isim: " + ismi write sky.py $c $c $c $c $+ geri = str.encode(geri) write sky.py $c $c $c $c $+ s.sendto(geri, adres) write sky.py $c $c $+ except: write sky.py $c $c $c $+ y = "Basarisiz kisi" write sky.py $c $c $c $+ y = str.encode(y) write sky.py $c $c $c $+ s.sendto(y, adres) write sky.py $c $+ if k[0] == "Mesaj:": write sky.py $c $c $+ try: write sky.py $c $c $c $+ kisi = sk.contacts[k[1]].chat write sky.py $c $c $c $+ mesaj = " ".join(k[2:]) write sky.py $c $c $c $+ kisi.sendMsg(mesaj) write sky.py $c $c $c $+ y = "Mesaj gonderildi." write sky.py $c $c $c $+ y = str.encode(y) write sky.py $c $c $c $+ s.sendto(y, adres) write sky.py $c $c $+ except: write sky.py $c $c $c $+ y = "Mesaj hatasi" write sky.py $c $c $c $+ y = str.encode(y) write sky.py $c $c $c $+ s.sendto(y, adres) write sky.py while True: write sky.py $c $+ data = s.recvfrom(1024) write sky.py $c $+ mesaj = data[0] write sky.py $c $+ adres = data[1] write sky.py $c $+ mesaj = mesaj.decode("utf-8") write sky.py $c $+ if mesaj == "Kapat": write sky.py $c $c $+ a = str.encode("Kapatildi") write sky.py $c $c $+ s.sendto(a, adres) write sky.py $c $c $+ break write sky.py $c $+ skyfonksiyon(mesaj, adres) run -h python sky.py } alias pykontrol { if ($sock(skype)) return 1 else return 0 } on *:udpread:skype: { var %s | sockread -f %s tokenize 32 %s if $1- = Basarili baglanti { echo 2 -a Skype bağlantısı kuruldu! } elseif $1- = Basarisiz baglanti { echo 4 -a Skype bağlantısında hata var! } elseif $1 = ID: { echo 10 -a Gelen ID: $2 Kullanıcı Adı: $4 } elseif $1 = Mesaj { if $2 = hatasi { echo 4 -a Mesaj gönderilemedi! } else { echo 2 -a Mesaj başarıyla iletildi! } } elseif $1 = Kapatildi { echo 2 -a Python bağlantısı koparıldı! } }



  Alıntı ile Cevapla

Cevapla
Etiketler
(python/sockets), 200, adres, bağlanmak, bağlantısı, başlatıldı, bir, çalış, den, durdurup, gelen, gerekenler, geri, global, görmek, herhangi, isim, ismi, join, kapat, kişi, ler, listesi, listesindeki, mesaj, mesajı, mırc, org, skype, sürümü, url, user, yal, üzerinde, üzerinden


Konuyu Toplam 1 Üye okuyor. (0 Kayıtlı üye ve 1 Misafir)