Idan Horowitz
aa6547492e
LibC+ping: Move internet_checksum to serenity header
...
This will be useful for traceroute and any other packet related
application, so this will reduce code duplication.
2021-03-31 23:42:24 +02:00
Idan Horowitz
eab151c994
LibElf+readelf: Parse ELFs with no program headers correctly
...
This simply fixes a check which assumed the program header count was
always non zero.
2021-03-29 19:57:19 +02:00
g0mb4
e64a42dd50
Utilites: Add dd
...
This implementation of dd supports reading/writing/skipping/seeking
in terms of blocks. You can set the size of the block as well.
2021-03-29 11:02:02 +02:00
Idan Horowitz
ff32002f2b
Utilities: Add gzip utility
...
This is a small utility that is similar to gunzip but is used
for compression instead of decompression.
2021-03-27 19:30:42 +01:00
cheb
daf85fb07b
Utilities: Add a delay option to the "shot" utility
...
This option allows for the user to set a delay before a screenshot taken.
The user could minimize the window, for example.
2021-03-27 19:24:01 +01:00
networkException
f4bd095aa3
shot: Added option to output to clipboard instead of file
...
This allows screenshots to be easily used in PixelPaint for example :^)
2021-03-27 09:07:02 +01:00
Idan Horowitz
c01f4c3ed8
gunzip: Fail gracefully on bad input
...
Instead of crashing on a missing input file, looping forever on an
invalid gzip compressed file, and crashing on permissions issues in
the output file, handle all issues gracefully by logging and returning.
2021-03-26 23:00:10 +01:00
Andreas Kling
f018100d21
Utilities: Add a simple "shot" utility for grabbing screenshots :^)
...
This little CLI program grabs the current screen image from
WindowServer and saves it as a PNG file.
2021-03-26 20:33:23 +01:00
Andreas Kling
78b12e1521
Userland: Turn all application menus into window menus :^)
2021-03-25 22:14:09 +01:00
Linus Groh
d182f3224a
checksum: Use new format functions
2021-03-25 10:58:26 +01:00
Linus Groh
edb6ada3ef
test-js+test-web: Replace JSTestRunnerCounts with Test::Counts
2021-03-24 20:38:20 +01:00
Cesar Torres
6c2f690a74
jp: set input to stdin if there is no file specified and add
...
and customizable indentation level
An example: cat /proc/net/adapters | jp
Another example: cat /proc/all | jp -i 2 (indents are set to 2 spaces, instead of 4 by default)
2021-03-24 20:34:26 +01:00
Idan Horowitz
97216c935a
Userland: Add simple zip utility
...
This uses the recently added ZipOutputStream in LibArchive.
2021-03-23 16:09:36 +01:00
Idan Horowitz
8eceef0b1b
unzip: Use the new LibArchive Zip parser
...
This parser should be a little bit more modern and a little more
resilient to zip files from other operating systems. As a side
effect we now also support extracting zip files that are using
DEFLATE compression (using our own LibCompress).
2021-03-23 16:09:36 +01:00
Idan Horowitz
a809db90dd
Libraries: Rename LibTar to LibArchive
...
This is in preparation for a new implementation of zip archive
extraction and creation.
2021-03-23 16:09:36 +01:00
Brendan Coles
677e5e4d84
readelf: Use Loader.so interpreter for dynamic section and symbols
2021-03-22 17:46:05 +01:00
Andreas Kling
f89c479358
profile: Add -a option as an alias for "-p -1" (all processes)
2021-03-21 16:02:11 +01:00
Brendan Coles
ed1789cc04
readelf: Add --checksec flag to display security hardening info
2021-03-19 09:17:17 +01:00
Jean-Baptiste Boric
67f01fd82e
checksum: Don't read the entire input file in memory
...
Unsurprisingly, this doesn't work too well if the input file is in the
gigabyte range.
2021-03-19 09:15:19 +01:00
Linus Groh
cf127b745e
js: Don't print last value after exception and return non-success
...
If in 'foo(); bar();' bar fails, we'd get the error of that and then
foo's return value - that's probably not something anyone expects.
Also make sure to return non-success so the process will exit with 1.
2021-03-18 21:46:56 +01:00
Linus Groh
1ef0078b4c
js: Replace TypedArray class_name() string compare with is<T>()
2021-03-18 21:46:56 +01:00
Jean-Baptiste Boric
711a47b784
truncate: Make 64 bit clean
2021-03-17 23:22:42 +01:00
Jean-Baptiste Boric
570bb81a31
ls: Make 64 bit clean
2021-03-17 23:22:42 +01:00
Jean-Baptiste Boric
10df91b424
df: Make 64 bit clean
2021-03-17 23:22:42 +01:00
Jean-Baptiste Boric
ade6343fca
Userland: Fix printf specifiers with off_t
...
In theory we should probably use the 'j' qualifier, but we don't
support it.
2021-03-17 23:22:42 +01:00
Andreas Kling
d792200a55
LibJS: Rename GlobalObject::initialize() => initialize_global_object()
...
This function was shadowing Object::initialize() which cannot be called
on global objects and has a different set of parameters.
2021-03-17 16:53:35 +01:00
ElDonad
f4f12982ff
bt: add source file number integration
2021-03-15 16:08:31 +01:00
Brendan Coles
eecaa3bed6
test-compress: Initialize byte buffer with random data
2021-03-14 21:37:29 +01:00
Brendan Coles
81cbb2676e
readelf: Tweak section headers output column padding
2021-03-14 21:36:54 +01:00
Brendan Coles
6bc01909b7
readelf: Add support for core notes and relocations
2021-03-14 13:55:07 +01:00
Idan Horowitz
7e587a615e
LibCompress: Handle literal only lz77 streams in DeflateCompressor
...
Very incompressible data could sometimes produce no backreferences
which would result in no distance huffman code being created (as it
was not needed), so VERIFY the code exists only if it is actually
needed for writing the stream.
2021-03-14 11:05:35 +01:00
Idan Horowitz
b3b920eddc
tar: Implement tar archive creation
...
This completes our tar utility by implementing the -c option
for archive creation using TarOutputStream and optionally
GzipCompressor for compression via the -z option.
2021-03-13 20:07:25 +01:00
Idan Horowitz
7eab20bad0
LibTar: Implement TarOutputStream
...
This output stream creates gnu format tar archives
and currently only supports files and directories.
2021-03-13 20:07:25 +01:00
Idan Horowitz
512431a228
test-compress: Add GZip compression tests
2021-03-13 20:07:25 +01:00
Idan Horowitz
02569bec11
test-compress: Add DEFLATE compression tests
2021-03-13 20:07:25 +01:00
Itamar
8688259ed9
LanguageServers/Cpp: Support jumping to declaration of preprocessor
...
.. definitions.
2021-03-13 10:17:02 +01:00
Andreas Kling
ef1e5db1d0
Everywhere: Remove klog(), dbg() and purge all LogStream usage :^)
...
Good-bye LogStream. Long live AK::Format!
2021-03-12 17:29:37 +01:00
Ben Wiederhake
f38a6b18b5
crash: Fix more typos in check logic
...
These caused no test to run for '-f' and mmap to fail, respectively.
2021-03-11 12:32:53 +01:00
Ben Wiederhake
798dea7a49
crash: Fix typo in check logic
...
The remainder of the code assumes that the mmap was successful,
so the 'unexpected error' case is that we see MAP_FAILED.
2021-03-11 12:32:53 +01:00
Ben Wiederhake
bceb98e2df
Userland: Remove superfluous headers
...
Userland has no reason to access 'kmalloc'.
2021-03-11 12:32:53 +01:00
Ben Wiederhake
2cd0793578
xargs: Fix boring memory leak
...
It's only 1K (BUFSIZ), and it's immediately before xargs finishes anyway.
However, I ran into it and know how to fix it, so let's clean this up.
2021-03-11 12:32:53 +01:00
Ben Wiederhake
a265ea98b9
Utilities: Add a quotes database and 'fortunes' program
...
I told you, we need a quotes ~~page~~ file! :D
2021-03-09 22:10:30 +01:00
Brendan Coles
69b98f7d32
Base: Add sysctl man page
2021-03-08 09:48:34 +01:00
Linus Groh
3532e1788f
open: Fix opening "." (again)
...
We can't always rely on the initial URL's path(), so use either the
user-specified argument or the URL path for determining the realpath,
depending on whether we got a file:// URL argument.
Fixes #4950 .
2021-03-07 17:39:58 +01:00
Andrew Kaster
8453bb3461
Userland: Gate OSC 9 usage in test-js behind an argument
...
Instead of assuming that we should use the OSC 9 progress messages
whenever we run on serenity, add a show-progress=[true|false] option.
This lets us avoid seeing esc sequence spam in GitHub Actions logs.
2021-03-02 09:00:21 +01:00
Brian Gianforcaro
e60d394b32
test-web: Utilize new LibTest types from test-web
...
test-web has alot of similar code to test-js, so
re-use some of the types we already pulled out
into LibTest.
2021-03-01 11:17:05 +01:00
Brian Gianforcaro
0a49877fdc
LibTest + test-js: Add initial skelaton of LibTest and migrate code there.
...
The test-js reporter is arguably the nicest test runner / reporter that
exists in the serenity code base. To the goal of leveling up all the
other unit test environments, start a new LibTest library so that we
can share code and reporting utilities to make all the test systems
look and behave similarly.
2021-03-01 11:17:05 +01:00
Andrew Kaster
c2d8b8ec14
Userland: Don't leak buffer from getline in shuf program
...
Probably doesn't matter too too much since the program exits almost
immediately after, but there's the principle of the thing to consider.
2021-02-28 18:19:37 +01:00
Idan Horowitz
c940fd6b7d
Userland: Add a simple mktemp(1) utility
2021-02-28 15:30:49 +01:00
Linus Groh
e265054c12
Everywhere: Remove a bunch of redundant 'AK::' namespace prefixes
...
This is basically just for consistency, it's quite strange to see
multiple AK container types next to each other, some with and some
without the namespace prefix - we're 'using AK::Foo;' a lot and should
leverage that. :^)
2021-02-26 16:59:56 +01:00