├── .gitattributes ├── .gitignore ├── Mac_Script_Launcher.applescript ├── Mac_inject_launcher.app └── Contents │ ├── Info.plist │ ├── MacOS │ └── applet │ ├── PkgInfo │ └── Resources │ ├── Scripts │ └── main.scpt │ ├── applet.icns │ ├── applet.rsrc │ └── description.rtfd │ └── TXT.rtf ├── applet.icns ├── go.bat ├── go.sh ├── input └── dummy.txt ├── readme.md └── tools ├── 3dstool-Darwin ├── 3dstool-Linux-i686 ├── 3dstool-Linux-x86_64 ├── 3dstool.exe ├── MergeExHeader-Darwin ├── MergeExHeader-Linux-i686 ├── MergeExHeader-Linux-x86_64 ├── MergeExHeader.exe ├── MergeExHeader_source.zip ├── ctrtool-Darwin ├── ctrtool-Linux-i686 ├── ctrtool-Linux-x86_64 ├── ctrtool.exe ├── dummy.bin ├── ignore_3dstool.txt ├── process.bat └── process.sh /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Custom ignore files 2 | work/ 3 | *.app 4 | *.cia 5 | /*.zip 6 | /*.7z 7 | 8 | # Windows image file caches 9 | Thumbs.db 10 | ehthumbs.db 11 | 12 | # Folder config file 13 | Desktop.ini 14 | 15 | # Recycle Bin used on file shares 16 | $RECYCLE.BIN/ 17 | 18 | # Windows Installer files 19 | *.cab 20 | *.msi 21 | *.msm 22 | *.msp 23 | 24 | # Windows shortcuts 25 | *.lnk 26 | 27 | # ========================= 28 | # Operating System Files 29 | # ========================= 30 | 31 | # OSX 32 | # ========================= 33 | 34 | .DS_Store 35 | .AppleDouble 36 | .LSOverride 37 | 38 | # Thumbnails 39 | ._* 40 | 41 | # Files that might appear on external disk 42 | .Spotlight-V100 43 | .Trashes 44 | 45 | # Directories potentially created on remote AFP share 46 | .AppleDB 47 | .AppleDesktop 48 | Network Trash Folder 49 | Temporary Items 50 | .apdisk 51 | -------------------------------------------------------------------------------- /Mac_Script_Launcher.applescript: -------------------------------------------------------------------------------- 1 | activate 2 | display dialog "Make sure this script is placed in your Universal Inject Generator folder before proceeding!" buttons {"Quit", "Proceed"} default button 2 3 | if button returned of result is "Quit" then 4 | error number -128 5 | end if 6 | 7 | 8 | set UnixPath to POSIX path of ((path to me as text) & "::") 9 | set QuotedPath to quoted form of UnixPath 10 | 11 | tell application "Terminal" 12 | reopen 13 | activate 14 | do script "cd " & QuotedPath in window 1 15 | delay 1 16 | do script "./go.sh" in window 1 17 | end tell 18 | 19 | -------------------------------------------------------------------------------- /Mac_inject_launcher.app/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleAllowMixedLocalizations 6 | 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | applet 11 | CFBundleIconFile 12 | applet 13 | CFBundleIdentifier 14 | com.apple.ScriptEditor.id.script-test 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | Universal Injector Script for Mac 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | 1.0 23 | CFBundleSignature 24 | aplt 25 | LSMinimumSystemVersionByArchitecture 26 | 27 | x86_64 28 | 10.6 29 | 30 | LSRequiresCarbon 31 | 32 | NSHumanReadableCopyright 33 | by blackalabi (/u/aftheblackguy) 34 | WindowState 35 | 36 | bundleDividerCollapsed 37 | 38 | bundlePositionOfDivider 39 | 1145 40 | dividerCollapsed 41 | 42 | eventLogLevel 43 | -1 44 | name 45 | ScriptWindowState 46 | positionOfDivider 47 | 451 48 | savedFrame 49 | 188 94 1444 702 0 0 1680 1027 50 | selectedTab 51 | result 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /Mac_inject_launcher.app/Contents/MacOS/applet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d0k3/Universal-Inject-Generator/a9109b3dd48ecb37838976726afdb25ad6fd2d45/Mac_inject_launcher.app/Contents/MacOS/applet -------------------------------------------------------------------------------- /Mac_inject_launcher.app/Contents/PkgInfo: -------------------------------------------------------------------------------- 1 | APPLaplt -------------------------------------------------------------------------------- /Mac_inject_launcher.app/Contents/Resources/Scripts/main.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d0k3/Universal-Inject-Generator/a9109b3dd48ecb37838976726afdb25ad6fd2d45/Mac_inject_launcher.app/Contents/Resources/Scripts/main.scpt -------------------------------------------------------------------------------- /Mac_inject_launcher.app/Contents/Resources/applet.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d0k3/Universal-Inject-Generator/a9109b3dd48ecb37838976726afdb25ad6fd2d45/Mac_inject_launcher.app/Contents/Resources/applet.icns -------------------------------------------------------------------------------- /Mac_inject_launcher.app/Contents/Resources/applet.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d0k3/Universal-Inject-Generator/a9109b3dd48ecb37838976726afdb25ad6fd2d45/Mac_inject_launcher.app/Contents/Resources/applet.rsrc -------------------------------------------------------------------------------- /Mac_inject_launcher.app/Contents/Resources/description.rtfd/TXT.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf460 2 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 3 | {\colortbl;\red255\green255\blue255;} 4 | \paperw12240\paperh15840\vieww10800\viewh8400\viewkind0 5 | \pard\tx577\tx1155\tx1733\tx2311\tx2889\tx3467\tx4045\tx4623\tx5201\tx5779\tx6357\tx6935\tx7513\tx8091\tx8669\tx9247\tx9825\tx10403\tx10981\tx11559\tx12137\tx12715\tx13293\tx13871\tx14449\tx15027\tx15605\tx16183\tx16761\tx17339\tx17917\tx18495\tx19072\tx19650\tx20228\tx20806\tx21384\tx21962\tx22540\tx23118\tx23696\tx24274\tx24852\tx25430\tx26008\tx26586\tx27164\tx27742\tx28320\tx28898\tx29476\tx30054\tx30632\tx31210\tx31788\tx32366\tx32944\tx33522\tx34100\tx34678\tx35256\tx35834\tx36412\tx36990\tx37567\tx38145\tx38723\tx39301\tx39879\tx40457\tx41035\tx41613\tx42191\tx42769\tx43347\tx43925\tx44503\tx45081\tx45659\tx46237\tx46815\tx47393\tx47971\tx48549\tx49127\tx49705\tx50283\tx50861\tx51439\tx52017\tx52595\tx53173\tx53751\tx54329\tx54907\tx55485\tx56062\tx56640\tx57218\tx57796\pardirnatural\partightenfactor0 6 | 7 | \f0\fs24 \cf0 A simple applescript application to automate the use of the Universal Inject Generator.\CocoaLigature0 \ 8 | \CocoaLigature1 Simply copy to the injector folder, make sure the required folders are in the input folder and run application.\CocoaLigature0 \ 9 | \ 10 | \ 11 | \CocoaLigature1 by blackalabi (/u/afttheblackguy)\CocoaLigature0 \ 12 | \ 13 | Credit goes to d0k3 for creating the Universal Inject Generator.} -------------------------------------------------------------------------------- /applet.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d0k3/Universal-Inject-Generator/a9109b3dd48ecb37838976726afdb25ad6fd2d45/applet.icns -------------------------------------------------------------------------------- /go.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | if exist input\hs.app (for %%x in (input\*.cia) do call tools\process.bat "%%x" input\hs.app) else (echo [!] hs.app not found, use Decrypt9 to dump it on your 3DS) 3 | pause 4 | -------------------------------------------------------------------------------- /go.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -e input/hs.app ] 4 | then for x in input/*.cia; do . tools/process.sh $x input/hs.app; done 5 | else printf "ERROR: hs.app not found\nPlease generate hs.app with Decrypt9 and put it into the input folder\n" 6 | fi 7 | -------------------------------------------------------------------------------- /input/dummy.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d0k3/Universal-Inject-Generator/a9109b3dd48ecb37838976726afdb25ad6fd2d45/input/dummy.txt -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | **Universal Inject Generator** 2 | 3 | 4 | This script will generate inject-ready apps from homebrew CIAs to inject over the Health & Safety app in the 3DS console. The package includes code by @Syphurith, CTRtool (by profi200) and 3DStool (by dnasdw). 5 | 6 | This is used in conjunction with most recent (mine) Decrypt9's "Dump Health&Safety" and "Inject Health&Safety" features. You can only inject .apps smaller or equal in size to the original H&S app. Decrypt9 has a safety check build in and won't proceed with bigger ones. Per CIA, two inject apps will be created - with and without banner - the one with a banner is preferable, but may be to large to inject. 7 | 8 | This is how it works: 9 | * Put hs.app (dumped via Decrypt9) plus as many homebrew CIAs as you like into the input folder. 10 | * Run go.bat, you'll get one inject-ready .app per CIA. 11 | * If the last one for some reason doesn't work, you may try deep-decrypting (via Decrypt9) your CIAs first. 12 | * To inject, rename inject-ready .app to hs.app, put it into the root of your 3DS SD card and inject via Decrypt9. 13 | 14 | Linux users: you need `libstdc++6` and `gcc` installed. Ubuntu users also need to update to the toolchain version as described here: http://stackoverflow.com/a/16605759/4666756 15 | 16 | You should always generate your inject-ready .apps yourself and never take ones from other persons. There might be a version mismatch in the H&S app, leading to it not working otherwise. 17 | 18 | Discuss this script here: http://gbatemp.net/threads/project-injecting-any-app-into-health-and-safety.401697/ 19 | -------------------------------------------------------------------------------- /tools/3dstool-Darwin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d0k3/Universal-Inject-Generator/a9109b3dd48ecb37838976726afdb25ad6fd2d45/tools/3dstool-Darwin -------------------------------------------------------------------------------- /tools/3dstool-Linux-i686: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d0k3/Universal-Inject-Generator/a9109b3dd48ecb37838976726afdb25ad6fd2d45/tools/3dstool-Linux-i686 -------------------------------------------------------------------------------- /tools/3dstool-Linux-x86_64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d0k3/Universal-Inject-Generator/a9109b3dd48ecb37838976726afdb25ad6fd2d45/tools/3dstool-Linux-x86_64 -------------------------------------------------------------------------------- /tools/3dstool.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d0k3/Universal-Inject-Generator/a9109b3dd48ecb37838976726afdb25ad6fd2d45/tools/3dstool.exe -------------------------------------------------------------------------------- /tools/MergeExHeader-Darwin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d0k3/Universal-Inject-Generator/a9109b3dd48ecb37838976726afdb25ad6fd2d45/tools/MergeExHeader-Darwin -------------------------------------------------------------------------------- /tools/MergeExHeader-Linux-i686: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d0k3/Universal-Inject-Generator/a9109b3dd48ecb37838976726afdb25ad6fd2d45/tools/MergeExHeader-Linux-i686 -------------------------------------------------------------------------------- /tools/MergeExHeader-Linux-x86_64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d0k3/Universal-Inject-Generator/a9109b3dd48ecb37838976726afdb25ad6fd2d45/tools/MergeExHeader-Linux-x86_64 -------------------------------------------------------------------------------- /tools/MergeExHeader.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d0k3/Universal-Inject-Generator/a9109b3dd48ecb37838976726afdb25ad6fd2d45/tools/MergeExHeader.exe -------------------------------------------------------------------------------- /tools/MergeExHeader_source.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d0k3/Universal-Inject-Generator/a9109b3dd48ecb37838976726afdb25ad6fd2d45/tools/MergeExHeader_source.zip -------------------------------------------------------------------------------- /tools/ctrtool-Darwin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d0k3/Universal-Inject-Generator/a9109b3dd48ecb37838976726afdb25ad6fd2d45/tools/ctrtool-Darwin -------------------------------------------------------------------------------- /tools/ctrtool-Linux-i686: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d0k3/Universal-Inject-Generator/a9109b3dd48ecb37838976726afdb25ad6fd2d45/tools/ctrtool-Linux-i686 -------------------------------------------------------------------------------- /tools/ctrtool-Linux-x86_64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d0k3/Universal-Inject-Generator/a9109b3dd48ecb37838976726afdb25ad6fd2d45/tools/ctrtool-Linux-x86_64 -------------------------------------------------------------------------------- /tools/ctrtool.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d0k3/Universal-Inject-Generator/a9109b3dd48ecb37838976726afdb25ad6fd2d45/tools/ctrtool.exe -------------------------------------------------------------------------------- /tools/dummy.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d0k3/Universal-Inject-Generator/a9109b3dd48ecb37838976726afdb25ad6fd2d45/tools/dummy.bin -------------------------------------------------------------------------------- /tools/ignore_3dstool.txt: -------------------------------------------------------------------------------- 1 | // regex: ECMAScript grammar and case insensitive 2 | -------------------------------------------------------------------------------- /tools/process.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | echo [!] --- UNIVERSAL INJECT GENERATOR v0.6 --- 4 | echo. 5 | echo [+] CLEAR WORKING DIRECTORY 6 | rd /s /q work 7 | echo. 8 | echo [+] IDENTIFY FILES TO WORK WITH 9 | md work 10 | copy /y /v %2 work\hs.app 11 | tools\ctrtool -x --contents work\ciacnt %1 12 | ren "work\ciacnt.0000.*" inject.app 13 | 14 | echo. 15 | echo [+] EXTRACT HS AND INJECT APP 16 | tools\3dstool -x -f work\hs.app --header work\hs_hdr.bin --exh work\hs_exhdr.bin --plain work\hs_plain.bin --logo work\hs_logo.bin --exefs work\hs_exefs.bin 17 | tools\3dstool -x -f work\inject.app --exh work\inject_exhdr.bin --exefs work\inject_exefs.bin --romfs work\inject_romfs.bin 18 | tools\3dstool -x -f work\hs_exefs.bin --exefs-dir work\hs_exefs 19 | tools\3dstool -x -f work\inject_exefs.bin --exefs-dir work\inject_exefs 20 | 21 | echo. 22 | echo [+] GENERATE NO BANNER EXEFS 23 | copy /y /v work\hs_exefs\banner.bnr work\inject_exefs\banner.bnr 24 | tools\3dstool -c -z -t exefs -f work\inject_no_banner_exefs.bin --exefs-dir work\inject_exefs --header work\inject_exefs.bin 25 | 26 | echo. 27 | echo [+] GENERATE DUMMY ROMFS 28 | md work\dummy_romfs 29 | copy /y /v tools\dummy.bin work\dummy_romfs\dummy.bin 30 | tools\3dstool -c -t romfs -f work\dummy_romfs.bin --romfs-dir work\dummy_romfs 31 | if not exist work\inject_romfs.bin (ren work\dummy_romfs.bin inject_romfs.bin) 32 | 33 | echo. 34 | echo [+] MERGE EXHEADER 35 | tools\MergeExHeader work\inject_exhdr.bin work\hs_exhdr.bin work\merge_exhdr.bin 36 | 37 | echo. 38 | echo [+] REBUILD HS INJECT APP 39 | if exist work\hs_logo.bin (tools\3dstool -c -t cxi -f %~n1_inject_no_banner.app --header work\hs_hdr.bin --exh work\merge_exhdr.bin --plain work\hs_plain.bin --logo work\hs_logo.bin --exefs work\inject_no_banner_exefs.bin --romfs work\inject_romfs.bin) else (tools\3dstool -c -t cxi -f %~n1_inject_no_banner.app --header work\hs_hdr.bin --exh work\merge_exhdr.bin --plain work\hs_plain.bin --exefs work\inject_no_banner_exefs.bin --romfs work\inject_romfs.bin) 40 | if exist work\hs_logo.bin (tools\3dstool -c -t cxi -f %~n1_inject_with_banner.app --header work\hs_hdr.bin --exh work\merge_exhdr.bin --plain work\hs_plain.bin --logo work\hs_logo.bin --exefs work\inject_exefs.bin --romfs work\inject_romfs.bin) else (tools\3dstool -c -t cxi -f %~n1_inject_with_banner.app --header work\hs_hdr.bin --exh work\merge_exhdr.bin --plain work\hs_plain.bin --exefs work\inject_exefs.bin --romfs work\inject_romfs.bin) 41 | 42 | for %%i in (work\hs.app) do set HS_ORIGINAL_SIZE=%%~zi 43 | for %%i in ("%~n1_inject_no_banner.app") do set HS_INJECT_N_SIZE=%%~zi 44 | for %%i in ("%~n1_inject_with_banner.app") do set HS_INJECT_B_SIZE=%%~zi 45 | echo [+] HS APP ORIGINAL SIZE : %HS_ORIGINAL_SIZE% byte 46 | echo [+] HS APP INJECT (N) SIZE: %HS_INJECT_N_SIZE% byte 47 | if HS_ORIGINAL_SIZE LSS HS_INJECT_N_SIZE (echo [!] INJECT APP IS BIGGER THAN HS APP) 48 | echo [+] HS APP INJECT (B) SIZE: %HS_INJECT_B_SIZE% byte 49 | if HS_ORIGINAL_SIZE LSS HS_INJECT_B_SIZE (echo [!] INJECT APP IS BIGGER THAN HS APP) 50 | echo. 51 | echo [!] --- OPERATION COMPLETE --- 52 | echo. -------------------------------------------------------------------------------- /tools/process.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | clear 4 | 5 | printf " --- UNIVERSAL INJECT GENERATOR v0.6 ---\n" 6 | printf " --- LINUX EDITION --- \n\n\n" 7 | 8 | printf "[+] IDENTIFY SYSTEM ARCHITECTURE\n" 9 | PLATFORM="$(uname)" 10 | 11 | #Differentiate between 64 and 32 bit linux 12 | if [ "$PLATFORM" == "Linux" ] 13 | then PLATFORM="$PLATFORM-$(uname -m)" 14 | fi 15 | 16 | printf "[+] IDENTIFY FILES TO WORK WITH\n" 17 | mv work work_old 18 | rm -rf work_old 19 | rm -rf hs.* 20 | mkdir work 21 | cat $2 > work/hs.app 22 | ./tools/ctrtool-"$PLATFORM" -x --contents work/ciacnt $1 &>/dev/null 23 | mv work/ciacnt.0000.* work/inject.app 24 | 25 | printf "[+] EXTRACT HS AND INJECT APP\n" 26 | ./tools/3dstool-"$PLATFORM" -x -f work/hs.app --header work/hs_hdr.bin --exh work/hs_exhdr.bin --plain work/hs_plain.bin --logo work/hs_logo.bin --exefs work/hs_exefs.bin &>/dev/null 27 | ./tools/3dstool-"$PLATFORM" -x -f work/inject.app --exh work/inject_exhdr.bin --exefs work/inject_exefs.bin --romfs work/inject_romfs.bin &>/dev/null 28 | ./tools/3dstool-"$PLATFORM" -x -f work/hs_exefs.bin --exefs-dir work/hs_exefs &>/dev/null 29 | ./tools/3dstool-"$PLATFORM" -x -f work/inject_exefs.bin --exefs-dir work/inject_exefs &>/dev/null 30 | 31 | printf "[+] GENERATE NO BANNER EXEFS\n" 32 | cp work/hs_exefs/banner.bnr work/inject_exefs/banner.bnr 33 | ./tools/3dstool-"$PLATFORM" -c -z -t exefs -f work/inject_no_banner_exefs.bin --exefs-dir work/inject_exefs --header work/inject_exefs.bin &>/dev/null 34 | 35 | printf "[+] GENERATE DUMMY ROMFS\n" 36 | mkdir work/dummy_romfs 37 | cp tools/dummy.bin work/dummy_romfs/dummy.bin 38 | ./tools/3dstool-"$PLATFORM" -c -t romfs -f work/dummy_romfs.bin --romfs-dir work/dummy_romfs &>/dev/null 39 | if [ ! -e work/inject_romfs.bin ] 40 | then mv work/dummy_romfs.bin work/inject_romfs.bin 41 | fi 42 | 43 | printf "[+] MERGE EXHEADER\n" 44 | ./tools/MergeExHeader-"$PLATFORM" work/inject_exhdr.bin work/hs_exhdr.bin work/merge_exhdr.bin &>/dev/null 45 | 46 | printf "[+] REBUILD HS INJECT APP\n" 47 | 48 | if [ -e work/hs_logo.bin ] 49 | then ./tools/3dstool-"$PLATFORM" -c -t cxi -f ${1%.*}_inject_no_banner.app --header work/hs_hdr.bin --exh work/merge_exhdr.bin --plain work/hs_plain.bin --logo work/hs_logo.bin --exefs work/inject_no_banner_exefs.bin --romfs work/inject_romfs.bin &>/dev/null 50 | else ./tools/3dstool-"$PLATFORM" -c -t cxi -f ${1%.*}_inject_no_banner.app --header work/hs_hdr.bin --exh work/merge_exhdr.bin --plain work/hs_plain.bin --exefs work/inject_no_banner_exefs.bin --romfs work/inject_romfs.bin &>/dev/null 51 | fi 52 | 53 | if [ -e work/hs_logo.bin ] 54 | then ./tools/3dstool-"$PLATFORM" -c -t cxi -f ${1%.*}_inject_with_banner.app --header work/hs_hdr.bin --exh work/merge_exhdr.bin --plain work/hs_plain.bin --logo work/hs_logo.bin --exefs work/inject_exefs.bin --romfs work/inject_romfs.bin &>/dev/null 55 | else ./tools/3dstool-"$PLATFORM" -c -t cxi -f ${1%.*}_inject_with_banner.app --header work/hs_hdr.bin --exh work/merge_exhdr.bin --plain work/hs_plain.bin --exefs work/inject_exefs.bin --romfs work/inject_romfs.bin &>/dev/null 56 | fi 57 | 58 | for i in work/hs.app; do HS_ORIGINAL_SIZE=$(ls -l $i | awk '{print $5}'); done 59 | for i in ${1%.*}_inject_no_banner.app; do HS_INJECT_N_SIZE=$(ls -l $i | awk '{print $5}'); done 60 | for i in ${1%.*}_inject_with_banner.app; do HS_INJECT_B_SIZE=$(ls -l $i | awk '{print $5}'); done 61 | 62 | mv ${1%.*}_inject_no_banner.app ./ 63 | mv ${1%.*}_inject_with_banner.app ./ 64 | 65 | printf "[+] HS APP ORIGINAL SIZE : $HS_ORIGINAL_SIZE bytes\n" 66 | printf "[+] HS APP INJECT (N) SIZE: $HS_INJECT_N_SIZE bytes\n" 67 | 68 | if [ $HS_ORIGINAL_SIZE -lt $HS_INJECT_N_SIZE ] 69 | then printf "/!\ INJECT APP IS BIGGER THAN HS APP\n" 70 | fi 71 | 72 | printf "[+] HS APP INJECT (B) SIZE: $HS_INJECT_B_SIZE bytes\n" 73 | 74 | if [ $HS_ORIGINAL_SIZE -lt $HS_INJECT_B_SIZE ] 75 | then printf "/!\ INJECT APP IS BIGGER THAN HS APP\n" 76 | fi 77 | --------------------------------------------------------------------------------