This is an old revision of the document!
Using mktorrent
:
mktorrent -a http://torrent.tracker.net:9000/announce \ -a udp://torrent.tracker.net:9000 \ -n 'Torrent Name' \ -o torrent_name.torrent \ 'Torrent Directory'
Note that any number of announce parameters (-a
) are allowed and that they do not have to point to the same same domain.
Torrent clients such as qBittorrent allow blocking P2P peers based on blacklists generated by various third-parties parties on the Internet. Blacklists are typically updated by the maintainer such that they must be updated periodically and the following section provides scripts to download the blocklists in various environments.
Note that even though blacklists are not as good of a solution as a whitelist of peers (for example, by joining a private tracker), the blacklists are good enough to stop any direct attempts by anti-piracy companies to connect. The fact that anti-piracy companies can use other methods, or even connect through VPNs, if necessary, is irrelevant and removing the peerblock blacklist would just serve to make it easier for the anti-P2P companies to connect (not more difficult). Furthermore, peerblock blacklists are typically organized such that they require an O(1) time complexity lookup, such that the computation loss is negligible compared to the ability to batch block entire IP ranges belonging to companies whose very mission is to track and harass people sharing files. The argument that peerblock "is useless", is also null and void.
For Windows and using only native tools, the peer block list can be downloaded using the task scheduler and bitsadmin. The following Windows task can be saved to a file and them imported in "Task Scheduler":
<?xml version="1.0" encoding="UTF-16"?> <Task version="1.3" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"> <RegistrationInfo> <Date>2020-01-06T06:56:13.2286344</Date> <Author>was\office</Author> <Description>Download p2p Peer Blocklist</Description> </RegistrationInfo> <Triggers> <CalendarTrigger> <StartBoundary>2020-01-06T06:00:00Z</StartBoundary> <Enabled>true</Enabled> <ScheduleByDay> <DaysInterval>1</DaysInterval> </ScheduleByDay> </CalendarTrigger> </Triggers> <Principals> <Principal id="Author"> <UserId>was\office</UserId> <LogonType>InteractiveToken</LogonType> <RunLevel>LeastPrivilege</RunLevel> </Principal> </Principals> <Settings> <MultipleInstancesPolicy>StopExisting</MultipleInstancesPolicy> <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries> <StopIfGoingOnBatteries>false</StopIfGoingOnBatteries> <AllowHardTerminate>true</AllowHardTerminate> <StartWhenAvailable>false</StartWhenAvailable> <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable> <IdleSettings> <StopOnIdleEnd>true</StopOnIdleEnd> <RestartOnIdle>false</RestartOnIdle> </IdleSettings> <AllowStartOnDemand>true</AllowStartOnDemand> <Enabled>true</Enabled> <Hidden>true</Hidden> <RunOnlyIfIdle>false</RunOnlyIfIdle> <DisallowStartOnRemoteAppSession>false</DisallowStartOnRemoteAppSession> <UseUnifiedSchedulingEngine>false</UseUnifiedSchedulingEngine> <WakeToRun>false</WakeToRun> <ExecutionTimeLimit>P3D</ExecutionTimeLimit> <Priority>7</Priority> </Settings> <Actions Context="Author"> <Exec> <Command>C:\Scripts\download-peerblock.bat</Command> <WorkingDirectory>C:\Users\office\Documents</WorkingDirectory> </Exec> </Actions> </Task>
The corresponding script file download-peerblock.bat
is the following:
bitsadmin /create download-peerblock bitsadmin /setnotifycmdline download-peerblock C:\Windows\System32\bitsadmin.exe "C:\Windows\System32\bitsadmin.exe /complete download-peerblock" bitsadmin /addfile download-peerblock http://omeglewarden.weebly.com/uploads/6/9/2/6/6926744/anti-p2p-companies.p2p C:\Users\office\Documents\anti-p2p-companies.p2p bitsadmin /resume download-peerblock
The following is a script that can be executed via cron in order to retrieve a list of anti-P2P / piracy companies and their IP subnets in order to load the list in torrent clients and block them. For instance, to download the list on a daily basis, create the file at /etc/cron.daily/peerblock
with the following contents:
#!/usr/bin/env sh ########################################################################### ## Copyright (C) Wizardry and Steamworks 2024 - License: MIT ## ########################################################################### DESTINATION_FILE=/opt/peerblock/peerblock.p2p curl \ -s \ -L \ -o - \ 'http://list.iblocklist.com/?list=ydxerpxkpcfqjaybcssw&fileformat=p2p&archiveformat=gz' | \ gunzip | \ egrep -v '^#' | \ sort -u > ${DESTINATION_FILE}
that will download the peer block file to /opt/peerblock/peerblock.p2p
directory.
For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.