Search the Community
Showing results for tags 'networking'.
-
Hey, so I am trying to do TCP Requests. A older post here mentioned including "socket" or "luasocket", but it seems like these modules are not found. This is some code I tried: local socket = require("socket") -- Define the server's IP address and port local serverIP = "192.168.100.15" local serverPort = 16427 -- Create a TCP socket local client = socket.tcp() -- Connect to the server client:connect(serverIP, serverPort) -- Send data to the server local messageToSend = "Hello, server!" client:send(messageToSend) -- Receive data from the server local receivedData, err = client:receive() if receivedData then print("Received data from server: " .. receivedData) else print("Error while receiving data: " .. err) end -- Close the connection client:close()
-
Hi, i would like to decode base64 string but i am encountering problem with the decoding. It looks like a JWT token. The supposed to be header appears scrambled when decoding while the payload seems to be readable text. I'm using a Lua script from the web to decode the strings. I tried putting the JWT token through a auto JWT decoder but it shows no header. Only payload and signature. Makes me assume that it is not a header or had several xor's. String that needs to be fully decoded: VaLciho_OwEwXdjIHdDbsoR4KYTtYV06b9bwtdm9ceQ.eyJpZCI6OTEwNjA2MTksImN0aW1lIjoxNjc1NjE4NzE4fQ Payload decoded: eyJpZCI6OTEwNjA2MTksImN0aW1lIjoxNjc1NjE4NzE4fQ Header scrambled when decoded:VaLciho_OwEwXdjIHdDbsoR4KYTtYV06b9bwtdm9ceQ
- 11 replies
-
- base64
- networking
- (and 4 more)