Hacking Discussion Info on SHA-256 hashes on FS patches

hippy dave

BBMB
Member
Joined
Apr 30, 2012
Messages
9,886
Trophies
2
XP
29,357
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,605
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,605
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,373
Trophies
3
Age
46
Location
At my chair.
XP
18,763
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,605
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,373
Trophies
3
Age
46
Location
At my chair.
XP
18,763
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
    SylverReZ @ SylverReZ: @genistopitauniverfrocrami, Not interested. The fanbase totally ruined it.