QUICK
WRITE A TCP SERVER THAT SENDS THE IP OF MICROSOFT.COM TO ITS ONLY CLIENT OR THIS BIRD WILL STAB YOU!!
>>56172029
Literally the same thread every weekens. Why should we do your homework?
>>56172043
Don't deny the bird or YOU WILL GET STABBED.
Being stabbed by a bird isn't so bad.
BIRDMIN NO
echo `dig +short microsoft.com` | nc -l
I am writing from mobile, sry// server(C#)
public string ipadress(){
//returns only one of them
IPHostEntry hostlist = Dns.GetHostEntry("www.microsoft.com");
return hostlist.AddressList[0];
}
string ms= ipadress();
TCPListener server=null;
NetworkStream stream=null;
try{
IPAdress ip= IPAdress.Parse("127.0.0.1");
int port=5000;
IPEndpoint endpt= new IPEndpoint(ip,port);
server= new TCPListener(endpt);
server.Start();
TCPClient client= server.AcceptTCPclient();
byte[] data= Encoding.ASCII.Getbytes(ms);
stream= client.GetStream;
stream.Write(data,0,data.Length);
}
finally{
stream.Close();
server.Close()
}
// client
TCPClient client= null;
NetworkStream stream= null;
try{
client = new TCPClient("127.0.0.1",5000);
byte[] data = new byte[128];
stream= client.Getstream();
int length = stream.Read( data,0,data.length);
MessageBox.Show(Encoding.ASCII.GetString(data));
}
finally{
stream.close();
client.Close()
}
Isn't this basically a DNS server?
>>56172043
>>56172179
>>56172209
>>56172215
>>56172224
LAST CHANCE OR YOU WILL BLEED
>>56172252
Sorry, it's
echo `dig +short microsoft.com` | nc -l 1234
where 1234 is the port you want.
>>56172242
YOU ARE SAFE FROM MY WRATH MOVE ALONG
WHOLE /G/ IS GETTING MURDERED
>>56172977
KYS
>>56172029
flip send (pack "191.239.213.197")
give it the socket
>>56173057
fucking google it or look on stack exchange
fuck off
a thread died for this bullshit
>>56173057
haskell?
Do you own homework, buttboi
ping microsoft.com
var net = require("net");
var dns = require("dns");
var server = net.createServer(function(socket){
dns.lookup("MICROSOFT.COM",function(err,addr,senpai){
socket.write(addr);
});
});
That was easy
>>56172029
Malbolge(=<__]>[<Z4zEDTw.d?+a/LoJ8HkjiEfU{@c-`+_]yxw%uXm2D1SQPlO*i('`H76FnD21{\yT=w*9b'6po3m11kj-I+xe)ubs$:p>\m;kWVxCwAdsb*`_nn+*)('&%$#"!~}|_tyrwvon4rqponmlkjihgfH^c\aZ~^@V[ZSXWVOsMLKPONMLEiI+A@ED=a$:9>=6;4X87654-Q1*/.-,%I#('&%|Bc!~}|{tsxwvo5mlkj0hmledihg`&dcbD`Y}W\UZYRWPt7MLKJOHlL.JCg*FED=BA@98\65:381U543210/.'&J$)(!~De{z!~w|u;\xwvo5srkj0hmlkd*bg`e^cba`Y}W\[TYXWVOTMqQ3ImGLKJCHAe?>CBA:^>765:3W1054-21*/(L,+*)('~De#"!x>|^tsr8vutsrTj0hmfed*haf_dc\"`Y^]VUyY;WVUNMRQPONGkK-h+AFE>C<`@?!=6Z49870Tu3210).',%I)i'~}C{"!x}|u;yxZvotslqj0hmlkd*Ka'eG]\aZ_^W{>TYRWVUNrRKPOHlLKJ,BGFED=aA:?>7<;:3W70/.32+Op('&J*)(!~D|{z!x}|{zyr8vutsUqponmle+ihJfed]\aZ~AWV[ZYXWPtTSLQPONGkKJCBGF?D=aA@?>~6Z{9876/St210)Mn&+$#G!~}$#"y?}|{]yr8Yunsrqpoh.Oejchg`&dcb[`_X|\[ZSXWPts6RQPINGk.DCHGFED=a$@?>7[|:3Wx05432+O/.-m%I)i!&}$#z@a}|{ts9wvutsl2joh.Oejcb('Hd]baZY}W\UZYRWVUNrRQ3INGLEi,BA@dD=BA@?>7[|:3876/43,+Op.-,+*)(!~}C{"y?}vu;\xqponsl2pih.lkjLhgfed]#[ZY^W{[ZY;WVONrRQPONMLK-hU
That no pickle-pee, that no pump-a-rump
>>56173859
>>56172242
>doing pajeet's homework
>image.jpg
>>56172029
sudo apt-get install cmatrix
>>56173011
> quoting a youtuber
:)
>>56172029import socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.bind((socket.gethostname(), 1234))
sock.listen(1)
while True:
csock, addr = sock.accept()
csock.sendall(socket.gethostbyname('microsoft.com'))
csock.close()
test
#include <windows.h>
#include <winsock.h>
int i_connect_tcp_socket (int _socket, char * sz_server, unsigned int ui_port )
{
struct sockaddr_in saddr;
LPHOSTENT host;
if ( _socket != INVALID_SOCKET )
{
saddr.sin_family = AF_INET;
saddr.sin_port = htons(ui_port);
if ((saddr.sin_addr.s_addr =inet_addr ( sz_server ))==INADDR_NONE )
{
if ( NULL==(host = gethostbyname(sz_server))) return -1;
saddr.sin_addr = *((LPIN_ADDR)*host->h_addr_list);
}
return connect(_socket,(struct sockaddr*)&saddr, sizeof(saddr));
}
return -1;
}
int main()
{
WSADATA winsock_data;
SOCKET sock;
char sz_buffer[256];
if(!WSAStartup(MAKEWORD(2,0),&winsock_data))
{
if(LOBYTE(winsock_data.wVersion) >= 2)
if (INVALID_SOCKET!=(sock = socket(AF_INET,SOCK_STREAM,IPPROTO_TCP)))
if (!i_connect_tcp_socket( sock, "microsoft.com", 8080 ))
send(sock, sz_buffer, sizeof(sz_buffer), 0);
closesocket(sock);
return WSACleanup();
}
return -1;
}
>>56172029
fuck you bird.
>captcha: hilltop quills
>>56177526
works for IPs too
>>56177526
>fullblown hungarian
I have some good news. You have cancer.
>>56177606
I cannot understand what you are saying.
What is "hungarian" about this? I cannot see any words saying anything that relates to them.
>>56178003
It's a form of notation. It's good but CS kiddies learn otherwise.
Chill guys I got thisimport TCP SERVER THAT SENDS THE IP OF MICROSOFT.COM TO ITS ONLY CLIENT
do TCP SERVER THAT SENDS THE IP OF MICROSOFT.COM TO ITS ONLY CLIENT
Done
>>56173739
fucking awesome
haha just type whatever you want to send, the OS does the sending for you
>>56172029require 'socket'
require 'resolv'
server = TCPServer.new 2000
loop do
client = server.accept
client.puts Resolv.getaddress "microsoft.com"
client.close
end
>>56173739
Bullshit
>>56172043
Are you retarded?
If that was homework, OP would ask for a specific language. I really like those threads, it's way too rare to see actual code on /g/..
Birdmin, stab him alreay!
>>56173739
Formatting sucks, it's hard to read this way.