Erik. Posted April 25, 2006 Share Posted April 25, 2006 Hello, 1)How can i make a program that can see what program what port use. so i can see for example: msn: port 5000 firefox:8080 How can i see what program uses what port 2) how to block a port so no data can be send? and how to check if the ports realy blocked? I little problem, hard to find and fix Link to comment Share on other sites More sharing options...
cdkid Posted April 25, 2006 Share Posted April 25, 2006 For #1, I'd use something like this #include <Constants.au3> $netstat = Run(@ComSpec & " /c netstat -n -b", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) $line = StdoutRead($netstat) $line = StringSplit($line, @LF) Then do a bunch of String* Functions on it to retrieve the right values. To see the output just run cmd and type "netstat -n -b". I know this Isn't the best way, but it could work. Dont know about blocking a port... maybe just change firewall settings. ~cdkid AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide! Link to comment Share on other sites More sharing options...
Erik. Posted April 25, 2006 Author Share Posted April 25, 2006 Hi, The code you post does not work:( A firewall is no option. Does someone know a few lines that can block a port? I little problem, hard to find and fix Link to comment Share on other sites More sharing options...
Don N Posted April 25, 2006 Share Posted April 25, 2006 what os is this on jsut out of curiosity? _____________________________________________________"some people live for the rules, I live for exceptions"Wallpaper Changer - Easily Change Your Windows Wallpaper Link to comment Share on other sites More sharing options...
Erik. Posted April 25, 2006 Author Share Posted April 25, 2006 (edited) i use Windows XP Always:P a simple program that can block a port from a pc. Edited April 25, 2006 by Erik. I little problem, hard to find and fix Link to comment Share on other sites More sharing options...
Don N Posted April 25, 2006 Share Posted April 25, 2006 http://support.microsoft.com/kb/813878#E0RB0ACAAAshows u how to do it in windowsor jsut get a firewall _____________________________________________________"some people live for the rules, I live for exceptions"Wallpaper Changer - Easily Change Your Windows Wallpaper Link to comment Share on other sites More sharing options...
BigDod Posted April 25, 2006 Share Posted April 25, 2006 On the command line you should be able to block a port using netsh firewall set portopening ALL 500 DISABLE or something like that. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Erik. Posted April 26, 2006 Author Share Posted April 26, 2006 The program is for school so i do not have any acess:P i hope you will still help me:P i want when i open the program and then a port get blocked. When i close it the port will be open. Does no one has a simple script to do i? I little problem, hard to find and fix Link to comment Share on other sites More sharing options...
Don N Posted April 26, 2006 Share Posted April 26, 2006 why not jsut do thishttp://support.microsoft.com/kb/813878#E0RB0ACAAAone time and then write a script to start and stop the service? Thatd propbably be easiest. _____________________________________________________"some people live for the rules, I live for exceptions"Wallpaper Changer - Easily Change Your Windows Wallpaper Link to comment Share on other sites More sharing options...
Erik. Posted April 26, 2006 Author Share Posted April 26, 2006 (edited) I will try i do not know if i have so many access Do not understand that. i will try but i do not know if it will work i need to install something first Edited April 26, 2006 by Erik. I little problem, hard to find and fix Link to comment Share on other sites More sharing options...
JSThePatriot Posted April 26, 2006 Share Posted April 26, 2006 The only script example in this entire thread will help you to see what is being used, but you have to output the data. He said as far as closing ports he doesnt know. He didnt write an entire script for you, just a snippet to give you something to build on. JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
ConsultingJoe Posted April 27, 2006 Share Posted April 27, 2006 CDkids script is cool, I added this if you don;t understand it: #include <Constants.au3> #include <array.au3> $netstat = Run(@ComSpec & " /c netstat -n -b", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) $line = StdoutRead($netstat) ConsoleWrite($line) $line = StringSplit($line, @LF) _ArrayDisplay( $line, "Connections") [center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center] Link to comment Share on other sites More sharing options...
Erik. Posted April 28, 2006 Author Share Posted April 28, 2006 (edited) Hi, Is it possible to look at a port? Can i make something that look at a port and when some data is comming in my keybord and mouse will be disabled? The program will run when you start the pc. The can see what you are doing at your pc so i can not check my mail anymore:( The problem is that there always data send at that port to your pc and to the server Is there a way that when there is nore data send ore comming in that my keybord and mouse will be blocked?? EDIT: What means Warnngs at my profil at the site?? i see something that i do not see at other poeple i see warning 0% but after it i see some bleu lines. What does that means? Edited April 28, 2006 by Erik. I little problem, hard to find and fix Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now