Loading...
Welcome to Anarcho-Punk.net community ! Please register or login to participate in the forums.   Ⓐ//Ⓔ

Downloads: permanent solution

Discussion in 'General Discussion' started by ungovernable, Jun 8, 2013.

  1. ungovernable

    ungovernable Autonome Staff Member Uploader Admin Team Experienced member


    4,425

    121

    24

    Aug 21, 2009
    Male
    Canada  Canada
    As you noticed all of the links uploaded by Anarcho-Punk.net are dead since crass filed a copyright claim against us. We found a solution to restore all the downloads forever but we will need help from the community because there's a lot of work to do.

    Long story short, we will rent another dedicated server and put all the downloads on it. Nothing will ever get deleted.

    Advantages:

    - No ads
    - Direct downloads
    - Maximum speed. An album will be downloaded in less than 30 seconds.
    - No need to enter a confirmation code before download starts
    - IMPOSSIBLE that any file will get deleted
    - Downloads will have URL like http://www.anarcho-punk-downloads.net/album.zip
    If we ever end up being banned by the host (very unlikely, unless some jackass file a copyright complaint) then we could restore everything in a few clicks. We wouldn't need to change the links on the forum since the URL will stay the same even if we move to a new server
    - Upload will be done through FTP, so you can upload 1000 albums in 1 click

    This solution would be better than torrent, better than mediafire, better than soulseek, better than everything.


    Disavantages:

    - Upload will be private. Only big trusted uploaders will have access to the upload system. Other members will have to keep using websites like Mediafire. But at least the majority of the most important files will be secured permanently.

    - I will re-upload the 2000+ albums uploaded by Anarcho-Punk.net album BUT we will need to edit each post and refresh the download link
    We're talking about 2000 posts to edit and change the download link to the new location. That's a very big job and i don't have the time to do it alone. BUT if we form a group of people who want to help it would be much more easier. Let's say 10 people want to help, then we only have to do 200 edits each. If everyone do 10 per day then in less than 1 month all downloads will be working again, forever.

    If someone want to do a couple of hundreds of post editing, we could send you free t-shirts to thank you for your work.



    So... Any volounteers to help ?
     

  2. punkmar77

    punkmar77 Experienced Member Uploader Experienced member


    5,737

    204

    718

    Nov 13, 2009
     United States
    I'm down
     
  3. Rebellious twit

    Rebellious twit Experienced Member Experienced member


    512

    0

    0

    Jul 21, 2012
     
    if i had any experience with this, i would love to help unfortunately i don't have any clue how to do these kind of things, however if there is need for something i'm up :thumbsup:
     
  4. Kobac

    Kobac Experienced Member Uploader Experienced member Forum Member


    463

    9

    25

    Nov 7, 2009
     Denmark
    I would like to help and i have a lot of free time now,if you could give me few tips on how to do it(also i m gonna learn something new besides)maybe from google or something.
    Ungovernable thanks for just trying doing this.
     
  5. ungovernable

    ungovernable Autonome Staff Member Uploader Admin Team Experienced member


    4,425

    121

    24

    Aug 21, 2009
    Male
    Canada  Canada
    A few updates:

    I may have found a solution to put back all downloads without the help of anyone. This will work for Pirate-Punk.net and QuebecUnderground but i have yet to test it on APN.

    I already bought the new dedicated server and started uploading the albums. So far about half of it is uploaded.

    Then i will have to write the new scripts to automatically post the albums on the forums. So everything should be online until the end of the month.

    Problem is that even if i can write a script to automatically put the links on the forums then it would just create a new topic for each links. The old topic would still be here with the old links, so we would have a lot of duplicates. We would also lose all replies posted to the topic.
    It would still be better if we team up to refresh the links manually instead. We would have to update each of the 2000 downloads threads with the new link. But that's a lot of work and so far not a lot of people seems interessed to help.
     
  6. punkmar77

    punkmar77 Experienced Member Uploader Experienced member


    5,737

    204

    718

    Nov 13, 2009
     United States
    I can get started and I'm sure people will help as we go along, even chipping away at some every day will eventually get it done
     
  7. ungovernable

    ungovernable Autonome Staff Member Uploader Admin Team Experienced member


    4,425

    121

    24

    Aug 21, 2009
    Male
    Canada  Canada
    Still working on it. The server is bought and fully online. I've been working on the scripts of the file hosting platform. Most of it is already done, just need to fix a few things. We will be able to start adding the links very soon, probably at the end of the month or beginning of july. This is my #1 priority right now.

    Here's how it looks so far:
    http://www.pirate-punk.com/86%20Crew%20 ... Reggae.zip
    This is Pirate-Punk.net's version but that's just to give a preview of the system. You can also test the download speeds (very fast) and as you can see : no ads, no popups, no waiting, no confirmation code, no offers of paid subscribtion, no bullshit.
     
  8. Bakica

    Bakica Experienced Member Experienced member Forum Member


    951

    0

    0

    Feb 21, 2010
     
    The link isn't working for me. It pops 500 Internal Server Error.


    I'm always ready to help, I have some free time in the coming month.
     
  9. ungovernable

    ungovernable Autonome Staff Member Uploader Admin Team Experienced member


    4,425

    121

    24

    Aug 21, 2009
    Male
    Canada  Canada
    Working now. Was just testing some stuff.
     
  10. antihero

    antihero New Member New Member


    4

    0

    0

    Jun 23, 2013
     
    After thinking about this for a while, a much *much* better solution would be to use torrents and rent a $20/month seedbox. Much cheaper and DIY than dedicated, and could be hosted forever even if the seedbox went down. We could run our own tracker or use the ones that piratebay use (including peer exchange and all that stuff). Then all you'd have to post would be magnet links.
     
  11. antihero

    antihero New Member New Member


    4

    0

    0

    Jun 23, 2013
     
    Here is a Python script to simplify the creation of torrents, uploading to a seedbox, and creating a magnet link.

    Requires python bencode, mktorrent, and remote-transmission (if that's what your seedbox is using).

    Code:
    #!/usr/bin/env python2
    import base64
    import bencode
    import hashlib
    import json
    import os
    import re
    import subprocess
    import sys
    import urllib
    
    
    TRACKERS = (
        'udp://tracker.blackflags.co.uk:1984/announce',
        'udp://tracker.istole.it:80',
        'udp://open.demonii.com:1337/announce',
        'udp://tracker.openbittorrent.com:80',
        'udp://tracker.ccc.de:80',
        'udp://tracker.publicbt.com:80',
    )
    
    def mkmagnet(filename):
        with open(filename, 'r') as f:
            metadata = bencode.bdecode(f.read())
            hashcontents = bencode.bencode(metadata['info'])
            digest = hashlib.sha1(hashcontents).digest()
            b32hash = base64.b32encode(digest)
            params = {
                'dn': metadata['info']['name'],
            }
            announce_list = []
            try:
                for x in metadata['announce-list']:
                    announce_list.extend(x)
            except KeyError:
                announce_list = (metadata['announce'],)
    
            paramstr = urllib.urlencode(params)
            magneturi = u'magnet:?xt=urn:btih:{hash}&dn={dn}{announce}'.format(
                hash=b32hash,
                dn=urllib.quote(metadata['info']['name']),
                announce=''.join(['&tr={}'.format(urllib.quote(url))
                                    for url
                                    in announce_list
                                ])
            )
    
            return magneturi
    
    def get_config(path=None):
        config = {}
        if not path:
            path = '{}/.torrentifyrc'.format(os.environ.get('HOME'))
        with open(path, 'r') as f:
            reg = re.compile('(export )?(?P<name>\w+)(\=(?P<value>.+))*')
            for line in f:
                m = reg.match(line)
                if m:
                    name = m.group('name')
                    value = ''
                    if m.group('value'):
                        value = m.group('value')
                    config[name] = value
        return config
    
    def run(*cmd):
        process = subprocess.Popen(cmd, stdout=subprocess.PIPE)
        process.wait()
        if process.returncode != 0:
            sys.exit(process.returncode)
        return process.returncode
    
    def torrentify(filename, config):
        filename = filename.rstrip('/')
        run(
            'mktorrent',
            '-a', ','.join(TRACKERS),
            filename
        )
        run('rsync', '-avzP', filename, config['SSH_URL'])
        magnet = mkmagnet(filename + '.torrent')
        print "==== MAGNET START ===="
        print magnet
        print "===== MAGNET END ====="
        run('transmission-remote',
            '{}:{}'.format(config['HOST'], config['PORT']),
            '-n', '{}:{}'.format(config['USER'], config['PASSWORD']),
            '-a', filename + '.torrent')
    
    if __name__ == '__main__':
        torrentify(sys.argv[1], get_config())
    
    
    You need a ~/.torrentifyrc that is like this:

    Code:
    USER=
    PASSWORD=
    HOST=
    PORT=
    SSH_URL=you@examples.com:files/
    
     
  12. dar72

    dar72 New Member New Member


    4

    0

    0

    Mar 5, 2012
     United Kingdom
    I think the original idea is better, all of the corporate criminals are targeting torrent trackers, I think FTP will be a lot more low profile.
     
  13. ungovernable

    ungovernable Autonome Staff Member Uploader Admin Team Experienced member


    4,425

    121

    24

    Aug 21, 2009
    Male
    Canada  Canada
    @antihero sorry i missed that post

    My first option was exactly what you suggested and after considering both options (torrents vs direct downloads) i came to the conclusion that direct downloads are a much better solution. The only downside is that we need to be more cautious about what we upload to avoid receiving DMCA complaints to our webhost... And also our disk space is limited so we must not upload large files, so we won't be able to host documentaries and such.

    Anyway, i've been working on the server's coding since almost 1 month and almost everything is ready now. It was a big headache to solve all character encoding problems and make everything compatible with utf8 but almost everything is fine now.

    Here is the list of the downloads:
    http://pirate-punk.com/dl/apn/

    The site is using Pirate-Punk's interface but you can see how it works. The APN english interface will be ready soon.

    I have built a RSS feed in the files server that automatically puts up all downloads files with the songs list. The next part is
    The next part is to create a script on Anarcho-Punk.net that will automatically put the files on the forum through XSS
     
Loading...