Benign freebsd Download

login_times.c

Source changes string letter casingCalls a character-class helper
SHA-25662266e0fda102efcfa0efa42c84ee7fe6f4c28503e9aaf5bc41220cb75d2d551

Evidence

English function-word token "the" lines 3–9
3:36… u>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, is permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above cop …
English function-word token "this" lines 10–12
10:36… inning of the file, without modification,
11 * this list of conditions, and the following disclaimer.
12 * 2. Redistributions in binary form must rep …
imports <ctype.h> lines 21–38
21:7… in period parsing and comparison functions.
22 */
23
24#include <sys/types.h>
25#include <ctype.h>
26#include <login_cap.h>
27#include <stdlib.h>
28#include <string.h>
29#include <time.h>
30
31static struct
⋯7 lines
Calls a character-class helper lines 45–54
45:19… ptr, u_short * t)
46{
47 u_short val;
48
49 for (val = 0; *ptr && isdigit(*ptr); ptr++)
50 val = (u_short)(val * 10 + (*ptr - '0'));
51
52 *t = (u_short)((val / 100) * 60 + (val % 100));
53
54 return (ptr); …
C declares a character or byte buffer lines 59–84
⋯8 lines
67 login_time_t m = t;
68 char *p;
69 char buf[64];
70
71 /* Make local copy and force lowercase to simplify parsing */
72 strlcpy(buf, str, sizeof buf);
73 for (i = 0; buf[i]; i++)
74 buf[i] = (char)tolower(buf[i]);
75 p = buf;
76
77 while (isalpha(*p)) {
78
79 i = 0;
⋯5 lines

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.