Code Monkey home page Code Monkey logo

recscan's People

Contributors

dgets avatar

Stargazers

 avatar

Watchers

 avatar

recscan's Issues

Shave down try/catch blocks

Try to keep the try/catch blocks a little slimmer in order to more concisely pinpoint what particular line of code is really effin' it all up, without having to resort to using the (slow) debugger.

Archive suffix check broken

RecScan is claiming that /home/ouah/Downloads/ethminer-0.11.0-Linux.tar.gz, being used for a test archive, is not named properly (ie doesn't have one of the proper suffixes).

Add PK/WinZip support

I was just thinking, I suppose the 'PK' prefix to -Zip up there probably shows my age a bit. It's just WinZip now, isn't it? A truly appropriate thought for today, being my 40th birthday.

Now that I'm doing development in a native Windows partition for awhile, I guess it would be a good time to start writing the Zip support into the MultiZip class. It's at least a good opportunity to make sure that I'm keeping the different levels of functionality somewhat similar for devel & debugging.

Better archival data structure needed

The static fields describing the different archival and compression options are really a cumbersome and obtuse way to be dealing with all of that information. Instead of a 'flat' listing of HashMap values, I think that perhaps some nested HashMap, and/or Array values, would probably be better for accessing these options and flags.

Check for archive pathwork

Once we hit post-alpha work, there will have to be checking for whether or not the specified archive is in the current directory. If not, this path will obviously have to be stored, as well, and taken into account when moving to the temp dir, etc. At present, in alpha work, there is only going to be support for specifying an archive name within the current directory.

Add unit testing

Not totally sure that I've been learning testing the right way yet, but I'm working on it. If anybody wants to assist with critiquing what I've done here, that'd be great & much appreciated.

Problem with uncompressed tar file processing

Something in Arc.init() is throwing the following tantrum:

Verbose:
Initializing tgtInvalid/unhandled archive
Fucked1: Unhandled or invalid archive
Fubar in getRawlist(): Problem in Arc.init()
Borkage: getRawlist() borked

Came across this when trying to see if maybe the problem in dealing with a tar.gz file was related to the decompression as opposed to the actual untarring. I read about multiple input streams being utilized for some _tar.gz_s here, so it seemed like a decent new route to take debugging. Going to be working on this right away, en route to #15.

Unknown exception being thrown in Tar.tarListDir()

No idea where this exception with a null message is coming from right now, but it is tracked to this method, at least. I've got a feeling that the StackExchange post on reading a tar directory here may well come in useful. There's probably way too much superfluous code in my method that seemed necessary, as I was stumbling through the apache libraries at first.

Add verbose mode

Self-explanatory. Will help out for the most simple debugging, also.

Read tar stream to EOF

Not sure how to read the TarInputStream to EOF just yet. Seems like it should be a ridiculously simple problem to fix, but I'm having trouble locating anything about it in the api. :| I'll have to look into whether or not it has something to do with watching the byte count manually... Seems like it should be handled a lot more professionally than that, though.

Then again, it looks like there may be other issues that need correcting along the way. I just attempted testing with an archive other than my normal test archive. The different runs crashed in different places, with different exceptions. :(

Here is the output from the new archive:

Verbose:
Initializing tgt
Executing tgt.getArcType()
Archive is tar.gz
Opening fis . . .
Opening zis . . .
Opening tarInput . . .
Fucked: tarListDir() java.io.IOException: Stream Closed
Borkage: java.io.IOException: Stream Closed

Here's the output from the original test archive:

Verbose:
Initializing tgt
Executing tgt.getArcType()
Archive is tar.gz
Opening fis . . .
Opening zis . . .
Opening tarInput . . .
Read entry #1
Pulling entry: pax_global_header
-Found Global Pax Header-
Read entry #2
Pulling entry: ossec-hids-2.9.1/
-Valid Directory Found-
Read entry #3
Pulling entry: ossec-hids-2.9.1/.gitignore
-Valid File Found-
NP Fucked: tarListDir() java.lang.NullPointerException

ProcessBuilder isn't gonna work for decomp+untar

ProcessBuilder is almost certainly not going to be the type of construct that we're going to have to use for any archive that is compressed and tarballed (or otherwise archived) separately. Not sure if this will have to be taken care of with some other method that will allow 'piping', or if things will have to be decompressed, and then unarchived (or contents listed) separately. It seems a little bit overkill to have to do things like that, but then again I guess that's what a shell pipe is doing, anyway.

Level limitation option

It may be useful to limit the levels of recursion that RecScan will descend and process; this could be very handy in cases where the archive is large, or drive space is too limited.

Input/Output stream handling is kaput

First time working with Input-/OutputStreams & Tar library variants thereof, and, of course, they're giving me some trouble. Need to figure out why this is botched and probably completely rewrite the code handing off the different Streams, as it was all cut 'n pasted and modified for 'compatibility' afterwards (when I was sleep deprived, at that). Obviously, I don't understand the code well enough yet, and it's probably a good idea, just to wrap my head around all of that better.

More data to follow once I've had a chance to collect it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.