ffRddlmZddlZddlmZmZiddddddd d d d d ddddddddddddddddddd d!d"Zd#Zd$Zd%Z d&Z gd'Z dS)()print_functionN)bordbchr000000010010001101000101011001111000 1001 1010 1011 1100 110111101111cptd|}td|}d|S)z,Convert a key into a string of binary digitsc t|S)N)rxs u/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/Util/RFC1751.pyz_key2bin..(s tAwwcDt|dz t|dzzS)Nr r#)binaryr's r)r*z_key2bin..)sva1f~q2v6r+)mapjoin)skls r)_key2binr3&s8   " "B 6 6 ; ;B 772;;r+cZd}||||zD]}|dzt|zdz }|S)zjExtract a bitstring(2.x)/bytestring(2.x) from a string of binary digits, and return its numeric value.rr 0)ord)keystartlengthresultys r)_extractr<-sFF uV|# $**!c!ff$r) Mr+c t|dzdkrtdd}tdt|dD]}|||dz}t|}d}tdddD]}|t ||dz}t|t |dzdzz}tddd D]$}|t t ||d zd z}%|S) aqTransform an arbitrary key into a string containing English words. Example:: >>> from Crypto.Util.RFC1751 import key_to_english >>> key_to_english(b'66666666') 'RAM LOIS GOAD CREW CARE HIT' Args: key (byte string): The key to convert. Its length must be a multiple of 8. Return: A string of English words. rrz.The length of the key must be a multiple of 8.r.@r rr )len ValueErrorranger3r<rwordliststrip)r7englishindexsubkeyskbinpis r)key_to_englishrL7s  3xx!|qIJJJGq#c((A&& G GU519_%   q"a * *AHUAq)))AA$Q#~"6"6677q"b!! G GA%B)?)? @@3FGG G ==??r+c|}d}tdt|dD]}|||dz}ddgz}d}|D]}t|}d|dzdzz dz}||z} | dz | dz dz| dz} } } |d krI||d z | z||d z <||d z d z| z||d z d z<||d z d z| z||d z d z<nI|d kr/||d z | z||d z <||d z d z| z||d z d z<n||d z | z||d z <|dz}d} |D]} | t | z} t| }d}tddd D]}|t||d z}|d zt|dd krtd|| ddz}|S)azTransform a string into a corresponding key. Example:: >>> from Crypto.Util.RFC1751 import english_to_key >>> english_to_key('RAM LOIS GOAD CREW CARE HIT') b'66666666' Args: s (string): the string with the words separated by whitespace; the number of words must be a multiple of 6. Return: A byte string. r+rrrrrr?rr rr r>zParity error in resulting key) uppersplitrCrArDrGrr3r<rB)r1Lr7rGsublistcharbitsrKshiftr;clcccrrHrIrJs r)english_to_keyrZZsK  A Cq#a&&!$$  E%!)O$A3w  ANN1%%E$)q(A-EAr'Q!VtOQXBB "&tqy/B"6TQY(,dai1_(=(Bdai1_%(,dai1_(=(Bdai1_%%"&tqy/B"6TQY(,dai1_(=(Bdai1_%%"&tqy/B"6TQY"9DD & &Ad1gg%FF   q"a * *AHUAq)))AA Ehub!,, , ,<== =F1Q3K Jr+(AABEACEACTADADAADDAGOAIDAIMAIRALLALPAMAMYANANAANDANNANTANYAPEAPSAPTARCAREARKARMARTASASHASKATATEAUGAUKAVEAWEAWKAWLAWNAXAYEBADBAGBAHBAMBANBARBATBAYBEBEDBEEBEGBENBETBEYBIBBIDBIGBINBITBOBBOGBONBOOBOPBOWBOYBUBBUDBUGBUMBUNBUSBUTBUYBYBYECABCALCAMCANCAPCARCATCAWCODCOGCOLCONCOOCOPCOTCOWCOYCRYCUBCUECUPCURCUTDABDADDAMDANDARDAYDEEDELDENDESDEWDIDDIEDIGDINDIPDODOEDOGDONDOTDOWDRYDUBDUDDUEDUGDUNEAREATEDEELEGGEGOELIELKELMELYEMENDESTETCEVAEVEEWEEYEFADFANFARFATFAYFEDFEEFEWFIBFIGFINFIRFITFLOFLYFOEFOGFORFRYFUMFUNFURGABGADGAGGALGAMGAPGASGAYGEEGELGEMGETGIGGILGINGOGOTGUMGUNGUSGUTGUYGYMGYPHAHADHALHAMHANHAPHASHATHAWHAYHEHEMHENHERHEWHEYHIHIDHIMHIPHISHITHOHOBHOCHOEHOGHOPHOTHOWHUBHUEHUGHUHHUMHUTIICYIDAIFIKEILLINKINNIOIONIQIRAIREIRKISITITSIVYJABJAGJAMJANJARJAWJAYJETJIGJIMJOJOBJOEJOGJOTJOYJUGJUTKAYKEGKENKEYKIDKIMKINKITLALABLACLADLAGLAMLAPLAWLAYLEALEDLEELEGLENLEOLETLEWLIDLIELINLIPLITLOLOBLOGLOPLOSLOTLOULOWLOYLUGLYEMAMACMADMAEMANMAOMAPMATMAWMAYMEMEGMELMENMETMEWMIDMINMITMOBMODMOEMOOMOPMOSMOTMOWMUDMUGMUMMYNABNAGNANNAPNATNAYNENEDNEENETNEWNIBNILNIPNITNONOBNODNONNORNOTNOVNOWNUNUNNUTOOAFOAKOAROATODDODEOFOFFOFTOHOILOKOLDONONEORORBOREORROSOTTOUROUTOVAOWOWEOWLOWNOXPAPADPALPAMPANPAPPARPATPAWPAYPEAPEGPENPEPPERPETPEWPHIPIPIEPINPITPLYPOPODPOEPOPPOTPOWPROPRYPUBPUGPUNPUPPUTQUORAGRAMRANRAPRATRAWRAYREBREDREPRETRIBRIDRIGRIMRIORIPROBRODROERONROTROWROYRUBRUERUGRUMRUNRYESACSADSAGSALSAMSANSAPSATSAWSAYSEASECSEESENSETSEWSHESHYSINSIPSIRSISSITSKISKYSLYSOSOBSODSONSOPSOWSOYSPASPYSUBSUDSUESUMSUNSUPTABTADTAGTANTAPTARTEATEDTEETENTHETHYTICTIETIMTINTIPTOTOETOGTOMTONTOOTOPTOWTOYTRYTUBTUGTUMTUNTWOUNUPUSUSEVANVATVETVIEWADWAGWARWASWAYWEWEBWEDWEEWETWHOWHYWINWITWOKWONWOOWOWWRYWUYAMYAPYAWYEYEAYESYETYOUABEDABELABETABLEABUTACHEACIDACMEACREACTAACTSADAMADDSADENAFARAFROAGEEAHEMAHOYAIDAAIDEAIDSAIRYAJARAKINALANALECALGAALIAALLYALMAALOEALSOALTOALUMALVAAMENAMESAMIDAMMOAMOKAMOSAMRAANDYANEWANNAANNEANTEANTIAQUAARABARCHAREAARGOARIDARMYARTSARTYASIAASKSATOMAUNTAURAAUTOAVERAVIDAVISAVONAVOWAWAYAWRYBABEBABYBACHBACKBADEBAILBAITBAKEBALDBALEBALIBALKBALLBALMBANDBANEBANGBANKBARBBARDBAREBARKBARNBARRBASEBASHBASKBASSBATEBATHBAWDBAWLBEADBEAKBEAMBEANBEARBEATBEAUBECKBEEFBEENBEERBEETBELABELLBELTBENDBENTBERGBERNBERTBESSBESTBETABETHBHOYBIASBIDEBIENBILEBILKBILLBINDBINGBIRDBITEBITSBLABBLATBLEDBLEWBLOBBLOCBLOTBLOWBLUEBLUMBLURBOARBOATBOCABOCKBODEBODYBOGYBOHRBOILBOLDBOLOBOLTBOMBBONABONDBONEBONGBONNBONYBOOKBOOMBOONBOOTBOREBORGBORNBOSEBOSSBOTHBOUTBOWLBOYDBRADBRAEBRAGBRANBRAYBREDBREWBRIGBRIMBROWBUCKBUDDBUFFBULBBULKBULLBUNKBUNTBUOYBURGBURLBURNBURRBURTBURYBUSHBUSSBUSTBUSYBYTECADYCAFECAGECAINCAKECALFCALLCALMCAMECANECANTCARDCARECARLCARRCARTCASECASHCASKCASTCAVECEILCELLCENTCERNCHADCHARCHATCHAWCHEFCHENCHEWCHICCHINCHOUCHOWCHUBCHUGCHUMCITECITYCLADCLAMCLANCLAWCLAYCLODCLOGCLOTCLUBCLUECOALCOATCOCACOCKCOCOCODACODECODYCOEDCOILCOINCOKECOLACOLDCOLTCOMACOMBCOMECOOKCOOLCOONCOOTCORDCORECORKCORNCOSTCOVECOWLCRABCRAGCRAMCRAYCREWCRIBCROWCRUDCUBACUBECUFFCULLCULTCUNYCURBCURDCURECURLCURTCUTSDADEDALEDAMEDANADANEDANGDANKDAREDARKDARNDARTDASHDATADATEDAVEDAVYDAWNDAYSDEADDEAFDEALDEANDEARDEBTDECKDEEDDEEMDEERDEFTDEFYDELLDENTDENYDESKDIALDICEDIEDDIETDIMEDINEDINGDINTDIREDIRTDISCDISHDISKDIVEDOCKDOESDOLEDOLLDOLTDOMEDONEDOOMDOORDORADOSEDOTEDOUGDOURDOVEDOWNDRABDRAGDRAMDRAWDREWDRUBDRUGDRUMDUALDUCKDUCTDUELDUETDUKEDULLDUMBDUNEDUNKDUSKDUSTDUTYEACHEARLEARNEASEEASTEASYEBENECHOEDDYEDENEDGEEDGYEDITEDNAEGANELANELBAELLAELSEEMILEMITEMMAENDSERICEROSEVENEVEREVILEYEDFACEFACTFADEFAILFAINFAIRFAKEFALLFAMEFANGFARMFASTFATEFAWNFEARFEATFEEDFEELFEETFELLFELTFENDFERNFESTFEUDFIEFFIGSFILEFILLFILMFINDFINEFINKFIREFIRMFISHFISKFISTFITSFIVEFLAGFLAKFLAMFLATFLAWFLEAFLEDFLEWFLITFLOCFLOGFLOWFLUBFLUEFOALFOAMFOGYFOILFOLDFOLKFONDFONTFOODFOOLFOOTFORDFOREFORKFORMFORTFOSSFOULFOURFOWLFRAUFRAYFREDFREEFRETFREYFROGFROMFUELFULLFUMEFUNDFUNKFURYFUSEFUSSGAFFGAGEGAILGAINGAITGALAGALEGALLGALTGAMEGANGGARBGARYGASHGATEGAULGAURGAVEGAWKGEARGELDGENEGENTGERMGETSGIBEGIFTGILDGILLGILTGINAGIRDGIRLGISTGIVEGLADGLEEGLENGLIBGLOBGLOMGLOWGLUEGLUMGLUTGOADGOALGOATGOERGOESGOLDGOLFGONEGONGGOODGOOFGOREGORYGOSHGOUTGOWNGRABGRADGRAYGREGGREWGREYGRIDGRIMGRINGRITGROWGRUBGULFGULLGUNKGURUGUSHGUSTGWENGWYNHAAGHAASHACKHAILHAIRHALEHALFHALLHALOHALTHANDHANGHANKHANSHARDHARKHARMHARTHASHHASTHATEHATHHAULHAVEHAWKHAYSHEADHEALHEARHEATHEBEHECKHEEDHEELHEFTHELDHELLHELMHERBHERDHEREHEROHERSHESSHEWNHICKHIDEHIGHHIKEHILLHILTHINDHINTHIREHISSHIVEHOBOHOCKHOFFHOLDHOLEHOLMHOLTHOMEHONEHONKHOODHOOFHOOKHOOTHORNHOSEHOSTHOURHOVEHOWEHOWLHOYTHUCKHUEDHUFFHUGEHUGHHUGOHULKHULLHUNKHUNTHURDHURLHURTHUSHHYDEHYMNIBISICONIDEAIDLEIFFYINCAINCHINTOIONSIOTAIOWAIRISIRMAIRONISLEITCHITEMIVANJACKJADEJAILJAKEJANEJAVAJEANJEFFJERKJESSJESTJIBEJILLJILTJIVEJOANJOBSJOCKJOELJOEYJOHNJOINJOKEJOLTJOVEJUDDJUDEJUDOJUDYJUJUJUKEJULYJUNEJUNKJUNOJURYJUSTJUTEKAHNKALEKANEKANTKARLKATEKEELKEENKENOKENTKERNKERRKEYSKICKKILLKINDKINGKIRKKISSKITEKLANKNEEKNEWKNITKNOBKNOTKNOWKOCHKONGKUDOKURDKURTKYLELACELACKLACYLADYLAIDLAINLAIRLAKELAMBLAMELANDLANELANGLARDLARKLASSLASTLATELAUDLAVALAWNLAWSLAYSLEADLEAFLEAKLEANLEARLEEKLEERLEFTLENDLENSLENTLEONLESKLESSLESTLETSLIARLICELICKLIEDLIENLIESLIEULIFELIFTLIKELILALILTLILYLIMALIMBLIMELINDLINELINKLINTLIONLISALISTLIVELOADLOAFLOAMLOANLOCKLOFTLOGELOISLOLALONELONGLOOKLOONLOOTLORDLORELOSELOSSLOSTLOUDLOVELOWELUCKLUCYLUGELUKELULULUNDLUNGLURALURELURKLUSHLUSTLYLELYNNLYONLYRAMACEMADEMAGIMAIDMAILMAINMAKEMALEMALIMALLMALTMANAMANNMANYMARCMAREMARKMARSMARTMARYMASHMASKMASSMASTMATEMATHMAULMAYOMEADMEALMEANMEATMEEKMEETMELDMELTMEMOMENDMENUMERTMESHMESSMICEMIKEMILDMILEMILKMILLMILTMIMIMINDMINEMINIMINKMINTMIREMISSMISTMITEMITTMOANMOATMOCKMODEMOLDMOLEMOLLMOLTMONAMONKMONTMOODMOONMOORMOOTMOREMORNMORTMOSSMOSTMOTHMOVEMUCHMUCKMUDDMUFFMULEMULLMURKMUSHMUSTMUTEMUTTMYRAMYTHNAGYNAILNAIRNAMENARYNASHNAVENAVYNEALNEARNEATNECKNEEDNEILNELLNEONNERONESSNESTNEWSNEWTNIBSNICENICKNILENINANINENOAHNODENOELNOLLNONENOOKNOONNORMNOSENOTENOUNNOVANUDENULLNUMBOATHOBEYOBOEODINOHIOOILYOINTOKAYOLAFOLDYOLGAOLINOMANOMENOMITONCEONESONLYONTOONUSORALORGYOSLOOTISOTTOOUCHOUSTOUTSOVALOVENOVEROWLYOWNSQUADQUITQUODRACERACKRACYRAFTRAGERAIDRAILRAINRAKERANKRANTRARERASHRATERAVERAYSREADREALREAMREARRECKREEDREEFREEKREELREIDREINRENARENDRENTRESTRICERICHRICKRIDERIFTRILLRIMERINGRINKRISERISKRITEROADROAMROARROBEROCKRODEROILROLLROMEROODROOFROOKROOMROOTROSAROSEROSSROSYROTHROUTROVEROWEROWSRUBERUBYRUDERUDYRUINRULERUNGRUNSRUNTRUSERUSHRUSKRUSSRUSTRUTHSACKSAFESAGESAIDSAILSALESALKSALTSAMESANDSANESANGSANKSARASAULSAVESAYSSCANSCARSCATSCOTSEALSEAMSEARSEATSEEDSEEKSEEMSEENSEESSELFSELLSENDSENTSETSSEWNSHAGSHAMSHAWSHAYSHEDSHIMSHINSHODSHOESHOTSHOWSHUNSHUTSICKSIDESIFTSIGHSIGNSILKSILLSILOSILTSINESINGSINKSIRESITESITSSITUSKATSKEWSKIDSKIMSKINSKITSLABSLAMSLATSLAYSLEDSLEWSLIDSLIMSLITSLOBSLOGSLOTSLOWSLUGSLUMSLURSMOGSMUGSNAGSNOBSNOWSNUBSNUGSOAKSOARSOCKSODASOFASOFTSOILSOLDSOMESONGSOONSOOTSORESORTSOULSOURSOWNSTABSTAGSTANSTARSTAYSTEMSTEWSTIRSTOWSTUBSTUNSUCHSUDSSUITSULKSUMSSUNGSUNKSURESURFSWABSWAGSWAMSWANSWATSWAYSWIMSWUMTACKTACTTAILTAKETALETALKTALLTANKTASKTATETAUTTEALTEAMTEARTECHTEEMTEENTEETTELLTENDTENTTERMTERNTESSTESTTHANTHATTHEETHEMTHENTHEYTHINTHISTHUDTHUGTICKTIDETIDYTIEDTIERTILETILLTILTTIMETINATINETINTTINYTIRETOADTOGOTOILTOLDTOLLTONETONGTONYTOOKTOOLTOOTTORETORNTOTETOURTOUTTOWNTRAGTRAMTRAYTREETREKTRIGTRIMTRIOTRODTROTTROYTRUETUBATUBETUCKTUFTTUNATUNETUNGTURFTURNTUSKTWIGTWINTWITULANUNITURGEUSEDUSERUSESUTAHVAILVAINVALEVARYVASEVASTVEALVEDAVEILVEINVENDVENTVERBVERYVETOVICEVIEWVINEVISEVOIDVOLTVOTEWACKWADEWAGEWAILWAITWAKEWALEWALKWALLWALTWANDWANEWANGWANTWARDWARMWARNWARTWASHWASTWATSWATTWAVEWAVYWAYSWEAKWEALWEANWEARWEEDWEEKWEIRWELDWELLWELTWENTWEREWERTWESTWHAMWHATWHEEWHENWHETWHOAWHOMWICKWIFEWILDWILLWINDWINEWINGWINKWINOWIREWISEWISHWITHWOLFWONTWOODWOOLWORDWOREWORKWORMWORNWOVEWRITWYNNYALEYANGYANKYARDYARNYAWLYAWNYEAHYEARYELLYOGAYOKE) __future__rbinasciiCrypto.Util.py3compatrrr-r3r<rLrZrDr+r)r_s16&%%%%%,,,,,,,, :!V :Q :6 :1f :a :F : V : : !6 :+,f :68& :BDf : f :& :"$f :.0& :    F222js s s r+