module VARS

file_rock.rb

Copyright © July 3, 2014

Author: Abbas Taghiloei AKA MR.0x41 <ox41_a@yahoo.com>

License

The MIT License (MIT)

Copyright © [2014] [file_rock v 0.0.2 Ruby Gem]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Public Instance Methods

vars(sett) click to toggle source
# File lib/filerock/vars.rb, line 33
def vars(sett)
        @sett = {:space => "ON", :size => 23}
        @sett = @sett.merge(sett)
        @header = ["jP", "ftyp3gp", "ftypisom", "ftypqt", "ftyp3gp5", "ftypmp42", "ftypMSNV", "ftypM4A", "IIXPR", "MMXPR", "MSISAM Database", "Standard ACE DB",
                "Standard Jet DB", "APPR", "dt2ddtd", "org.bitcoin.pr", "NeroISO", "RTS COMPRESSED IMAGE", "Disk Descripto", "Microsoft Developer Studio", "bitmap",
                "LfLe", 
                "8BPS", ":VERSION", "<!doctyp", "<MakerFile", "ACSD", "AES", "AMYO", "AOL Feedbag", "AOLDB", "AOLIDX", "AOLINDEX", "AOLVM100", "BEGIN:VCARD", 
                "BLI223", "BOOKMOBI", "Blink by D.T.S", "CBFILE", "CD001", "CISO", "CPT7FILE", "CPTFILE", "CREG", "Calculux Indoor", "Client UrlCache MMF Ver", 
                "ELITE Commander", "ENTRYVCD", "ERFSSAVEDATAFILE", "ElfFile", "GF1PATCH", "GIF87a", "GIF89a", 
                "Genetec Omnicast", "ITOLITLS", "ITSF", "MSFT", "MSWIM", "MZ", "MsRcf", "NAVTRAFFIC", "NESM", "NITF0", "Name:", "OPCLDAT", "OPLDatabaseFile", 
                "PAGEDU64", "PAGEDUMP", "PEST", "PGPdMAIN", "PKLITE", "PKSFX", "PMCC", "PNCIUNDO", "PMOCCMOC", "PUFX", "RAZATDB1", "REGEDIT", "RTSS", 
                "SCMI", "SHOW", "SMARTDRW", "SPFI", "SPVB", "SQLOCONVHD", "SQLite format 3", "StuffIt (c)1997", "riff", "pdf", "JFIF", "Exif", "SPIFF"]

        @type = ["Various JPEG-2000 image file format", 
                "3rd Generation Partnership Project 3GPP", "ISO Base Media file (MPEG-4) v1", "QuickTime movie file", "MPEG-4 video file", 
                "MPEG-4 video/QuickTime file", "MPEG-4 video file", "Apple Lossless Audio Codec file", "Quark Express document", "Quark Express document", 
                "Microsoft Money file", "Microsoft Access 2007 file", "Microsoft Access file", "Approach index file", "DesignTools 2D Design file", 
                "MultiBit Bitcoin wallet file", "Nero CD Compilation", "Runtime Software compressed disk image", 
                "VMware 4 Virtual Disk description file (split disk)", "Microsoft Developer Studio project file", 
                "Fuzzy bitmap (FBM) file", "Windows Event Viewer file", "Photoshop image file", "Surfplan kite project file", 
                "AOL HTML mail file", "Adobe FrameMaker file", "Miscellaneous AOL parameter and information files", "AES Crypt file format", 
                "Harvard Graphics symbol graphic", "AOL and AIM buddy list file", "AOL database files: address book (ABY) and user configuration data (MAIN.IDX)", 
                "AOL client preferences/settings file (MAIN.IND)", "AOL address book index file", "AOL personal file cabinet (PFC) file", "vCard file", 
                "Thomson Speedtouch series WLAN router firmware", "Palmpilot resource file", "BLINK compressed archive", 
                "WordPerfect dictionary file (unconfirmed)", "ISO-9660 CD Disc Image", "Compressed ISO (CISO) CD image", "Corel Photopaint file", 
                "Corel Photopaint file", 
                "Windows 9x registry hive", "Calculux Indoor lighting design software project file", "Microsoft Internet Explorer cache file (index.dat) file", 
                "Elite Plus Commander saved game file", "VideoVCD (GNU VCDImager) file", "Kroll EasyRecovery Saved Recovery State file",
                "Windows Vista event log file", "Advanced Gravis Ultrasound patch file", "Graphics interchange format file", "Graphics interchange format file", 
                "Genetec video archive", "Microsoft Reader eBook file", "Microsoft Compiled HTML Help File", 
                "OLE, SPSS, or Visual C++ type library file", "Microsoft Windows Imaging Format file", "Windows/DOS executable file", 
                "VMapSource GPS Waypoint Database", "TomTom traffic data file", "NES Sound file", 
                "National Imagery Transmission Format (NITF) file", "Agent newsreader character map file", "1Password 4 Cloud Keychain encrypted attachment", 
                "Psion Series 3 Database file", "Windows 64-bit memory dump", "Windows memory dump", "PestPatrol data/scan strings", "PGP disk image", 
                "PKLITE compressed ZIP archive (see also PKZIP)", "PKSFX self-extracting executable compressed file", "Windows Program Manager group file", 
                "Norton Disk Doctor undo file", "Microsoft Windows User State Migration Tool (USMT)", "Puffer encrypted archive", 
                "Shareaza (Windows P2P client) thumbnail", "Windows NT Registry and Registry Undo files", "Windows NT Netmon capture file", 
                "Img Software Set Bitmap", "Harvard Graphics DOS Ver. 2/x Presentation file", "SmartDraw Drawing file", "StorageCraft ShadownProtect backup file", 
                "MultiBit Bitcoin blockchain file", "DB2 conversion file", "SQLite database file", "StuffIt compressed archive", 
                "Sonic Foundry Acid Music File (Sony)", "Adobe Portable Document Format and Forms Document file", "JPEG/JFIF graphics file", 
                "JPEG/JFIF graphics file", "JPEG/JFIF graphics file"]

        @hexhead = ["5C41B1FF", "00FFFFFFFFFFFFFFFFFFFF0000020001", "02647373", "07534B46", "0D444F43", "0E574B53", "53434341", "1A45DFA3", 
                "1A45DFA3934282886D6174726F736B61", 
                "213C617263683E0A", "2142444E", "2321414D52", "233F52414449414E43450A", "25504446", "2E524543", "2E524D46", "2E736E64", 
                "3026B2758E66CF11A6D900AA0062CE6C", "377ABCAF271C", 
                "37E45396C9DBD607", "3C7E363C5C255F30675371683B", "43232B44A4434DA5486472", "43525553482076", "44415800", "44424648",
                "444D5321", "455646090D0AFF", "464158434F5645522D564552", "4644424800", "464C5601", "464F524D00", "47504154", "4A4152435300", 
                "4D41523100", "4D494C4553", "4D4C5357", "4D52564E", "4D535F564F494345", "4D6963726F736F667420432F432B2B20", "4E422A00", 
                "504943540008", "514649FB", "5245564E554D3A2C", "526172211A0700", "526172211A070100", "FFD8FFE8", "FFD8FFE1", "FEEDFEED", "FEEDFACF", 
                "FEEDFACE", "FD377A585A00", "F9BEB4D9", "E4525C7B8CD8A74DAEB15378D02996D3", "D7CDC69A", "D4C3B2A1", "CF11E0A1B11AE100", "CECECECE", 
                "CD20AAAA02", "CAFEBABE", "C5D0D3C6", "C3ABCDAB", "BEBAFECA0F50616C6D53472044617461", "B5A2B0B3B3B0A5B5", "B46E6844", "B168DE3A", 
                "B04D4643", "AC9EBD8F0000", "A1B2CD34", "A1B2C3D4", "A0461DF0", "89504E470D0A1A0A", "72656766", "504B"]

        @hextype = ["Mujahideen Secrets 2 encrypted file", "Alcohol 120% CD image", "Digital Speech Standard", "SkinCrafter skin file", 
                "DeskMate Document file", "DeskMate Worksheet", "Windows prefetch file", "WebM video file", "Matroska stream file", 
                "Unix archiver (ar) files and Microsoft Program Library", 
                "Microsoft Outlook Personal Folder File", "Adaptive Multi-Rate ACELP", "Radiance High Dynamic Range image file", 
                "Adobe Portable Document Format and Forms Document file", "RealPlayer video file (V11 and later)", "RealMedia streaming media file", 
                "NeXT/Sun Microsystems Law audio file", "Microsoft Windows Media Audio/Video File", "7-Zip compressed file", "zisofs compression format", 
                "ASCII85 (aka BASE85) encoded file", "RagTime document file", "Crush compressed archive", "DAX Compressed CD image", "Palm Zire photo database", 
                "Amiga DiskMasher compressed archive", "Expert Witness Compression Format (EWF) file", "Microsoft Fax Cover Sheet", 
                "Fiasco database definition file", "Flash video file", "Audio Interchange File", "GIMP (GNU Image Manipulation Program) pattern file", 
                "JARCS compressed archive", "Mozilla archive", 
                "Milestones v1.0 project management and scheduling software", "Skype localization data file", "VMware BIOS (non-volatile RAM) state file", 
                "Sony Compressed Voice File", "Microsoft C++ debugging symbols file", "MS Windows journal file", 
                "ADEX Corp. ChromaGraph Graphics Card Bitmap Graphic file", "QEMU Qcow Disk Image", "Antenna data file", "RAR (v4.x) compressed archive file", 
                "RAR (v5) compressed archive file", "Digital camera JPG", "Digital camera JPG", "JavaKeyStore file", "Apple OS X ABI Mach-O binary file (64-bit)", 
                "Apple OS X ABI Mach-O binary file (32-bit)", "XZ archive file", "Bitcoin-Qt blockchain block file", "Microsoft OneNote note", 
                "Windows graphics metafile", "WinDump (winpcap) capture file (Windows)", "Perfect Office document", "Java Cryptography Extension keystore file", 
                "Norton Anti-Virus quarantined virus file", "Java bytecode file (also used by Apple iOS apps)", "Adobe encapsulated PostScript file", 
                "MS Agent Character file", "Palm Desktop DateBook file", "Windows calendar file", "Acronis True Image file", "Graphics Multipage PCX bitmap file", 
                "Windows 95 password file", "Quicken data file", "Extended tcpdump (libpcap) capture file (Linux/Unix)", 
                "tcpdump (libpcap) capture file (Linux/Unix)", "PowerPoint presentation subheader (MS Office)", "Portable Network Graphics file", 
                "Windows NT registry hive file", "Microsoft Office Open XML Format (OOXML) Document"]

                if(@sett[:file] == nil)
                        raise 'No file address input. Please send the file address as an input.'
                end
end