Jump to content

Recommended Posts

Posted

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

Posted

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!
Posted

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

Posted

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

Posted (edited)

i use Windows XP

Always:P

a simple program that can block a port from a pc.

Edited by Erik.

I little problem, hard to find and fix

Posted

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

Posted

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

Posted (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 by Erik.

I little problem, hard to find and fix

Posted

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)

Posted

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")
Check out ConsultingJoe.com
Posted (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 by Erik.

I little problem, hard to find and fix

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...