I want to a edit a URL in a .cod file, I used XVI32 to open the file and then replaced the URL with a new URL at the same length.
After the change I made the App isn't working on my device after I reinstalled it.
Is it possible to change the URL without ruin the file?
Thanks.
When you change a cod file content, then its signature becomes incorrect, and the cod file becomes unusable.
Answering your question: it is not possible.
Related
I have a simple HTML file upload snippet that works under iOS as well. However my problem is that the filename of the uploaded file will always be 'image.jpeg'. Is there a way to get the original filename - i.e. 'IMG_0001.jpg' instead? The major issue is that if I have 2 files selected they both have the name of 'image.jpeg' as opposed to their unique names.
Safari on iOS will always make the name of the uploaded file image.jpeg, presumably for security/privacy purposes. You need to generate your own name for the files, which is a good idea in general for uploaded files: you never want to trust the client too much.
If you are targeting more than just Safari on iOS, you will still need to handle this case because it is reasonable that people might upload multiple files with the same name, but originally located in different directories.
How can I tell if a URL points to a file, and that file can be opened for reading without actually reading the file (in case it's too big).
In Java use nio.file.Files with isReadable(Path path): http://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html
I am able to see the source code from my .app file that is i am able access image
files. How can i restrict that? I dont want my user to access the files from app. Please help me in resolving this issue.
Update: Sorry i was supposed to write .h/.m files are not accessed but image files can..
There is a mismatch in type , i didn't observe
You cannot see code from the IPA you upload to the store. No one can see your code. Someone could, however, see you image files, audio files, sqlite files, plist files, etc.
Per your update:
You cannot prevent the files from being accessed. It's like the web: if you can see it, you can steal it.
Basically I get an error every time I try open or get this txt file via url. However when I change the extension to css it opens fine. I have tried re-uploading and it makes no difference.
Try for yourself:
http://seanbingley.comyr.com/DrKruseSite/articles.txt
http://seanbingley.comyr.com/DrKruseSite/articles.css
Thanks in advance.
Edit:
I should probably state that I am not bothered about actually opening it in a browser. I need to read data from it for my website. However I cannot read the data if it keeps giving me 404.
Also when opening the txt file locally in a browser it works fine. It's just when I try to open the same file from the server it goes wrong.
You have to add a mime-type on IIS so it can read it.
Okay so the hosting site (000webhost) does not allow txt files on free accounts.
I have a upload text file field, and with it I plan to save the file somewhere and then store the location of the file in a database. However, I want to make sure the file they uploaded is a .txt file, and not, say, an image file. I imagine this happens in the validation step. How does one validate such a thing? Also, how do you get the filename of the uploaded file? I could always just check if it said '.txt' but for future reference knowing how to validate without just the filename would be helpful.
Trying to validate the contents of a file based on the filename extension is opening the door for major hackerdom. It's trivial to change the extension and upload the file.
If you are on a Mac/Linux/Unix-based system the OS "file" command is the standard because it looks inside the file for key bytes that flag file types. http://en.wikipedia.org/wiki/File_(Unix) I'm not sure what's available for Windows, but this might help: Determine file type in Ruby
One way of doing it, the simple way really, would be to pass the file through an image loader, preferably one that handles multiple common formats, and see if it throws an error.
The other way is to manually check the file header for common image format headers. For example, .bmp files start with BM. Other formats have their own specific markings you can use.