mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-11-22 16:20:19 +01:00
16 lines
330 B
Text
16 lines
330 B
Text
|
#!/usr/env/perl
|
||
|
|
||
|
use Socket;
|
||
|
|
||
|
$ip="127.0.0.1";
|
||
|
$port=6666;
|
||
|
|
||
|
socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));
|
||
|
|
||
|
if(connect(S,sockaddr_in($port,inet_aton($ip)))){
|
||
|
open(STDIN,">&S");
|
||
|
open(STDOUT,">&S");
|
||
|
open(STDERR,">&S");
|
||
|
exec("python -c 'import pty; pty.spawn([\"/bin/bash\", \"--noprofile\", \"--norc\"])'")
|
||
|
};
|