Jump to content

nebster

Active Members
  • Posts

    12
  • Joined

  • Last visited

Recent Profile Visitors

1,945 profile views

nebster's Achievements

Newbie

Newbie (1/14)

  1. Hey, Wondering if it's possible to add in a function for grooveshark so that mplayer or some other player plays the song and when it's downloaded, you send a 1 sec blank song to grooveshark so it starts buffering the next song after the first is finished downloading. Hope it makes sense
  2. Sorry, forgot to explain, you need perl to use it. I couldn't find a way of doing this in C++ so I used perl. I'm currently looking for a perl compiler but can't find one. To use it, open C:\tor.pac (or create it) and type in: function FindProxyForURL(url, host) { if (dnsDomainIs(host, ".pandora.com")) return "PROXY 127.0.0.1:8888"; // All other requests don't pass proxy return "DIRECT"; } then go to your browsers properties and set the automatic configuration file to this (If you use a proxy, replace "direct" with "PROXY <addresshere>" or if it's a SOCKS proxy "SOCKS <addresshere>" then open http://www.pandora.com/radio/tuner_8_6_0_0_pandora_mini.swf To get this address when it says it's old or doesn't work, look at the source of http://www.pandora.com/?cmd=mini and remove the https (and replace with http) or :443 Like I said, I'm still working on this so there are some things to sort out like this
  3. ------------------------------------------------ ------------------------------------------------ COMMENTS ON NEW RIPPER START HERE ------------------------------------------------ ------------------------------------------------
  4. Sorry, I seem to have misplaced the source so I can't fix any problems that are causing this but it may fixable still. You need to paste the log here btw, if anyone want's the source (my code doesn't have comments i think) just decompile it using .net reflector and you then get it in basically any language you want! I'll post my latest one soon but there's a few bugs I'm dealing with!
  5. I'm gonna be away for 3 weeks so I'll look into the errors then About the source, same applies, I'll release it then Uknown folder is for songs it hasn't managed to get the song names yet. Ignore files in this folder as it will usually mean they are incomplete
  6. Ok, look in your Event Log (Not my log) after running the program and post that here. Also, long shot but what version of IE have you got installed? i don't have this linked to on any other sites cos this is just a personal tool that I released I'm not getting this error but it may be that the services aren't starting (I think they're called Volume Shadow Service and Microsoft Volume Service or something) My new project I'm still developing as it get's stuck in infinite loops for some reason
  7. Ok, what version of windows are you on? Windows Vista is not supported and anything but XP is also not supported due to not being able to test on it. It's cos of the backup method! Ok, you can shut it down using the taskbar icon but it may not shut down so you should end process it if it doesn't after about 5 mins after closing (so it has time to finish backing up, etc Stated above if you're on Vista or something below XP I think it may not work PS. I don't check this site much so I may not answer for a while PPS. Nearly finished my other one which will also stop extra bandwidth being used and buffer songs in about 2 secs if they've been played before
  8. 1- As I stated, this isn't my latest project. Some people just requested this cos it was ready. That format is just for the tagger to understand. It does fill in the tags in the mp4 format 2- Since this is an old project, i won't do this cos it involves a lot of work changing the tagging stuff as well. i may rewrite this in the future to work with my new project Just extract all the files to a folder and run :) Sorry, I don't quite get that. I'll try and answer it! You're about as good at explaining as I am! :P Songs are downloaded then copied over the old file if it's bigger in size meaning that last time it may not have got the whole file. So no duplicates are created unless they're played on different channels. Yes, this was my 3rd that I wrote. They all still work but this works virtually everytime. My latest works everytime even when you skip a song in pandora! 1- no, the problem with this is how the backup function is implemented 2- This is the default format, you may be able to change this using my next ripper (totally different to this) Like I said above, it's hard to implement I can understand this. If it gives you the option, you can deny it. It just will stop the volume and media keys from being hooked Downloaded files go into the songbackup\radio where radio is the station name. You may need more than one station created? Sorry, backup procedure. When I release my new version it won't require this Yeah, they have much better quality at smaller sizes! I love it!
  9. ---------------------------------------------------------------------COMPLETELY NEW VERSION RELEASED--------------------------------------------------------------------- Features: Written in Perl Open Source (Code is interpreted not compiled) Works as a proxy Supports Tor (As long as Privoxy is used) Creates logs of what it's doing Can rip songs from pandora (Almost perfectly if not perfectly) Supports Windows Vista too! This is my latest pandora project but at very early stages. I only work on it if I find a bug or want a new feature. Ignore the funny names of the m4a files. I will release my song renamer in the future when I have more time I wasn't going to release this yet but I felt like it :P Names of songs are stored in SongBackup\PandoraNames.txt Store in C:\Pandora\ since it contains long filenames. Use only on NTFS drives or drives that support file names of 255 (i think it is) Download from here: http://www.esnips.com/web/EvilNebster-Pandora --------------------------------------------------------------------- OLD VERSION BELOW --------------------------------------------------------------------- Features: Written in VB.Net Open Source (Request if wanted and will be posted here) Adds the song playing to the msn status if enabled Can hook volume keys Can rip songs from pandora (Almost perfectly if not perfectly) Auto-tags songs Creates logs of what it's doing Stores music in a simple subdirectory format I use for tagging This is not my latest pandora project so it may contain bugs (only noticed when loading pandora and a button on the icon menu is pressed too early) It can be dragged around via the small bar at the top or double-clicked to minimize to the Tray Double-clicking the tray opens up the window again This uses the proxy set up in IE so if you use tor, make sure it's set up for the domain pandora.com Since it's too big to attach to a post because of Interop.MSHTML.dll, I've hosted it here: Pandora
  10. Sorry, forgot to say, if someone wanted my old version, request it and I will post it here. Since I've seen several requests, I will post it here soon (very busy atm so it may take a few days). fyi, you need the .net framework EDIT: I have posted it in a new thread. beware, it isn't comapatible with vista but the new one I'm making is
  11. Ok, first of all, how did you get them out? It wouldn't let me get them out. I had to use Shadow copies of disks to do it (complicated thing). The way I labeled them was that my program hooked all the functions from the PandoraAPI (Javascript thing) and got the names from that. When there is only one file in there, it means that the current song playing is that file so I then named it.
  12. Ok, I've seen that many people have had a problem with downloading songs and getting the right name. Also, you've been making people use firefox and Flash 8. What's that all about? I use IE7 and Flash 9 and I can get my songs from the cache (They are called fla*.tmp). You have to rename them to mp4 or m4a or mp4a as they have updated the music to the aacplus codec. I've had two attempts at getting music from pandora. My first attempt was reading the files from the cache and using Open Pandora as a template for writing a copy that 'backs up' music from the cache. This works very well and tags the files with title, album and artist. I could also add album art but started my second attempt. If anyone wants a copy of this, just ask. My second attempt, I will post here soon but not yet even though it works because at the moment, it only works with a certain setup. It works flawlessly so far and I've had 4 pandora windows running in IE, Firefox and Safari as well as my custom client which it has been backing up songs from just fine. Has anyone thought of making one that decodes and encodes the data using the blowfish algorithm using the same code as the client (when decompiled)?. If you do that, everytime they change the keys stored inside, it's a simple change to the keys that are in the program (or auto-extraction). Here's the current pandora code: LzInstantiateView({name: "script", attrs: {script: function () { _root.UNI_REPLACEMENT_CHAR = undefined; _root.UNI_MAX_BMP = undefined; _root.UNI_MAX_UTF16 = undefined; _root.UNI_MAX_UTF32 = undefined; _root.UNI_MAX_LEGAL_UTF32 = undefined; _root.halfShift = undefined; _root.halfBase = undefined; _root.halfMask = undefined; _root.UNI_SUR_HIGH_START = undefined; _root.UNI_SUR_HIGH_END = undefined; _root.UNI_SUR_LOW_START = undefined; _root.UNI_SUR_LOW_END = undefined; _root.firstByteMark = undefined; _root.trailingBytesForUTF8 = undefined; _root.offsetsFromUTF8 = undefined; _root.Blowfish = undefined; with (_root) { Blowfish = function () { }; UNI_REPLACEMENT_CHAR = 65533; UNI_MAX_BMP = 65535; UNI_MAX_UTF16 = 1114111; UNI_MAX_UTF32 = 2147483647; UNI_MAX_LEGAL_UTF32 = 1114111; halfShift = 10; halfBase = 65536; halfMask = 1023; UNI_SUR_HIGH_START = 55296; UNI_SUR_HIGH_END = 56319; UNI_SUR_LOW_START = 56320; UNI_SUR_LOW_END = 57343; firstByteMark = [0, 0, 192, 224, 240, 248, 252]; trailingBytesForUTF8 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5]; offsetsFromUTF8 = [0, 12416, 925824, 63447168, 4.194837E+009, 2.181571E+009]; Blowfish.N = 16; Blowfish.keysToString = function (keys) { var _loc1 = [keys[0].join(), keys[1].join(), keys[2].join(), keys[3].join(), keys[4].join()]; return ("[[" + _loc1.join("],[") + "]]"); }; Blowfish.generateDefaultKeyArrays = function () { var _loc6 = new Array(608135816, 2.242054E+009, 320440878, 57701188, 2.752068E+009, 698298832, 137296536, 3.964563E+009, 1160258022, 953160567, 3.193202E+009, 887688300, 3.232508E+009, 3.380368E+009, 1065670069, 3.041331E+009, 2.450970E+009, 2.306473E+009); var _loc5 = new Array(3.509652E+009, 2.564798E+009, 805139163, 3.491422E+009, 3.101798E+009, 1780907670, 3.128726E+009, 4.046225E+009, 614570311, 3.012652E+009, 134345442, 2.240740E+009, 1667834072, 1901547113, 2.757296E+009, 4.103290E+009, 227898511, 1921955416, 1904987480, 2.182434E+009, 2069144605, 3.260701E+009, 2.620446E+009, 720527379, 3.318854E+009, 677414384, 3.393288E+009, 3.101375E+009, 2.390351E+009, 1614419982, 1822297739, 2.954791E+009, 3.608508E+009, 3.174124E+009, 2024746970, 1432378464, 3.864340E+009, 2.857741E+009, 1464375394, 1676153920, 1439316330, 715854006, 3.033292E+009, 289532110, 2.706671E+009, 2087905683, 3.018724E+009, 1668267050, 732546397, 1947742710, 3.462152E+009, 2.609354E+009, 2.950085E+009, 1814351708, 2050118529, 680887927, 999245976, 1800124847, 3.300911E+009, 1713906067, 1641548236, 4.213287E+009, 1216130144, 1575780402, 4.018429E+009, 3.917838E+009, 3.693487E+009, 3.949272E+009, 596196993, 3.549867E+009, 258830323, 2.213823E+009, 772490370, 2.760122E+009, 1774776394, 2.652872E+009, 566650946, 4.142493E+009, 1728879713, 2.882767E+009, 1783734482, 3.629396E+009, 2.517608E+009, 2.874226E+009, 1861159788, 326777828, 3.124490E+009, 2130389656, 2.716952E+009, 967770486, 1724537150, 2.185433E+009, 2.364442E+009, 1164943284, 2105845187, 998989502, 3.765401E+009, 2.244026E+009, 1075463327, 1455516326, 1322494562, 910128902, 469688178, 1117454909, 936433444, 3.490321E+009, 3.675253E+009, 1240580251, 122909385, 2.157518E+009, 634681816, 4.142457E+009, 3.825095E+009, 3.061403E+009, 2.540495E+009, 79693498, 3.249099E+009, 1084186820, 1583128258, 426386531, 1761308591, 1047286709, 322548459, 995290223, 1845252383, 2.603652E+009, 3.431024E+009, 2.942222E+009, 3.202601E+009, 3.727903E+009, 1712269319, 422464435, 3.234572E+009, 1170764815, 3.523961E+009, 3.117678E+009, 1434042557, 442511882, 3.600876E+009, 1076654713, 1738483198, 4.213155E+009, 2.393238E+009, 3.677496E+009, 1014306527, 4.251020E+009, 793779912, 2.902807E+009, 842905082, 4.246964E+009, 1395751752, 1040244610, 2.656852E+009, 3.396308E+009, 445077038, 3.742854E+009, 3.577916E+009, 679411651, 2.892444E+009, 2.354009E+009, 1767581616, 3.150600E+009, 3.791627E+009, 3.102741E+009, 284835224, 4.246832E+009, 1258075500, 768725851, 2.589189E+009, 3.069724E+009, 3.532540E+009, 1274779536, 3.789419E+009, 2.764800E+009, 1660621633, 3.471100E+009, 4.011904E+009, 913787905, 3.497959E+009, 737222580, 2.514213E+009, 2.928710E+009, 3.937243E+009, 1804850592, 3.499021E+009, 2.949064E+009, 2.386320E+009, 2.390070E+009, 2.415322E+009, 4.061277E+009, 2.290661E+009, 2.416833E+009, 1336762016, 1754252060, 3.520066E+009, 3.014181E+009, 791618072, 3.188595E+009, 3.933548E+009, 2.332172E+009, 3.852520E+009, 3.043981E+009, 413987798, 3.465143E+009, 3.030929E+009, 4.245938E+009, 2093235073, 3.534596E+009, 375366246, 2.157279E+009, 2.479650E+009, 555357303, 3.870106E+009, 2008414854, 3.344188E+009, 4.221384E+009, 3.956125E+009, 2067696032, 3.594591E+009, 2.921234E+009, 2428461, 544322398, 577241275, 1471733935, 610547355, 4.027169E+009, 1432588573, 1507829418, 2025931657, 3.646575E+009, 545086370, 48609733, 2.200307E+009, 1653985193, 298326376, 1316178497, 3.007786E+009, 2064951626, 458293330, 2.589141E+009, 3.591330E+009, 3.164326E+009, 727753846, 2179363840.000000, 146436021, 1461446943, 4.069977E+009, 705550613, 3.059967E+009, 3.887725E+009, 4.281599E+009, 3.313850E+009, 1404054877, 2.845806E+009, 146425753, 1854211946); var _loc4 = new Array(1266315497, 3.048418E+009, 3.681880E+009, 3.289982E+009, 2.909710E+009, 1235738493, 2.632868E+009, 2.414720E+009, 3.970600E+009, 1771706367, 1449415276, 3.266420E+009, 422970021, 1963543593, 2.690192E+009, 3.826793E+009, 1062508698, 1531092325, 1804592342, 2.583118E+009, 2.714934E+009, 4.024972E+009, 1294809318, 4.028981E+009, 1289560198, 2.221993E+009, 1669523910, 35572830, 157838143, 1052438473, 1016535060, 1802137761, 1753167236, 1386275462, 3.080475E+009, 2.857371E+009, 1040679964, 2145300060, 2.390574E+009, 1461121720, 2.956647E+009, 4.031778E+009, 4.028375E+009, 33600511, 2.920085E+009, 1018524850, 629373528, 3.691586E+009, 3.515946E+009, 2091462646, 2.486323E+009, 586499841, 988145025, 935516892, 3.367335E+009, 2.599673E+009, 2.839831E+009, 265290510, 3.972581E+009, 2.759139E+009, 3.795373E+009, 1005194799, 847297441, 406762289, 1314163512, 1332590856, 1866599683, 4.127852E+009, 750260880, 613907577, 1450815602, 3.165621E+009, 3.734665E+009, 3.650292E+009, 3.012276E+009, 3.704570E+009, 1427272223, 778793252, 1343938022, 2.676281E+009, 2052605720, 1946737175, 3.164576E+009, 3.914039E+009, 3.967479E+009, 3.682934E+009, 1661551462, 3.294938E+009, 4.011596E+009, 840292616, 3.712171E+009, 616741398, 312560963, 711312465, 1351876610, 322626781, 1910503582, 271666773, 2.175564E+009, 1594956187, 70604529, 3.617835E+009, 1007753275, 1495573769, 4.069517E+009, 2.549218E+009, 2.663039E+009, 504708206, 2.263041E+009, 3.941167E+009, 2.249089E+009, 1514023603, 1998579484, 1312622330, 694541497, 2.582060E+009, 2.151582E+009, 1382467621, 776784248, 2.618340E+009, 3.323269E+009, 2.497899E+009, 2.784771E+009, 503983604, 4.076294E+009, 907881277, 423175695, 432175456, 1378068232, 4.145222E+009, 3.954049E+009, 3.938656E+009, 3.820767E+009, 2.793130E+009, 2.977905E+009, 26017576, 3.274891E+009, 3.194772E+009, 1700274565, 1756076034, 4.006520E+009, 3.677329E+009, 720338349, 1533947780, 354530856, 688349552, 3.973925E+009, 1637815568, 332179504, 3.949051E+009, 53804574, 2.852349E+009, 3.044236E+009, 1282449977, 3.583942E+009, 3.416973E+009, 4.006381E+009, 1617046695, 2.628476E+009, 3.002304E+009, 1686838959, 431878346, 2.686675E+009, 1700445008, 1080580658, 1009431731, 832498133, 3.223436E+009, 2.605976E+009, 2.271191E+009, 2.516032E+009, 1648197032, 4.164389E+009, 2.548248E+009, 300782431, 375919233, 238389289, 3.353747E+009, 2.531189E+009, 2019080857, 1475708069, 455242339, 2.609104E+009, 448939670, 3.451063E+009, 1395535956, 2.413382E+009, 1841049896, 1491858159, 885456874, 4.264095E+009, 4.001119E+009, 1565136089, 3.898915E+009, 1108368660, 540939232, 1173283510, 2.745871E+009, 3.681308E+009, 4.207628E+009, 3.343054E+009, 4.016749E+009, 1699691293, 1103962373, 3.625876E+009, 2.256883E+009, 3.830139E+009, 1031889488, 3.479348E+009, 1535977030, 4.236805E+009, 3.251091E+009, 2132092099, 1774941330, 1199868427, 1452454533, 157007616, 2.904115E+009, 342012276, 595725824, 1480756522, 206960106, 497939518, 591360097, 863170706, 2.375254E+009, 3.596611E+009, 1814182875, 2094937945, 3.421402E+009, 1082520231, 3.463918E+009, 2.785510E+009, 435703966, 3.908033E+009, 1641649973, 2.842274E+009, 3.305900E+009, 1510255612, 2.148256E+009, 2.655288E+009, 3.276093E+009, 4.258621E+009, 236887753, 3.681803E+009, 274041037, 1734335097, 3.815195E+009, 3.317970E+009, 1899903192, 1026095262, 4.050518E+009, 356393447, 2.410692E+009, 3.873677E+009, 3.682840E+009); var _loc3 = new Array(3.913112E+009, 2.491499E+009, 4.132186E+009, 2.489920E+009, 1091903735, 1979897079, 3.170135E+009, 3.567387E+009, 3.557303E+009, 857797738, 1136121015, 1342202287, 507115054, 2.535737E+009, 337727348, 3.213593E+009, 1301675037, 2.528482E+009, 1895095763, 1721773893, 3.216772E+009, 62756741, 2142006736, 835421444, 2.531994E+009, 1442658625, 3.659876E+009, 2.882145E+009, 676362277, 1392781812, 170690266, 3.921047E+009, 1759253602, 3611846912.000000, 1745797284, 664899054, 1329594018, 3.901206E+009, 3.045908E+009, 2062866102, 2.865635E+009, 3.543622E+009, 3.464013E+009, 1080764994, 553557557, 3.656615E+009, 3.996768E+009, 991055499, 499776247, 1265440854, 648242737, 3.940784E+009, 980351604, 3.713746E+009, 1749149687, 3.396870E+009, 4.211799E+009, 3.640571E+009, 1161844396, 3.125319E+009, 1431517754, 545492359, 4.268469E+009, 3.499530E+009, 1437099964, 2.702548E+009, 3.433638E+009, 2.581716E+009, 2.787789E+009, 1060185593, 1593081372, 2.418619E+009, 4.260948E+009, 69676912, 2.159744E+009, 86519011, 2.512459E+009, 3.838209E+009, 1220612927, 3.339684E+009, 133810670, 1090789135, 1078426020, 1569222167, 845107691, 3.583754E+009, 4.072457E+009, 1091646820, 628848692, 1613405280, 3.757632E+009, 526609435, 236106946, 48312990, 2.942718E+009, 3.402728E+009, 1797494240, 859738849, 992217954, 4.005477E+009, 2.243077E+009, 3.870953E+009, 3.732016E+009, 765654824, 3.490871E+009, 2.511836E+009, 1685915746, 3.888969E+009, 1414112111, 2.273135E+009, 3.281911E+009, 4.080963E+009, 172450625, 2.569994E+009, 980381355, 4.109958E+009, 2.819808E+009, 2.716590E+009, 2.568741E+009, 3.681447E+009, 3.329971E+009, 1835478071, 660984891, 3.704678E+009, 4.046000E+009, 3.422618E+009, 3.040416E+009, 1762651403, 1719377915, 3.470491E+009, 2.693910E+009, 3.642056E+009, 3.138597E+009, 1364962596, 2073328063, 1983633131, 926494387, 3.423689E+009, 2.150032E+009, 4.096668E+009, 1749200295, 3.328847E+009, 309677260, 2016342300, 1779581495, 3.079820E+009, 111262694, 1274766160, 443224088, 298511866, 1025883608, 3.806447E+009, 1145181785, 168956806, 3.641503E+009, 3.584814E+009, 1689216846, 3.666258E+009, 3.200248E+009, 1692713982, 2.646377E+009, 4.042769E+009, 1618508792, 1610833997, 3.523052E+009, 4.130873E+009, 2001055236, 3.610705E+009, 2.202168E+009, 4.028542E+009, 2.961195E+009, 1006657119, 2006996926, 3.186143E+009, 1430667929, 3.210227E+009, 1314452623, 4.074635E+009, 4.101304E+009, 2.273951E+009, 1399257539, 3.367211E+009, 3.027629E+009, 1190975929, 2062231137, 2.333991E+009, 2.221543E+009, 2.438961E+009, 1181637006, 548689776, 2.362791E+009, 3.372408E+009, 3.104550E+009, 3.145861E+009, 296247880, 1970579870, 3.078560E+009, 3.769228E+009, 1714227617, 3.291629E+009, 3.898220E+009, 166772364, 1251581989, 493813264, 448347421, 195405023, 2.709976E+009, 677966185, 3.703037E+009, 1463355134, 2.715996E+009, 1338867538, 1343315457, 2.802222E+009, 2.684532E+009, 233230375, 2.599980E+009, 2000651841, 3.277868E+009, 1638401717, 4.028070E+009, 3.237316E+009, 6314154, 819756386, 300326615, 590932579, 1405279636, 3.267500E+009, 3.150704E+009, 2.428287E+009, 3.959193E+009, 3.461947E+009, 1862657033, 1266418056, 963775037, 2089974820, 2.263053E+009, 1917689273, 448879540, 3.550395E+009, 3.981727E+009, 150775221, 3.627908E+009, 1303187396, 508620638, 2.975983E+009, 2.726631E+009, 1817252668, 1876281319, 1457606340, 908771278, 3.720792E+009, 3.617207E+009, 2.455995E+009, 1729034894, 1080033504); var _loc2 = new Array(976866871, 3.556440E+009, 2.881648E+009, 1522871579, 1555064734, 1336096578, 3.548522E+009, 2.579275E+009, 3.574698E+009, 3.205461E+009, 3.593281E+009, 3.338716E+009, 3.079413E+009, 564236357, 2.993599E+009, 1781952180, 1464380207, 3.163844E+009, 3.332602E+009, 1699332808, 1393555694, 1183702653, 3.581086E+009, 1288719814, 691649499, 2.847557E+009, 2.895456E+009, 3.193890E+009, 2.717571E+009, 1781354906, 1676643554, 2.592534E+009, 3.230254E+009, 1126444790, 2.770208E+009, 2.633159E+009, 2.210423E+009, 2.615766E+009, 2.414155E+009, 3.127139E+009, 673620729, 2.805611E+009, 1269405062, 4.015351E+009, 3.341808E+009, 4.149410E+009, 1057255273, 2012875353, 2.162469E+009, 2.276493E+009, 2.601117E+009, 993977747, 3.918593E+009, 2.654263E+009, 753973209, 36408145, 2.530586E+009, 25011837, 3.520020E+009, 2088578344, 530523599, 2.918365E+009, 1524020338, 1518925132, 3.760828E+009, 3.759777E+009, 1202760957, 3.985898E+009, 3.906193E+009, 674977740, 4.174735E+009, 2031300136, 2019492241, 3.983893E+009, 4.153806E+009, 3.822280E+009, 352677332, 2.297720E+009, 60907813, 90501309, 3.286999E+009, 1016092578, 2.535922E+009, 2.839152E+009, 457141659, 509813237, 4.120668E+009, 652014361, 1966332200, 2.975203E+009, 55981186, 2.327461E+009, 676427537, 3.255491E+009, 2.882294E+009, 3.433927E+009, 1307055953, 942726286, 933058658, 2.468412E+009, 3.933901E+009, 4.215176E+009, 1361170020, 2001714738, 2.830558E+009, 3.274260E+009, 1222529897, 1679025792, 2.729314E+009, 3.714954E+009, 1770335741, 151462246, 3.013232E+009, 1682292957, 1483529935, 471910574, 1539241949, 458788160, 3.436315E+009, 1807016891, 3.718409E+009, 978976581, 1043663428, 3.165966E+009, 1927990952, 4.200892E+009, 2.372277E+009, 3.208409E+009, 3.533432E+009, 1412390302, 2.931980E+009, 4.132332E+009, 1947078029, 3.881506E+009, 4.168226E+009, 2.941484E+009, 1077988104, 1320477388, 886195818, 18198404, 3.786409E+009, 2.509782E+009, 112762804, 3.463356E+009, 1866414978, 891333506, 18488651, 661792760, 1628790961, 3.885187E+009, 3.141171E+009, 876946877, 2.693282E+009, 1372485963, 791857591, 2.686434E+009, 3.759983E+009, 3.167212E+009, 3.472954E+009, 2.716380E+009, 445679433, 3.561996E+009, 3.504005E+009, 3.574258E+009, 54117162, 3.331405E+009, 2.381919E+009, 3.769707E+009, 4.154350E+009, 1140177722, 4.074052E+009, 668550556, 3.214353E+009, 367459370, 261225585, 2.610173E+009, 4.209349E+009, 3.468074E+009, 3.265816E+009, 314222801, 3.066104E+009, 3.808783E+009, 282218597, 3.406014E+009, 3.773591E+009, 379116347, 1285071038, 846784868, 2.669647E+009, 3.771962E+009, 3.550492E+009, 2.305946E+009, 453669953, 1268987020, 3.317592E+009, 3.279303E+009, 3.744833E+009, 2.610508E+009, 3.859509E+009, 266596637, 3.847019E+009, 517658769, 3.462560E+009, 3.443425E+009, 370717030, 4.247527E+009, 2.224018E+009, 4.143654E+009, 4.112774E+009, 2.788325E+009, 2.477274E+009, 1456262402, 2.901443E+009, 1517677493, 1846949527, 2.295494E+009, 3.734398E+009, 2.176404E+009, 1280348187, 1908823572, 3.871787E+009, 846861322, 1172426758, 3.287448E+009, 3.383383E+009, 1655181056, 3.139813E+009, 901632758, 1897031941, 2.986607E+009, 3.066810E+009, 3.447103E+009, 1393639104, 373351379, 950779232, 625454576, 3.124241E+009, 4.148613E+009, 2007998917, 544563296, 2.244739E+009, 2.330496E+009, 2058025392, 1291430526, 424198748, 50039436, 29584100, 3.605783E+009, 2.429876E+009, 2.791104E+009, 1057563949, 3.255363E+009, 3.075367E+009, 3.463963E+009, 1469046755, 985887462); return ([_loc6, _loc5, _loc4, _loc3, _loc2]); }; Blowfish.createFromKey = function (key, keyArrays) { if (keyArrays == null) { keyArrays = this.generateDefaultKeyArrays(); } // end if var _loc8 = keyArrays[0]; var _loc14 = keyArrays[1]; var _loc13 = keyArrays[2]; var _loc12 = keyArrays[3]; var _loc11 = keyArrays[4]; var _loc16 = Blowfish.N; var _loc6 = new Blowfish(); _loc6.setKeyArrays(_loc8, _loc14, _loc13, _loc12, _loc11, Blowfish.N); var _loc3 = 0; var _loc4 = 0; var _loc7 = 0; var _loc17 = ""; var _loc9 = _loc6.codes2bytes(_loc6.str2codes(key)); _loc4 = 0; do { _loc7 = 0; do { _loc7 = _loc7 &lt;&lt; 8 | _loc9[_loc4]; _loc4 = _loc4 + 1; _loc9.length; if (_loc4 == _loc9.length || _loc4 &gt; _loc9.length) { _loc4 = 0; } // end if var _loc10 = ++; continue; _loc10 = 0; } while (_loc10 &lt; 4) _loc8[_loc3] = _loc8[_loc3] ^ _loc7; ++_loc3; continue; _loc3 = 0; } while (_loc3 &lt; _loc16 + 2) var _loc5 = [0, 0]; do { _loc6.encipher(_loc5, 0); _loc8[_loc3] = _loc5[0]; _loc8[_loc3 + 1] = _loc5[1]; _loc3 = _loc3 + 2; continue; _loc3 = 0; } while (_loc3 &lt; _loc16 + 2) do { var _loc15 = [_loc14, _loc13, _loc12, _loc11][_loc3]; do { _loc6.encipher(_loc5, 0); _loc15[_loc4] = _loc5[0]; _loc15[_loc4 + 1] = _loc5[1]; _loc4 = _loc4 + 2; continue; _loc4 = 0; } while (_loc4 &lt; 256) ++_loc3; continue; _loc3 = 0; } while (_loc3 &lt; 4) return (_loc6); }; Blowfish.createFromArrays = function (keys) { var _loc2 = new Blowfish(); _loc2.setKeyArrays(keys[0], keys[1], keys[2], keys[3], keys[4], Blowfish.N); return (_loc2); }; Blowfish.prototype.setKeyArrays = function (P, S0, S1, S2, S3, N) { with ({P: P, S0: S0, S1: S1, S2: S2, S3: S3, N: N}) { this.encipher = function (bytes, index) { var _loc2 = bytes[index]; var _loc3 = bytes[index + 1]; do { _loc2 = _loc2 ^ P[]; var _loc4 = _loc2; var _loc8 = _loc4 &amp; 255; _loc4 = _loc4 &gt;&gt; 8; var _loc9 = _loc4 &amp; 255; _loc4 = _loc4 &gt;&gt; 8; var _loc10 = _loc4 &amp; 255; _loc4 = _loc4 &gt;&gt; 8; var _loc11 = _loc4 &amp; 255; var _loc5 = S0[_loc11] + S1[_loc10]; _loc5 = _loc5 ^ S2[_loc9]; _loc5 = _loc5 + S3[_loc8]; _loc3 = _loc3 ^ _loc5; var _loc6 = _loc2; _loc2 = _loc3; _loc3 = _loc6; var _loc7 = ++; continue; _loc7 = 0; } while (_loc7 &lt; N) _loc6 = _loc2; _loc2 = _loc3; _loc3 = _loc6; _loc3 = _loc3 ^ P[N]; _loc2 = _loc2 ^ P[N + 1]; bytes[index] = _loc2; bytes[index + 1] = _loc3; }; this.decipher = function (bytes, index) { var _loc2 = bytes[index]; var _loc3 = bytes[index + 1]; do { _loc2 = _loc2 ^ P[]; var _loc4 = _loc2; var _loc8 = _loc4 &amp; 255; _loc4 = _loc4 &gt;&gt; 8; var _loc9 = _loc4 &amp; 255; _loc4 = _loc4 &gt;&gt; 8; var _loc10 = _loc4 &amp; 255; _loc4 = _loc4 &gt;&gt; 8; var _loc11 = _loc4 &amp; 255; var _loc5 = S0[_loc11] + S1[_loc10]; _loc5 = _loc5 ^ S2[_loc9]; _loc5 = _loc5 + S3[_loc8]; _loc3 = _loc3 ^ _loc5; var _loc6 = _loc2; _loc2 = _loc3; _loc3 = _loc6; var _loc7 = --; continue; _loc7 = N + 1; } while (_loc7 &gt; 1) _loc6 = _loc2; _loc2 = _loc3; _loc3 = _loc6; _loc3 = _loc3 ^ P[1]; _loc2 = _loc2 ^ P[0]; bytes[index] = _loc2; bytes[index + 1] = _loc3; }; } // End of with }; Blowfish.prototype.encrypt = function (plaintext) { var _loc2 = this.str2codes(plaintext); var _loc3 = this.codes2bytes(_loc2); return (this.encryptBytes(_loc3)); }; Blowfish.prototype.encryptBytes = function (bytes) { var _loc2 = this.bytes2ints(bytes); do { this.encipher(_loc2, ); var _loc3 = + 2; continue; _loc3 = 0; } while (_loc3 &lt; _loc2.length) bytes = this.ints2bytes(_loc2); var _loc4 = this.bytes2hex(bytes); return (_loc4); }; Blowfish.prototype.decrypt = function (ciphertext) { ciphertext = String(ciphertext); var _loc5 = this.decryptBytes(ciphertext); var _loc4 = this.bytes2codes(_loc5); var _loc3 = this.codes2str(_loc4); return (_loc3); }; Blowfish.prototype.decryptBytes = function (ciphertext) { var _loc4 = this.hex2bytes(ciphertext); var _loc2 = this.bytes2ints(_loc4); do { this.decipher(_loc2, ); var _loc3 = + 2; continue; _loc3 = 0; } while (_loc3 &lt; _loc2.length) return (this.ints2bytes(_loc2)); }; Blowfish.prototype.str2codes = function (str) { var _loc2 = []; do { _loc2.push(str.charCodeAt()); var _loc1 = ++; continue; _loc1 = 0; } while (_loc1 &lt; str.length) return (_loc2); }; Blowfish.prototype.codes2str = function (codes) { var _loc3 = []; do { _loc3.push(String.fromCharCode(codes[])); var _loc2 = ++; continue; _loc2 = 0; } while (_loc2 &lt; codes.length) return (_loc3.join("")); }; Blowfish.prototype.codes2bytes = function (codes) { var _loc4 = []; byteMask = 191; byteMark = 128; var _loc5 = 0; while (_loc5 &lt; codes.length) { var _loc2 = codes[_loc5]; ++_loc5; UNI_SUR_HIGH_START; UNI_SUR_HIGH_END; if ((_loc2 == UNI_SUR_HIGH_START || _loc2 &gt; UNI_SUR_HIGH_START) &amp;&amp; (_loc2 == UNI_SUR_HIGH_END || _loc2 &lt; UNI_SUR_HIGH_END)) { if (_loc5 == codes.length) { Logger.error("source exhausted"); return (_loc4); } // end if var _loc7 = codes[_loc5]; if (_loc7 &lt; UNI_SUR_LOW_START || _loc2 &gt; UNI_SUR_LOW_END) { Logger.error("unpaired high surrogate"); } // end if _loc2 = (_loc2 - UNI_SUR_HIGH_START &lt;&lt; halfShift) + (_loc7 - UNI_SUR_LOW_START) + halfBase; ++_loc5; } else { UNI_SUR_LOW_START; UNI_SUR_LOW_END; if ((_loc2 == UNI_SUR_LOW_START || _loc2 &gt; UNI_SUR_LOW_START) &amp;&amp; (_loc2 == UNI_SUR_LOW_END || _loc2 &lt; UNI_SUR_LOW_END)) { Logger.error("UTF-16 surrogate values are illegal in UTF-32"); } // end if } // end else if var _loc3 = 0; if (_loc2 &lt; 128) { _loc3 = 1; } else if (_loc2 &lt; 2048) { _loc3 = 2; } else if (_loc2 &lt; 65536) { _loc3 = 3; } else if (_loc2 &lt; 1114112) { _loc3 = 4; } else { _loc3 = 3; _loc2 = UNI_REPLACEMENT_CHAR; } // end else if if (firstByteMark[_loc3] == null) { Logger.error("invalid bytesToWrite: " + _loc3); return (_loc4); } // end if var _loc6 = _loc4.length; if (_loc3 != 4) { continue; } // end if _loc4[_loc6] = _loc2 | firstByteMark[_loc3]; continue; } // end while return (_loc4); }; Blowfish.prototype.bytes2codes = function (bytes) { var _loc5 = []; var _loc4 = 0; while (_loc4 &lt; bytes.length) { var _loc3 = 0; var _loc6 = trailingBytesForUTF8[bytes[_loc4]]; if (_loc4 + _loc6 &gt; bytes.length) { Logger.error("source exhausted"); return (_loc5); } // end if if (!this.isLegalUTF8(bytes.slice(_loc4, _loc4 + _loc6 + 1))) { Logger.error("not legal UTF-8"); return (_loc5); } // end if if (_loc6 != 5) { } else { _loc3 = _loc3 + bytes[_loc4]; ++_loc4; } // end else if _loc3 = _loc3 - offsetsFromUTF8[_loc6]; UNI_MAX_BMP; if (_loc3 == UNI_MAX_BMP || _loc3 &lt; UNI_MAX_BMP) { UNI_SUR_HIGH_START; UNI_SUR_LOW_END; if ((_loc3 == UNI_SUR_HIGH_START || _loc3 &gt; UNI_SUR_HIGH_START) &amp;&amp; (_loc3 == UNI_SUR_LOW_END || _loc3 &lt; UNI_SUR_LOW_END)) { Logger.error("UTF-16 surrogate values are illegal in UTF-32"); _loc5.push(UNI_REPLACEMENT_CHAR); } else { _loc5.push(_loc3); } // end else if continue; } // end if if (_loc3 &gt; UNI_MAX_UTF16) { Logger.error("ch &gt; UNI_MAX_UTF16"); _loc5.push(UNI_REPLACEMENT_CHAR); continue; } // end if _loc3 = _loc3 - halfBase; _loc5.push((_loc3 &gt;&gt; halfShift) + UNI_SUR_HIGH_START); _loc5.push((_loc3 &amp; halfMask) + UNI_SUR_LOW_START); } // end while while (8, _loc5.length &amp;&amp; (_loc5[_loc5.length - 1] == 8 || _loc5[_loc5.length - 1] &lt; 8)) { _loc5.pop(); } // end while return (_loc5); }; Blowfish.prototype.isLegalUTF8 = function (segment) { if (segment.length != 4) { segment.length; return (false); } // end if null; var _loc1 = segment[3]; if (segment[3] &lt; 128 || _loc1 &gt; 191) { return (false); } // end if null; _loc1 = segment[2]; if (segment[2] &lt; 128 || _loc1 &gt; 191) { return (false); } // end if null; _loc1 = segment[1]; if (segment[1] &gt; 191) { return (false); } // end if if (segment[0] != 224) { } else { if (_loc1 &lt; 160) { } // end if if (_loc1 &gt; 159) { } // end if if (_loc1 &lt; 144) { } // end if if (_loc1 &gt; 143) { return (false); } // end if } // end else if if (_loc1 &lt; 128) { return (false); } // end if segment[0] == 244 ? (null) : (segment[0], // Jump to 1567, null, if (_loc1 &gt;= 160) goto 1555, return (false), // Jump to 1570, // Jump to 1556, null, if (_loc1 &lt;= 159) goto 1559, return (false), // Jump to 1570, // Jump to 1560, null, if (_loc1 &gt;= 144) goto 1563, return (false), // Jump to 1570, null); 128; if ((segment[0] == 128 || segment[0] &gt; 128) &amp;&amp; segment[0] &lt; 194) { return (false); } // end if if (segment[0] &gt; 244) { return (false); } // end if return (true); }; Blowfish.prototype.bytes2ints = function (bytes) { var _loc4 = []; var _loc2 = bytes.length; var _loc6 = _loc2 % 4 == 0 ? (_loc2) : (_loc2 - _loc2 % 4); do { _loc4[_loc4.length] = bytes[] &lt;&lt; 24 | bytes[ + 1] &lt;&lt; 16 | bytes[ + 2] &lt;&lt; 8 | bytes[ + 3]; var _loc1 = + 4; continue; _loc1 = 0; } while (_loc1 &lt; _loc6) if (_loc1 &lt; _loc2) { var _loc5 = 0; do { if (_loc1 + &lt; _loc2) { _loc5 = _loc5 | bytes[_loc1 + ] &lt;&lt; (3 - ) * 8; } // end if var _loc3 = ++; continue; _loc3 = 0; } while (_loc3 &lt; 4) _loc4[_loc4.length] = _loc5; } // end if return (_loc4); }; Blowfish.prototype.ints2bytes = function (ints) { var _loc2 = []; var _loc1 = 0; do { var _loc3 = ints[]; _loc2[_loc1] = _loc3 &gt;&gt; 24 &amp; 255; ++_loc1; _loc2[_loc1] = _loc3 &gt;&gt; 16 &amp; 255; ++_loc1; _loc2[_loc1] = _loc3 &gt;&gt; 8 &amp; 255; ++_loc1; _loc2[_loc1] = _loc3 &amp; 255; ++_loc1; var _loc4 = ++; continue; _loc4 = 0; } while (_loc4 &lt; ints.length) return (_loc2); }; Blowfish.prototype.bytes2hex = function (bytes) { var _loc1 = ""; do { var _loc3 = bytes[].toString(16); if (_loc3.length == 1) { _loc1 = _loc1 + ("0" + _loc3); } else { _loc1 = _loc1 + _loc3; } // end else if var _loc2 = ++; continue; _loc2 = 0; } while (_loc2 &lt; bytes.length) return (_loc1); }; Blowfish.prototype.hex2bytes = function (hex) { var _loc3 = []; do { _loc3.push(parseInt(hex.substr(, 2), 16)); var _loc2 = + 2; continue; _loc2 = 0; } while (_loc2 &lt; hex.length) return (_loc3); }; Blowfish.prototype.str2hexDebug = function (str) { var _loc2 = ""; do { _loc2 = _loc2 + (str.charCodeAt().toString(16) + " "); var _loc1 = ++; continue; _loc1 = 0; } while (_loc1 &lt; str.length) return (_loc2); }; Blowfish.prototype.str2bytes = function (str) { return (this.codes2bytes(this.str2codes(str))); }; Blowfish.prototype.bytes2str = function (bytes) { return (this.codes2str(this.bytes2codes(bytes))); }; } // End of with }}}, 1); Thanks for reading, Nebster
×
×
  • Create New...