HTML/JAVASCIPT - Request- Alteration

Discussion in 'Scripting' started by EFA11, Apr 10, 2015.

  1. EFA11

    EFA11 Avatar Guru

    Oct 7, 2010
    8,719
    6,741
    270
    #1 EFA11, Apr 10, 2015
    Last edited by a moderator: Apr 20, 2017
    Before I go further, yes this belongs to someone else, there is no comment or info on who it is and I haven't looked online to give credit. So..

    Anyone have a solution where we can add trackers to this without hard coding them into the HTML?

    Code:
    <html>
    <head>
    <title>Magnet Generator</title>
    </head>
    <body>
    <script language=javascript>
    function update()
    {
        try
        {
            var data = "magnet:"
                + "?xt=urn:btih:" + document.getElementById("hash").value
                + "&dn=" + encodeURIComponent(document.getElementById("name").value)
            + "&tr=udp%3A%2F%2Fcoppersurfer.tk%3A6969"
                + "&tr=udp%3A%2F%2Fopen.demonii.com%3A1337"
            + "&tr=udp%3A%2F%2F9.rarbg.me%3A2710"
                + "&tr=udp%3A%2F%2Ftracker.aletorrenty.pl%3A2710"
            + "&tr=udp%3A%2F%2Fwww.eddie4.nl%3A6969"
                ;
            document.getElementById("link").href = data;
            //document.getElementById("link").innerHTML = data;
            document.getElementById("link_text").value = data;
            
        }
        catch(e)
        {
            alert("exception: " + e);
        }
    }
    </script>
    <form name="form" onsubmit="update(); return false;">
    info hash: <input id="hash" size=80><br>
    torrent name: <input id="name" size=80><br>
    <input type="submit" value="Generate"><br>
    <a href="magnet:" id="link">Magnet Link</a>: <input readonly id="link_text" size=80><br>
    </form>
    </body>
    </html>
    
    This will create an HTML page that will generate Magnet links for torrent clients. An example use this hash (MTK's)
    Code:
    CD65596D3FD8F6506692E31EE0533BA3B2578CAE
    Name is optional, click generate and it will create a magnet link with info hash and trackers.

    Id like to add trackers as optional and not have them automatically added. Of course my HTML is extremely limited with this stuff so, any takers? :D

    Once this is done, we can simply post info hashes to magnets etc without actually posting magnet links here, since I can only imagine eventually they will be not allowed as well.

    Post a hash, let the user make the magnet. Thoughts?

    -ed-
    found the place I found it
    romanr.info
     
  2. leebo_28

    leebo_28 MDL Senior Member

    Jun 12, 2011
    465
    172
    10
    I like it..I think your on to something..was easy enough to figure out for sure :clap:

    as far as the trackers..they are getting limited to what works anymore anyway
     
  3. EFA11

    EFA11 Avatar Guru

    Oct 7, 2010
    8,719
    6,741
    270
    #3 EFA11, Apr 10, 2015
    Last edited by a moderator: Apr 20, 2017
    (OP)
    right, and people can decide for themselves if they want to make use of trackers or not. Also posting something like
    Code:
    50AB1ADA22B187DDF01AA1FDC871D83ECEF1A0C9
    for our good friend Murphy, would be *IMO* ok as well
     
  4. leebo_28

    leebo_28 MDL Senior Member

    Jun 12, 2011
    465
    172
    10
    would have been safe until you put that "notorious" name in your post..were busted now..lmao~!
     
  5. EFA11

    EFA11 Avatar Guru

    Oct 7, 2010
    8,719
    6,741
    270
    lol well only reason we couldn't post home brew is, DMCA ate them faster than they could be post.

    I think my only objection to home brew iso's would be limiting them to those who are trusted. I guess that could open a can of worms though. Labeling the hash info would be a must with at least a warning that HEY THIS IS HOME BREW or something dunno
     
  6. leebo_28

    leebo_28 MDL Senior Member

    Jun 12, 2011
    465
    172
    10
    as much as i love (and use) Murphy's stuff..I think posting home brew here would bring all sorts of unwanted attention , mainly from other sites linking back to us..ya think?
     
  7. EFA11

    EFA11 Avatar Guru

    Oct 7, 2010
    8,719
    6,741
    270
    well they can link all they want, all we would have is info hashes lol!
     
  8. Threat

    Threat Lord of the Files

    Feb 23, 2014
    1,063
    871
    60
    #8 Threat, Apr 11, 2015
    Last edited by a moderator: Apr 20, 2017
    Code:
    <html>
    <head>
    <title>Magnet Generator</title>
    </head>
    <body>
    <script language=javascript>
    function update()
    {
        try
        {
            var data = "magnet:"
                + "?xt=urn:btih:" + document.getElementById("hash").value
                + "&dn=" + encodeURIComponent(document.getElementById("name").value)
    //   + "&tr=udp%3A%2F%2Fcoppersurfer.tk%3A6969"
    //   + "&tr=udp%3A%2F%2Fopen.demonii.com%3A1337"
    //   + "&tr=udp%3A%2F%2F9.rarbg.me%3A2710"
    //          + "&tr=udp%3A%2F%2Ftracker.aletorrenty.pl%3A2710"
    //   + "&tr=udp%3A%2F%2Fwww.eddie4.nl%3A6969"
                ;
       
      var trackers = document.getElementById("trackers").value;
      if (trackers) {
       trackersArray = trackers.trim().split(/\s+/);
       for(var i =0; i < trackersArray.length; i++) {
        data = data + "&tr=" + encodeURIComponent(trackersArray);
       }
      }
      
            document.getElementById("link").href = data;
            document.getElementById("link_text").value = data;
            
        }
        catch(e)
        {
            alert("exception: " + e);
        }
    }
    </script>
    <form name="form" onsubmit="update(); return false;">
    info hash: <input id="hash" size=80><br>
    torrent name: <input id="name" size=80><br>
    <input type="submit" value="Generate"><br>
    <a href="magnet:" id="link">Magnet Link</a>: <input readonly id="link_text" size=80><br>
    Enter your Trackers in the form of udp:address:port
    <br/>
    Example:<br/>
    udp:aaa.bbb.com:888<br/>
    udp:ccc.ddd.com:999<br/>
    <br/>
    <textarea id="trackers" rows="4" cols="50">
    </textarea>
    </form>
    </body>
    </html>
    
    


    So a text area where the trackers can be entered/pasted in and the link build up by adding these onto the tracker url?
     
  9. EFA11

    EFA11 Avatar Guru

    Oct 7, 2010
    8,719
    6,741
    270
    #9 EFA11, Apr 11, 2015
    Last edited by a moderator: Apr 20, 2017
    (OP)
    yes, this is exactly what I was looking for. Thank you!

    Maintaining a list of trackers for those who prefer to use them isn't much of a problem, these can be contributed by all users. Run across a working tracker, we can add them to the list.
    Code:
    udp://9.rarbg.com:2710/announce
    
    udp://coppersurfer.tk:6969
    
    udp://9.rarbg.com:2710
    
    http://exodus.desync.com/announce
    
    http://pow7.com/announce
    
    http://announce.torrentsmd.com:6969/announce
    
    udp://9.rarbg.com:2710/announce
    
    udp://coppersurfer.tk:6969/announce
    
    udp://exodus.desync.com:6969/announce
    
    udp://open.demonii.com:1337/announce
    
    http://exodus.desync.com/announce
    
    
    All we have to do post info hashes to our files and people can create their own links without every having them post here. I hope this is a solution that works for magnets.

    Just a thought now that this is Threatening so well lol

    Any idea how to create one of these that would work with urls that would generate a hash that could be entered into a generator like this, so even HTTP/FTP links can have hashes to enter into a generator for downloads? People could do the same thing here then, post a hash for a URL and people can create their own links for them as well.

    It would need the ability to create a hash and also decipher the hash to a working URL.
     
  10. Skaendo

    Skaendo MDL Addicted

    Sep 23, 2014
    888
    534
    30
    #10 Skaendo, Apr 11, 2015
    Last edited by a moderator: Apr 20, 2017
    Here's a few trackers to check out.

    Code:
    fr33dom.h33t.com:3310/announce
    
    http://10.rarbg.com:80/announce
    
    http://10.rarbg.com/announce
    
    http://11.rarbg.com:80/announce
    
    http://121.14.98.151:9090/announce
    
    http://121.14.98.151:9090/scrape
    
    http://218.145.160.136:8080/announce
    
    http://220.162.244.175:53880/announce
    
    http://7ece.co.uk:6969/announce
    
    http://9.rarbg.com:2710/announce
    
    http://94.228.192.98.nyud.net/announce
    
    http://94.228.192.98/announce
    
    http://94.228.192.98/scrape
    
    http://agggh.zapto.org:6969/announce
    
    http://announce.opensharing.org:2710/announce
    
    http://announce.torrentsmd.com:6969/announce
    
    http://announce.torrentsmd.com:8080/announce.php
    
    http://axxo.sladinki007.net:6500/announce
    
    http://bigfoot1942.sektori.org:6969/announce
    
    http://bigtorrent.org:2710/announce
    
    http://bt.careland.com.cn:6969/announce
    
    http://bt.cngba.com:8000/announce
    
    http://bt.home-ix.ru.nyud.net/announce
    
    http://bt.home-ix.ru.nyud.net/announce.php
    
    http://bt.home-ix.ru/announce
    
    http://bt.home-ix.ru/announce.php
    
    http://bt.peerseed.ru/announce
    
    http://bt.poletracker.org:2710/announce
    
    http://bt.rutor.org:2710/announce
    
    http://bt.tgbus.com:6969/announce
    
    http://bt.tgbus.com:8000/announce
    
    http://bt1.the9.com:6969/announce
    
    http://bt2.btally.net:8000/announce
    
    http://bttrack.9you.com/:8080/announce
    
    http://bttrack.9you.com/announce
    
    http://calu-atrack.appspot.com.nyud.net/announce
    
    http://calu-atrack.appspot.com/announce
    
    http://coppersurfer.tk:6969/announce
    
    http://coppersurfer.tk:6969/scrape
    
    http://denis.stalker.h3q.com:6969/announce
    
    http://denis.stalker.h3q.com:80/announce
    
    http://exodus.desync.com:6969/announce
    
    http://exodus.desync.com/announce
    
    http://exodus.desync.com/scrape
    
    http://ezard.ma.cx:6969/announce
    
    http://eztv.sladinki007.eu:60500/announce
    
    http://fr33dom.h33t.com:3310/announce
    
    http://genesis.1337x.org:1337/announce
    
    http://greenlietracker.appspot.com/announce
    
    http://i.bandito.org/announce
    
    http://inferno.demonoid.com:3400/announce
    
    http://irc.vidalinux.com:6969/announce
    
    http://jonnyfavorite.servebeer.com:6969/announce
    
    http://kleverbear23.mine.nu:6249/announce
    
    http://moviesb4time.biz/announce.php
    
    http://mpggalaxy.mine.nu:6969/announce
    
    http://open.tracker.thepiratebay.org/announce
    
    http://photodiode.mine.nu:6969/announce
    
    http://photodiode.mine.nu:80/announce
    
    http://pirates-united.info:6969/announce
    
    http://piratex.wut.se:6969/announce
    
    http://pow7.com:80/announce
    
    http://pow7.com/announce
    
    http://r165.server.lu:6969/announce
    
    http://red.tracker.prq.to:80/announce
    
    http://svn.vidalinux.com:6969/announce
    
    http://t.ppnow.net:2710/announce
    
    http://tk2.greedland.net/announce
    
    http://tpb.tracker.prq.to/announce
    
    http://tpb.tracker.thepiratebay.org/announce
    
    http://tracker.animeun.com:8989/announce
    
    http://tracker.bitebbs.com:6969/announce
    
    http://tracker.bitreactor.to:2710/announce
    
    http://tracker.bittorrent.am:80/announce
    
    http://tracker.bittorrent.am/announce
    
    http://tracker.bol.bg/announce.php
    
    http://tracker.coppersurfer.tk:6969/announce
    
    http://tracker.deadfrog.us:42426/announce
    
    http://tracker.deluxebits.to:3552/announce
    
    http://tracker.edgebooster.com:6969/annouce
    
    http://tracker.edgebooster.com:6969/announce
    
    http://tracker.ex.ua:80/announce
    
    http://tracker.ex.ua/announce
    
    http://tracker.harryy.us:80/announce
    
    http://tracker.hexagon.cc:2710/announce
    
    http://tracker.ilibr.org:6969/announce
    
    http://tracker.irc.su:80/announce
    
    http://tracker.irc.su/announce
    
    http://tracker.istole.it:80/announce
    
    http://tracker.istole.it/announce
    
    http://tracker.marshyonline.net/announce
    
    http://tracker.openbittorrent.com:80/announce
    
    http://tracker.openbittorrent.com/announce
    
    http://tracker.paradise-tracker.com:102/announce
    
    http://tracker.prq.to:80/announce
    
    http://tracker.prq.to/announce
    
    http://tracker.publicbt.com:80/announce
    
    http://tracker.publicbt.com:80/scrape
    
    http://tracker.publicbt.com/announce
    
    http://tracker.publicbt.org:80/announce
    
    http://tracker.publichd.eu:80/announce
    
    http://tracker.sladinki007.net:6500/announce
    
    http://tracker.tfile.me/announce
    
    http://tracker.thepiratebay.com/announce
    
    http://tracker.thepiratebay.org/announce
    
    http://tracker.token.ro:80/announce
    
    http://tracker.torrent.to:2710/announce
    
    http://tracker.torrentbox.com:2710/announce
    
    http://tracker.torrentparty.com:80/announce
    
    http://tracker.torrenty.org:6969/announce
    
    http://tracker.xpear.de:6969/announce
    
    http://tracker.xpear.de:80/announce
    
    http://tracker.ydy.com:83/announce
    
    http://tracker.ydy.com:84/announce
    
    http://tracker.ydy.com:86/announce
    
    http://tracker.ydy.com:88/announce
    
    http://tracker.ydy.com:89/announce
    
    http://tracker.ydy.com:90/announce
    
    http://tracker.ydy.com:92/announce
    
    http://tracker.ydy.com:93/announce
    
    http://tracker.ydy.com:96/announce
    
    http://tracker.ydy.com:97/announce
    
    http://tracker.ydy.com:98/announce
    
    http://tracker.ydy.com:100/announce
    
    http://tracker.ydy.com:102/announce
    
    http://tracker.ydy.com:103/announce
    
    http://tracker.ydy.com:105/announce
    
    http://tracker.ydy.com:106/announce
    
    http://tracker.ydy.com:109/announce
    
    http://tracker.yify-torrents.com/announce
    
    http://tracker1.torrentum.pl:6969/announce
    
    http://tracker2.istole.it:60500/announce
    
    http://tv.tracker.prq.to:80/announce
    
    http://tv.tracker.prq.to/announce
    
    http://tv.tracker.thepiratebay.org/announce
    
    http://vip.tracker.thepiratebay.org/announce
    
    http://www.h33t.com:3310/announce
    
    http://www.h33t.com:3310/scrape
    
    http://www.ipmart-forum.com:2710/announce
    
    http://www.sumotracker.org/announce
    
    http://www.the-underdogs.info:6969/announce
    
    http://www.torrent-downloads.to:2710/announce
    
    http://www.torrentvideos.com:6969/announce
    
    udp://9.rarbg.com:2710/announce
    
    udp://9.rarbg.com:2710/scrape
    
    udp://9.rarbg.me:2710/scrape
    
    udp://10.rarbg.com/scrape
    
    udp://11.rarbg.com:80/scrape
    
    udp://12.rarbg.me:80/scrape
    
    udp://fr33dom.h33t.com:3310/announce
    
    udp://ipv4.tracker.harry.lu:80/scrape
    
    udp://open.demonii.com:1337
    
    udp://open.demonii.com:1337/announce
    
    udp://piratex.wut.se:6969/announce
    
    udp://tracker.1337x.org:80/announce
    
    udp://tracker.ccc.de:80
    
    udp://tracker.ccc.de:80/announce
    
    udp://tracker.ex.ua:80/announce
    
    udp://tracker.istole.it:6969
    
    udp://tracker.istole.it:80
    
    udp://tracker.istole.it:80/announce
    
    udp://tracker.istole.it:80/scrape
    
    udp://tracker.openbittorrent.com:80
    
    udp://tracker.openbittorrent.com:80/announce
    
    udp://tracker.openbittorrent.com:80/scrape
    
    udp://tracker.publicbt.com:80
    
    udp://tracker.publicbt.com:80/announce
    
    udp://tracker.publicbt.com:80/scrape
    
    udp://tracker.thepiratebay.org:80/announce
    
    udp://tracker.torrentbox.com:2710/announce
    
    udp://youare.leeching.me:2292/announce
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. EFA11

    EFA11 Avatar Guru

    Oct 7, 2010
    8,719
    6,741
    270
    #11 EFA11, Apr 11, 2015
    Last edited by a moderator: Apr 20, 2017
    (OP)
    This is what is working between yours and mine. dupes removed

    Code:
    udp://coppersurfer.tk:6969/announce
    
    udp://exodus.desync.com:6969/announce
    
    http://announce.torrentsmd.com:6969/announce
    
    http://announce.opensharing.org:2710/announce
    
    http://i.bandito.org/announce
    
    http://pow7.com:80/announce
    
    http://tracker.ex.ua/announce
    
    http://tracker.publichd.eu:80/announce
    
    http://tracker.tfile.me/announce
    
    udp://9.rarbg.me:2710/scrape
    
    udp://open.demonii.com:1337
    
    
    
     
  12. Threat

    Threat Lord of the Files

    Feb 23, 2014
    1,063
    871
    60
    It would not be a hash if you could convert it back to the url without a table.

    what you could do is make a call to an external page to grab a list of trackers, format them correctly and populate the text area. 5 min job.
     
  13. EFA11

    EFA11 Avatar Guru

    Oct 7, 2010
    8,719
    6,741
    270
    #13 EFA11, Apr 11, 2015
    Last edited: Apr 11, 2015
    (OP)
  14. Threat

    Threat Lord of the Files

    Feb 23, 2014
    1,063
    871
    60
    They are different tasks. MD5 / SHA1 hash are non reversible ... information is lost. We can do that in JavaScript.
    base64 is just encoding data (eg binary) so it can be represented in text form (eg a webform). We can do that in JavaScript.

    It depends what you are trying to achieve with this? All of these would be far more complex than just grabbing a list from a webpage that listed trackers.
     
  15. EFA11

    EFA11 Avatar Guru

    Oct 7, 2010
    8,719
    6,741
    270
    just want to make a URL of FTP/HTTP/HTTPS etc. into a code similar to a hash value. So ftp.MS_Sucks.ORG/file.iso would be encoded as an example, to SDGFGHRFDSsdgEWr. With the ability to take the SDGFGHRFDSsdgEWr and decode back to ftp.MS_Sucks.ORG/file.iso. Then instead of posting links to files we simply post "SDGFGHRFDSsdgEWr" and then people would copy/paste and decode the "SDGFGHRFDSsdgEWr" to ftp.MS_Sucks.ORG/file.iso.

    Trackers you solved with the first bit of code for magnet links. I would let people deal with that on their own. This is a new separate idea lol
     
  16. Threat

    Threat Lord of the Files

    Feb 23, 2014
    1,063
    871
    60
    #16 Threat, Apr 11, 2015
    Last edited: Apr 11, 2015
    Then hashing is out. You want encoding like base64 or encryption (aes, des, idea, rsa)


    Base64 is decryptable without any key ... it's a standard algo and lots of online tools for encoding/decoding ASCII<->Base64

    Encryption you could use a key people would need to know to decrypt. Again there are already online tools for this.
     
  17. EFA11

    EFA11 Avatar Guru

    Oct 7, 2010
    8,719
    6,741
    270
    yeah I think that base64 link is good enough. just need to paste links into it and encode, share the code and let them go and decode it from there.
     
  18. Threat

    Threat Lord of the Files

    Feb 23, 2014
    1,063
    871
    60
    What might be better if you had some webhost with a page on that took a base64 script as a parameter on the query string, or better still as part of the url...

    http://www.somehost.com/base64path

    This script would decode and give you a link to the real download. That way no link to the file is posted on MDL but a link to the link .... bit like the link to a twitter.

    At the moment the link in base64 could still be argued MDL were hosting the link to the file, albeit encoded.

    Make it indirect and it could be argued MDL is not linking to any copyrighted material so could refuse takedowns.
     
  19. EFA11

    EFA11 Avatar Guru

    Oct 7, 2010
    8,719
    6,741
    270
    #19 EFA11, Apr 12, 2015
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Yeah the fact that there is a link to the file at all is what I am trying to avoid completely. With the magnets, we got that set now. Example would be;


    No link to anything except the generator, and I tried to make that an attachment but I guess, rar/zip/7z even HTML are not able to be attached lol


    also moved things around a little, I think its finished.

    [​IMG]

    Thanks for this!