Hacking Discussion Info on SHA-256 hashes on FS patches

hippy dave

BBMB
Member
Joined
Apr 30, 2012
Messages
9,884
Trophies
2
XP
29,294
Country
United Kingdom
I ended up writing a new routine instead that creates a temp batch file and executes that instead, it's far faster now for FS patch generation. Also I added some more error checks and disabled the relevant buttons when patches are being created. Here's the new improved version.

Hopefully this should be better for now - hope you enjoy as I am away for the weekend.

I'll put the code on github this week so some of you c# guru's can make it better as my coding is not the best to be honest.
If you're using c# you could check out hactoolnet, a hactool clone written in c#. Maybe you could customize a build to suit your needs (eg. no output), or even incorporate the relevant code into your app if you felt fancy.
 
  • Like
Reactions: mrdude

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
If you're using c# you could check out hactoolnet, a hactool clone written in c#. Maybe you could customize a build to suit your needs (eg. no output), or even incorporate the relevant code into your app if you felt fancy.
It would probably be faster just to mod hactool source code and add a switch to disable the output. I forgot all about hactoolnet tbh, I'll check it later once I have more time to mess about with it.
 

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
@hippy dave

I had a look at hactoolnet and it seems much faster than hactool, you can see the difference if you extract a file, I'll use fw14.1.2 as an example.

Make a folder called Temp to extract the files, in the same place you have hactool and hactoolnet

In a command prompt type this:
Code:
hactoolnet.exe -k keys.dat --disablekeywarns -t nca 8d9c654ef632ffdb8928a789c8d41556.nca --section0dir Temp/Fat

hactool -t nca --keyset=keys.dat --section0dir=Temp/Fat 8d9c654ef632ffdb8928a789c8d41556.nca

You can see the difference in speed, hactoolnet is faster. So I might switch the program to use that to gain the speed increase.
 
Last edited by mrdude,

josete2k

Well-Known Member
Member
Joined
Apr 24, 2009
Messages
678
Trophies
1
Age
43
Location
Spain
XP
1,603
Country
Spain
I ended up writing a new routine instead that creates a temp batch file and executes that instead, it's far faster now for FS patch generation. Also I added some more error checks and disabled the relevant buttons when patches are being created. Here's the new improved version.

Hopefully this should be better for now - hope you enjoy as I am away for the weekend.

I'll put the code on github this week so some of you c# guru's can make it better as my coding is not the best to be honest.
Hi mrdude, Windows defender sais that the attached file has a Trojan ... is this a flase positive?

1660315851839.png
 

josete2k

Well-Known Member
Member
Joined
Apr 24, 2009
Messages
678
Trophies
1
Age
43
Location
Spain
XP
1,603
Country
Spain
I don't speak whatever language that is in, If you don't trust the exe files - wait until I put the source on github and then you can compile it yourself.

No no I really trust in you...

I just wanted to notice you because if you had any problems on your computer.
 
  • Like
Reactions: mrdude

impeeza

¡Kabito!
Member
Joined
Apr 5, 2011
Messages
6,364
Trophies
3
Age
46
Location
At my chair.
XP
18,741
Country
Colombia
Hi mrdude, Windows defender sais that the attached file has a Trojan ... is this a flase positive?

View attachment 322305
yeah, it's a false positive, you can test the exe with real antivirus and will find NOTHING Micrsoft is know for lots of false positives and errors. and for try to sink the little developer with horror messages to recently created programs and for programmers what not pay to them, if you pay 15.000 USD to Microsoft your program (even if is malware) windows nor defender will show any message.
 
  • Like
Reactions: josete2k

josete2k

Well-Known Member
Member
Joined
Apr 24, 2009
Messages
678
Trophies
1
Age
43
Location
Spain
XP
1,603
Country
Spain
yeah, it's a false positive, you can test the exe with real antivirus and will find NOTHING Micrsoft is know for lots of false positives and errors. and for try to sink the little developer with horror messages to recently created programs and for programmers what not pay to them, if you pay 15.000 USD to Microsoft your program (even if is malware) windows nor defender will show any message.
Ha ha ha ...

Real!!!!!

Thank you guys!!!!!!!!!! You're the best.
 

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
I think a virus only shows up on a database once it's signature is known and then it's added. A lot of people put the virus is a non standard packed file to hide this. It usually won't show up as a virus until it's reported to these Antivirus vendors and then gets added to their database.

Still, I plan on releasing all the code for this app - so if people are worried they can check the github, install visual studio 2022 and compile/mod or do whatever to the code they want, personally I look forward to seeing what people can come up with and improvements that they make. It should be on github next week for those that want to mess about with it.
 

impeeza

¡Kabito!
Member
Joined
Apr 5, 2011
Messages
6,364
Trophies
3
Age
46
Location
At my chair.
XP
18,741
Country
Colombia
Not true, I've written and compiled a few programs on my computer and had to stop defender from trying to delete them. It's annoying sometimes.
I was about to write that same.

for your reference, Microsoft defender block sometimes Sysinternal files what are a set of tools BY MICROSOFT!! defender sometimes blocks Microsoft files!!
 
  • Haha
Reactions: mrdude

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
How does hactoolnet deal with nso?

In hactool if we have options on how to deal with nso files:

NSO0 options:
--uncompressed=f Specify file path for saving uncompressed NSO0.

So we can unpack a file like this:

hactool -t nso main --uncompressed=main_dec

Hactoolnet doesn't have an option that I can see for dealing with these nso files - or am I missing something?
 

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
Here you go, I implemented hactoolnet into this for some speed. You still need hactool for unpacking nso as hactoolnet doesn't have this. The program will work without hacktoolnet in your tools folder but if it finds it, for most unpacking stuff it will use that as a priority.

Now why even bother with this.....?

Well for FS unpacking hactool was taking a long time because I couldn't figure out how to stop the output display from working in the background (this is easy to do in python or from cmd) , so the program generates a batch file and extracts with that as it's far faster. Now being as linux doesn't use batch scripts and uses bash instead - maybe it wouldn't work under wine, but if you have hactoolnet in your tools folder it will use that instead of making the batch file, so it should be compatible with linux if linux works with hactoolnet - which I think it does.

So summary - if you have hactoolnet, you can put it in your tools folder and it will get used. If you dont have it in your tools folder - hactool will be used for all the unpacking of files.
 
Last edited by mrdude,

Mrblue

Member
Newcomer
Joined
Oct 4, 2018
Messages
14
Trophies
0
Age
44
XP
192
Country
Austria
Here you go, I implemented hactoolnet into this for some speed. You still need hactool for unpacking nso as hactoolnet doesn't have this. The program will work without hacktoolnet in your tools folder but if it finds it, for most unpacking stuff it will use that as a priority.

Now why even bother with this.....?

Well for FS unpacking hactool was taking a long time because I couldn't figure out how to stop the output display from working in the background (this is easy to do in python or from cmd) , so the program generates a batch file and extracts with that as it's far faster. Now being as linux doesn't use batch scripts and uses bash instead - maybe it wouldn't work under wine, but if you have hactoolnet in your tools folder it will use that instead of making the batch file, so it should be compatible with linux if linux works with hactoolnet - which I think it does.

So summary - if you have hactoolnet, you can put it in your tools folder and it will get used. If you dont have it in your tools folder - hactool will be used for all the unpacking of files.
Windows Defender says virus and deletes the loader.exe :( mfg

I Test on Bodhi Ubuntu with playonlinux;)
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • TwoSpikedHands @ TwoSpikedHands:
    I just found out that the EU version is better in literally every way, better sound quality, better lighting, and there's even a patch someone made to make the text look nicer
  • TwoSpikedHands @ TwoSpikedHands:
    Do I restart now using what i've learned on the EU version since it's a better overall experience? or do I continue with the US version since that is what ive been using, and if someone decides to play my hack, it would most likely be that version?
  • Sicklyboy @ Sicklyboy:
    @TwoSpikedHands, I'll preface this with the fact that I know nothing about the game, but, I think it depends on what your goals are. Are you trying to make a definitive version of the game? You may want to refocus your efforts on the EU version then. Or, are you trying to make a better US version? In which case, the only way to make a better US version is to keep on plugging away at that one ;)
  • Sicklyboy @ Sicklyboy:
    I'm not familiar with the technicalities of the differences between the two versions, but I'm wondering if at least some of those differences are things that you could port over to the US version in your patch without having to include copyrighted assets from the EU version
  • TwoSpikedHands @ TwoSpikedHands:
    @Sicklyboy I am wanting to fully change the game and bend it to my will lol. I would like to eventually have the ability to add more characters, enemies, even have a completely different story if i wanted. I already have the ability to change the tilemaps in the US version, so I can basically make my own map and warp to it in game - so I'm pretty far into it!
  • TwoSpikedHands @ TwoSpikedHands:
    I really would like to make a hack that I would enjoy playing, and maybe other people would too. swapping to the EU version would also mean my US friends could not legally play it
  • TwoSpikedHands @ TwoSpikedHands:
    I am definitely considering porting over some of the EU features without using the actual ROM itself, tbh that would probably be the best way to go about it... but i'm sad that the voice acting is so.... not good on the US version. May not be a way around that though
  • TwoSpikedHands @ TwoSpikedHands:
    I appreciate the insight!
  • The Real Jdbye @ The Real Jdbye:
    @TwoSpikedHands just switch, all the knowledge you learned still applies and most of the code and assets should be the same anyway
  • The Real Jdbye @ The Real Jdbye:
    and realistically they wouldn't

    be able to play it legally anyway since they need a ROM and they probably don't have the means to dump it themselves
  • The Real Jdbye @ The Real Jdbye:
    why the shit does the shitbox randomly insert newlines in my messages
  • Veho @ Veho:
    It does that when I edit a post.
  • Veho @ Veho:
    It inserts a newline in a random spot.
  • The Real Jdbye @ The Real Jdbye:
    never had that i don't think
  • Karma177 @ Karma177:
    do y'all think having an sd card that has a write speed of 700kb/s is a bad idea?
    trying to restore emunand rn but it's taking ages... (also when I finished the first time hekate decided to delete all my fucking files :wacko:)
  • The Real Jdbye @ The Real Jdbye:
    @Karma177 that sd card is 100% faulty so yes, its a bad idea
  • The Real Jdbye @ The Real Jdbye:
    even the slowest non-sdhc sd cards are a few MB/s
  • Karma177 @ Karma177:
    @The Real Jdbye it hasn't given me any error trying to write things on it so I don't really think it's faulty (pasted 40/50gb+ folders and no write errors)
  • DinohScene @ DinohScene:
    run h2testw on it
    +1
  • DinohScene @ DinohScene:
    when SD cards/microSD write speeds drop below a meg a sec, they're usually on the verge of dying
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Samsung SD format can sometimes fix them too
  • Purple_Heart @ Purple_Heart:
    yes looks like an faulty sd
  • Purple_Heart @ Purple_Heart:
    @Psionic Roshambo i may try that with my dead sd cards
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    It's always worth a shot
    Psionic Roshambo @ Psionic Roshambo: It's always worth a shot