<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged kaynak</title>
<link>https://coderlegion.com/tag/kaynak</link>
<description>Powered by Question2Answer</description>
<item>
<title>A Miner That Won't Melt Your Phone, from Kozmonot20</title>
<link>https://coderlegion.com/32432/a-miner-that-wont-melt-your-phone-from-kozmonot20</link>
<description>&lt;p&gt;Alright, here’s some code from Kozmonot20 that allows for mining without destroying anything:&lt;br&gt;
import socket&lt;br&gt;
import hashlib&lt;br&gt;
import urllib.request&lt;br&gt;
import json&lt;br&gt;
import time&lt;br&gt;
import threading # Çekirdek kontrolü için eklendi&lt;/p&gt;
&lt;h2 id=&quot;----kullanici-ayarlari----&quot;&gt;--- KULLANICI AYARLARI ---&lt;/h2&gt;
&lt;p&gt;USERNAME = &quot;KENDI_DUCO_KULLANICI_ADIN&quot; &lt;br&gt;
MINER_NAME = &quot;StealthPhone_V2&quot;          &lt;/p&gt;
&lt;p&gt;def get_mining_pool():&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;try:
    response = urllib.request.urlopen(&quot;https://duinocoin.com&quot;).read().decode()
    pool_data = json.loads(response)
    return pool_data[&quot;ip&quot;], pool_data[&quot;port&quot;]
except:
    time.sleep(5)
    return get_mining_pool()
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;def thread_miner_logic(thread_id):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&quot;&quot;&quot;Her bir çekirdeğin arkada bağımsız ve güvenli çalışmasını sağlayan fonksiyon.&quot;&quot;&quot;
print(f&quot;🕵️♂️ Hayalet Çekirdek-{thread_id} arka planda devreye girdi...&quot;)

while True:
    try:
        ip, port = get_mining_pool()
        soc = socket.socket()
        soc.connect((ip, int(port)))
        soc.recv(100) 
        
        while True:
            soc.send(f&quot;JOB,{USERNAME},LOW,KozmoSecretKey&quot;.encode())
            job_data = soc.recv(1024).decode().rstrip(&quot;\n&quot;).split(&quot;,&quot;)
            
            if len(job_data) &amp;lt; 3:
                break
                
            previous_hash = job_data
            expected_hash = job_data
            difficulty = int(job_data)
            
            start_time = time.time()
            
            # --- AKILLI FREN SİSTEMİ ---
            for nonce in range(100 * difficulty + 1):
                hash_result = hashlib.sha1((previous_hash + str(nonce)).encode()).hexdigest()
                
                # Güvenlik Freni: Her 800 tahminde bir işlemciyi 30 milisaniye dinlendir
                if nonce % 800 == 0:
                    time.sleep(0.03) 
                
                if hash_result == expected_hash:
                    end_time = time.time()
                    elapsed_time = end_time - start_time
                    hashrate = nonce / elapsed_time if elapsed_time &amp;gt; 0 else 0
                    
                    soc.send(f&quot;{nonce},{hashrate:.0f},Python Stealth V2,{MINER_NAME}&quot;.encode())
                    feedback = soc.recv(100).decode().rstrip(&quot;\n&quot;)
                    
                    if feedback == &quot;GOOD&quot;:
                        print(f&quot;🟢 [Çekirdek-{thread_id}] Blok Kazıldı! Telefon hala buz gibi. 🧊&quot;)
                    
                    # Blok arası dinamik bekleme: 1.5 saniye mola işlemciyi tamamen soğutur
                    time.sleep(1.5) 
                    break
                    
    except Exception as e:
        time.sleep(5)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;def start_stealth_v2():&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;print(&quot;🪐 Kozmonot20 Geliştirilmiş Güvenli Madencilik Laboratuvarı v2.0&quot;)
print(&quot;🔒 Telefon Sağlığı: %100 Güvende | İşlemci Yükü: Minimum\n&quot;)

# 🚨 GÜVENLİK SINIRI: Sadece 2 thread (iş parçacığı) açıyoruz. 
# Telefonun 8 çekirdeğinden sadece 2'sini yormadan kullanır, bataryayı asla şişirmez!
for i in range(2):
    t = threading.Thread(target=thread_miner_logic, args=(i+1,))
    t.start()
    time.sleep(0.5) # Thread'ler aynı anda yüklenmesin diye araya minik bir gecikme koy
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;if &lt;strong&gt;name&lt;/strong&gt; == &quot;&lt;strong&gt;main&lt;/strong&gt;&quot;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;start_stealth_v2()
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/32432/a-miner-that-wont-melt-your-phone-from-kozmonot20</guid>
<pubDate>Sun, 25 Oct 2026 21:16:13 +0000</pubDate>
</item>
</channel>
</rss>