Skip to content

Commit

Permalink
support starting telnetd if requested
Browse files Browse the repository at this point in the history
  • Loading branch information
asdfugil committed Apr 9, 2024
1 parent d2e398e commit 642cfb4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/paleinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ typedef uint64_t palerain_option_t;
// #define palerain_option_emerg_mode (UINT64_C(1) << 29) /* emergency mode (early boot usb shell) */
// #define palerain_option_jbinit_log_to_file (UINT64_C(1) << 30) /* deprecated (kept for compatibility) */
#define palerain_option_cli (UINT64_C(1) << 31) /* CLI mode */
#define palerain_option_telnetd (UINT64_C(1) << 32) /* Enable TELNET daemon (insecure) */

#define palerain_option_jbinit_log_to_file (UINT64_C(1) << 50) /* make ramdisk log to file (jbinit2) */
#define palerain_option_setup_rootful_forced (UINT64_C(1) << 51) /* create fakefs over an existing one (jbinit2) */
Expand Down
2 changes: 2 additions & 0 deletions plooshInit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@

/* Begin PBXFileReference section */
012A1FC12B91814F0018CCA2 /* memmem.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = memmem.c; sourceTree = "<group>"; };
0132ED772BC52144006A24F9 /* telnetd.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = telnetd.plist; sourceTree = "<group>"; };
015DD6BE2BA5992E003E3587 /* load.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = load.c; path = launchctl/load.c; sourceTree = "<group>"; };
015DD6BF2BA5992E003E3587 /* xpc_helper.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = xpc_helper.c; path = launchctl/xpc_helper.c; sourceTree = "<group>"; };
015DD6C02BA5992E003E3587 /* bootstrap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = bootstrap.c; path = launchctl/bootstrap.c; sourceTree = "<group>"; };
Expand Down Expand Up @@ -723,6 +724,7 @@
0173A0CD2BB7018A00E28C83 /* copyright */,
0173A0E52BB7018A00E28C83 /* RSOD.heic */,
0173A0E62BB7018A00E28C83 /* debug-shell.plist */,
0132ED772BC52144006A24F9 /* telnetd.plist */,
);
path = shared;
sourceTree = "<group>";
Expand Down
Binary file added shared/telnetd.plist
Binary file not shown.
1 change: 1 addition & 0 deletions src/payload_dylib/daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ xpc_object_t hook_xpc_dictionary_get_value(xpc_object_t dict, const char *key){
char dropbearBuf[150];
snprintf(dropbearBuf, 150, "/cores/binpack/Library/LaunchDaemons/dropbear-%d.plist", platform);
append_daemon_from_plist(retval, dropbearBuf);
if (pflags & palerain_option_telnetd) append_daemon_from_plist(retval, "/cores/binpack/Library/LaunchDaemons/telnetd.plist");
if (getenv("XPC_USERSPACE_REBOOTED") != NULL) {
xpc_object_t payloadDict = xpc_dictionary_get_dictionary(retval, fakePath(PAYLOAD_PLIST));
xpc_object_t payloadArgs = xpc_dictionary_get_array(payloadDict, "ProgramArguments");
Expand Down

0 comments on commit 642cfb4

Please sign in to comment.