Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] Problem with extracting a folder because of it's name (illegal characters) #7

Open
DoubleDoughnut opened this issue Oct 18, 2013 · 26 comments
Assignees

Comments

@DoubleDoughnut
Copy link
Contributor

If the .app folder inside the Payload contains \ / : * ? " < > | in it's name, Brake will fail to extract it.
This is a Windows only issue as those characters aren't banned on MAC and Linux (I think).
I want to know though if renaming the folder a bit would make a big impact on the whole process?
If the answer is yes I guess that they would have to crack those apps the old fashioned way.
(Bug was found by Kakarot1925 & I discovered the source of the problem)

@NinjaLikesCheez
Copy link
Member

@DoubleDoughnut
Copy link
Contributor Author

Would this do?

System.IO.Path.GetInvalidFileNameChars().

string filename = tVS.Nodes[r].Text;

foreach(char c in System.IO.Path.GetInvalidFileNameChars()) {
filename = filename.Replace(c, '_');
}

@NinjaLikesCheez
Copy link
Member

Why don't you give it a go and see if it works - if it does make a pull request. :)

@DoubleDoughnut
Copy link
Contributor Author

Sure :P
I was just asking on your opinion :)
One more thing, will it interfere with the rest of the script (when it comes to zipping it up)?

@NinjaLikesCheez
Copy link
Member

I don't know the codebase, I work on the Mac version. Sorry!

@DoubleDoughnut
Copy link
Contributor Author

No problem ;)

@DoubleDoughnut
Copy link
Contributor Author

This is really weird...
When attempting to manually extract it with WinRAR, it automatically renames the file.
But when Brake attempts to extract it, it crashes...

I'm gonna need help for this issue, since I've tried at least 5 different ways to rename the file, and none of them worked... (or I'm just really dumb, since I'm a noob)

@NinjaLikesCheez
Copy link
Member

Post a couple of the implementations you tried for ttwj.

@ghost ghost assigned ttwj Oct 18, 2013
@DoubleDoughnut
Copy link
Contributor Author

Like I said, I might have done something wrong.
But now I'm going to sleep, and I'll post it tomorrow.

@DoubleDoughnut
Copy link
Contributor Author

So anything regex related didn't work on it, and if statement didn't work (if e.FileName.contains ":").
foreach didn't work as well. (but like I said, maybe ttwj can figure something out)

@ttwj
Copy link
Member

ttwj commented Oct 19, 2013

Is the illegal characters issue with the IPA or the files in it
On 19 Oct 2013 23:57, "DblD" [email protected] wrote:

So anything regex related didn't work on it, and if statement didn't work
(if e.FileName.contains ":").
foreach didn't work as well. (but like I said, maybe ttwj can figure
something out)


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-26652529
.

@DoubleDoughnut
Copy link
Contributor Author

IPA files never have illegal chars in them on Windows.
But .app folder can have illegal chars.
And that .app folder is the issue.
If it could be renamed, it would solve the problem.

@ttwj
Copy link
Member

ttwj commented Oct 19, 2013

Yea I don't think we can fix that issue, screw windows.
On 20 Oct 2013 00:03, "DblD" [email protected] wrote:

IPA files never have illegal chars in them on Windows.
But .app folder can have illegal chars.
And that .app folder is the issue.


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-26652682
.

@DoubleDoughnut
Copy link
Contributor Author

Can we in that case copy the whole ipa over, and run Clutch thru ssh (like you would thru mobile terminal), and take the whole cracked ipa back?

@ttwj
Copy link
Member

ttwj commented Oct 19, 2013

um that's a stupid idea but ok
On 20 Oct 2013 00:09, "DblD" [email protected] wrote:

Can we in that case copy the whole ipa over, and run Clutch thru ssh, and
take the whole cracked ipa back?


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-26652843
.

@DoubleDoughnut
Copy link
Contributor Author

Well, we could always say "ERROR: Could not be cracked, brake doesn't have enough swag on windows!"

@ttwj
Copy link
Member

ttwj commented Oct 19, 2013

good idea
On 20 Oct 2013 00:11, "DblD" [email protected] wrote:

Well, we could always say "ERROR: Could not be cracked, brake doesn't have
enough swag on windows!"


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-26652902
.

@NinjaLikesCheez
Copy link
Member

This issue can be fixed, it'll just take some work by the windows team, Brake & Clutch need to be coded to a decent quality. If need be I can set environment and learn the basics of C# and windows quick. But this isn't a hard bug to quash.

@DoubleDoughnut
Copy link
Contributor Author

The only way this could be fixed is that either we magically rename the file somehow, or just simply send the whole ipa to the phone, install it, and run Clutch, and bring back the cracked ipa.

@ttwj
Copy link
Member

ttwj commented Oct 19, 2013

it's an issue with the zip library, we're not using the latest version so
maybe they fixed it idk
On 20 Oct 2013 00:35, "DblD" [email protected] wrote:

The only way this could be fixed is that either we magically rename the
file somehow, or just simply send the whole ipa to the phone, install it,
and run Clutch, and bring back the cracked ipa.


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-26653441
.

@DoubleDoughnut
Copy link
Contributor Author

Why don't we use the latest version then?
But I doubt they fixed it tbh...

@ttwj
Copy link
Member

ttwj commented Oct 19, 2013

I used a patched version that works properly on Mac, maybe they removed the
protection for such illegal characters
On 20 Oct 2013 00:43, "DblD" [email protected] wrote:

Why don't we use the latest version then?
But I doubt they fixed it tbh...


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-26653612
.

@NinjaLikesCheez
Copy link
Member

It cannot be that difficult to rename a file in C#. Surely.

@DoubleDoughnut
Copy link
Contributor Author

The problem is that that file is inside the zip.
7-zip for example doesn't extract it at all due to it having an illegal character.
Only WinRAR did it (and that was when I tried manually).

Also I tried the newest Ionic.Zip.dll and Brake wouldn't run at all for some reason...

@DoubleDoughnut
Copy link
Contributor Author

http://dotnetzip.codeplex.com/discussions/247531

This might work as well, I'll check this out too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants