Benign lua Download

bestline 0.1.0-1

Legitimate library test and source code

Allocates a pseudoterminal for a child processReferences an uncommon hidden home path
SHA-25643ee3358ed6411bbab14660cb9aee9ad799eac64aecb0007e0c07808d8a648f5

Evidence

Allocates a pseudoterminal for a child process lines 538–547
538:6… s.ws_row = EMU_ROWS;
539 ws.ws_col = EMU_COLS;
540
541 child_pid = forkpty(&pty_fd, NULL, NULL, &ws);
542 if (child_pid == -1) {
543 perror("forkpty");
⋯4 lines
execl function call in C source lines 548–561
⋯6 lines
554
555 /* Use shell to parse the command line arguments. */
556 execl("/bin/sh", "sh", "-c", program, NULL);
557 perror("exec");
558 exit(1);
559 }
560
561 /* Give child time to start and print prompt. …
select() I/O multiplexing lines 567–580
567:48… meout */
568
569 FD_ZERO(&fds);
570 FD_SET(pty_fd, &fds);
571
572 if (select(pty_fd + 1, &fds, NULL, NULL, &tv) > 0) {
573 int n = read(pty_fd, buf, sizeof(buf) - 1);
574 if (n > 0) {
575 buf[n] = '\0';
⋯5 lines
File content manipulation (read/write/seek) lines 587–595
587:15… d Ctrl-D (EOF) to terminate cleanly. */
588 write(pty_fd, "\x04", 1);
589 usleep(50000);
590
⋯5 lines
Hex-encoded string patterns lines 843–848
843:28… (🎉 is 4 bytes, displays as 2 columns). */
844 send_keys("hi \xf0\x9f\x8e\x89 there"); /* "hi 🎉 there" */
845 assert_row_contains(0, "hi");
846
847 /* The emoji takes 2 columns, so cursor should be at:
848 …

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.