Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 02-12-2004, 06:14 PM   #1 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,444
sde is on a distinguished road
sending a message from unix to windows

i want to write what seems to be a very simple network application.

i want to be able to execute a script on my linux server, and send some signal to my windows box, and have a popup notification happen.

any ideas on what i should use on the linux side to start off with?
__________________
Mike
sde is offline   Reply With Quote
Old 02-12-2004, 07:52 PM   #2 (permalink)
Kernel_Killer
Regular Contributor
 
Kernel_Killer's Avatar
 
Join Date: Feb 2003
Location: indisclosed
Posts: 210
Kernel_Killer is on a distinguished road
I'm not sure how intricate of a notification you want, but you can always sent via SAMBA like so:

smbclient -M <NetBIOS name> <message>
Kernel_Killer is offline   Reply With Quote
Old 02-12-2004, 08:01 PM   #3 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,444
sde is on a distinguished road
does that work outside a local network? and where would the ip go if so?

thanks!
__________________
Mike
sde is offline   Reply With Quote
Old 02-13-2004, 04:40 AM   #4 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,139
Belisarius is on a distinguished road
Samba is windows networking, so it's designed for a LAN.

You could make a VPN. But that's out of my league.
__________________
GitS
Belisarius is offline   Reply With Quote
Old 02-13-2004, 06:00 AM   #5 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,692
redhead is on a distinguished road
Quote:
Originally posted by sde
and where would the ip go if so?
Usualy the "netbiosname" is exchanged with the IP of the machine, so if TCP 139 is open to the outside, it should be posible with just the IP.

Then again, who would willingly make filesharing available across the internet, well aware that there are plenty of worms out there just waiting for a security hole like that....
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Old 02-13-2004, 06:37 AM   #6 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,444
sde is on a distinguished road
that clears it up a little more.

here's more detail about what i am trying to do:
i have multiple half-life servers running on the remote debian box. 1 of those half-life servers is reserved for friends only using AMX mod for half-life.

i can write an amx plugin which executes a program when someone joins the server, but now i need to write the program that executes.

i plan to write a windows application in c# which pops up some sort of message when someone joins the server.

i was hoping to work with sockets ultimately to do this, but i suppose i could always just write the info to mysql and have the windows client query that table at a set interval.

i just loaded up mono ( www.go-mono.com ) on the debian box so i may be able to use the .net remoting stuff .. but it's all conceptual still.
__________________
Mike
sde is offline   Reply With Quote
Old 02-13-2004, 09:32 AM   #7 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,139
Belisarius is on a distinguished road
Why can't you use sockets? Maybe sockets are different in C#, but in Java, they're just a connection to a port over TCP or UDP.

I don't know C#, but in Java there must be a million different ways to write such a program, with numerous frameworks, plain ole' sockets included.
__________________
GitS
Belisarius is offline   Reply With Quote
Old 02-13-2004, 09:47 AM   #8 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,444
sde is on a distinguished road
yes, i just need to learn how to use them =)

thanks for the info.
__________________
Mike
sde is offline   Reply With Quote
Old 03-15-2004, 11:14 PM   #9 (permalink)
inkedmn
Registered User
 
Join Date: Mar 2004
Location: Fullerton, CA
Posts: 26
inkedmn is on a distinguished road
Send a message via AIM to inkedmn
sockets would easily be the best idea here, especially since you don't even have to write the different pieces in the same language.

connecting to a server via sockets in python is easy as pie:

Code:
import socket

s = socket.socket(AF_INET, SOCK_STREAM)
s.connect((hostname, portnumber))
s.write("some data\n")
s.read(1024)  #bytes sent back from the server
s.close()
it really is that easy. and having a python socket listen on a specific port is just as easy...
inkedmn is offline   Reply With Quote
Old 03-15-2004, 11:46 PM   #10 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,444
sde is on a distinguished road
looks like we're neighbors =)

thanks for the advice.
__________________
Mike
sde is offline   Reply With Quote
Old 03-16-2004, 02:46 PM   #11 (permalink)
joe_bruin
LOAD "*",8,1
 
Join Date: Feb 2003
Location: la.ca.us
Posts: 254
joe_bruin is on a distinguished road
one word: netcat

echo -e "GET / HTTP/1.0\nHOST: codenewbie.com\n\n" | nc codenewbie.com 80
joe_bruin is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing the Windows desktop remotely bdl Windows 7 11-10-2004 07:39 AM
OpenGL.dll Mr.Anderson Platform/API C++ 3 08-13-2004 10:07 AM
Microsoft probes Windows code leak redhead Code Newbie News 0 02-13-2004 12:41 AM
Bloody Windows IE rendering sarah31 PHP 6 06-05-2002 07:31 PM


All times are GMT -8. The time now is 08:28 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting