HackerProgrammingBook Part 10
HackerProgrammingBook Part 10
Parte X Varie
progettazione di un software e precisamente un applet che permettera un certo numero di funzionalita comunque legate ai concetti di rete. Quando un utente si collega ad un sito e visualizza le pagine presente su questo potrebbe trovarsi dinanzi ad diverse esigenze che lo costringerebbero a ricercare ed a caricare degli altri software. Il software di cui vedremo la progettazione dovrebbe permettere : 1. 2. 3. 4. 5. Invio di messaggi all host senza utilizzare mailer esterni Utilizzo di una sessione FTP per prelevare dei file dal l host Connessione ad hosts selezionandoli da una lista proposta Ricerche su motori di ricerca senza uscire dalla pagina Indicizzazioni di strutture di pagine html alla fine della ricerca di vocaboli o frasi.
Mediante lo sviluppo di queste funzioni verranno viste alcune classi legate ai protocolli e all utilizzo di alcune risorse. Tra le classi utilizzate ci sono la classe sun.net.ftp, la sun.net.smtp Questo primo pezzo di programma e quello che crea il frame principale e, mediante un gestore di layout a schede, permette la navigazione tra le diverse funzionalita del programma. Il gestore di layout a schede e quello in cui lo sfondo rimane sempre invariato e gli oggetti presentati sull interfaccia utente vengono inseriti selezionando la maschera adatta mediante dei tabulatori. L interfaccia compatibile alle versioni 1.0 e 1.1 del JDK messa a confronto con lo stesso gestore di layout di Windows e abbastanza rustica. Prima di vedere il codice vero e proprio diamo un occhiata alla specifica APPLET dentro al file HTML. <applet code="javaCenter.class" align="baseline" width="8" height="19" alt="The appletUtil Applet" name="javaCenter"> <param name="firstpage" value="appletUtil.html"> <param name="mailto" value="[email protected]"> <param name="mailhost" value="www.bernardotti.al.it"></applet> Il primo parametro, firstpage, specifica da quale pagina iniziare la ricerca dei vocaboli o delle frasi specificate nella funzione di ricerca dell applet. Gli altri due parametri, mailto e mailhost, specificano rispettivamente l indirizzo a cui inviare le mail e il server da utilizzare per l invio. Vediamo ora la prima parte del programma.
Parte 1 file javaCenter.java
// --------------------------------------------------------------------------------------// import delle classi utilizzate // --------------------------------------------------------------------------------------import import import import import import import import import import import import java.applet.*; java.applet.Applet; java.awt.*; java.awt.image.*; java.awt.event.*; java.lang.reflect.*; java.net.*; java.util.*; java.io.*; sun.net.smtp.*; sun.net.ftp.*; sun.net.*;
// --------------------------------------------------------------------------------------// Gestisce il FRAME principale // --------------------------------------------------------------------------------------class javaCenterFrame extends Frame implements ActionListener, WindowListener
cards = new Panel(); // --------------------------------------------------------------------------------------// Stabilisce che il gestore del layout e a schede // --------------------------------------------------------------------------------------layout = new CardLayout(); cards.setLayout(layout); // --------------------------------------------------------------------------------------// Stabilisce per ogni pannello le funzioni assegnandogli la classe che dovra // essere creata e richiamata a seconda della selezione fatta. // --------------------------------------------------------------------------------------cards.add("Invia mail", new javaCenterSendMail(applet, m_mailhost, m_mailto)); cards.add("Esegui ricerche", new javaCenterSearch(applet)); cards.add("Links", new javaCenterLinks(applet)); cards.add("FTP", new javaCenterFTP(m_ftpserver)); cards.add("Cerca su host", new javaCenterSHost(m_firstpage, applet)); add("Center", cards); setBackground(Color.lightGray); addWindowListener(this); pack(); setSize(500, 360); setVisible(true); } // --------------------------------------------------------------------------------------// Intercetta gli eventi che avvengono sugli oggetti precedentemente registrati // --------------------------------------------------------------------------------------public void actionPerformed(ActionEvent e) { String selected = e.getActionCommand(); if(selected.equals("<<")) { layout.first(cards); return; } if(selected.equals(">>")) { layout.last(cards); return; } if(selected.equals("<")) { layout.previous(cards); return; } if(selected.equals(">")) { layout.next(cards); return; } if(selected.equals("Invia mail")) { layout.show(cards, "Invia mail"); return; } if(selected.equals("Esegui ricerche")) { layout.show(cards, "Esegui ricerche"); return; } if(selected.equals("About")) { layout.show(cards, "About"); return; } if(selected.equals("Links")) { layout.show(cards, "Links"); return; } if(selected.equals("FTP")) { layout.show(cards, "FTP"); return; } if(selected.equals("Cerca su host")) { layout.show(cards, "Cerca su host"); return; } } // --------------------------------------------------------------------------------------// Intercetta l evento di chiusura della finestra // L implementazione di windowListener pretende che comunque siano presenti // le diachiarazioni degli altri metodi. // --------------------------------------------------------------------------------------public public public public public public public } // --------------------------------------------------------------------------------------// Classe principale del programma (entry point) // Recupera i parametri specificati nel file HTML se no utilizza quelli di default // specificati nella dichiarazione delle variabili // --------------------------------------------------------------------------------------public { class javaCenter extends Applet = "www.bernardotti.al.it"; = "[email protected]"; = "www.bernardotti.al.it"; = "index.html"; void void void void void void void windowClosing(WindowEvent e) { windowOpened(WindowEvent e) {} windowClosed(WindowEvent e) {} windowDeiconified(WindowEvent e) {} windowDeactivated(WindowEvent e) {} windowActivated(WindowEvent e) {} windowIconified(WindowEvent e) {} dispose(); }
private String m_mailhost private String m_mailto private String m_ftpserver private String m_firstpage
private final String PARAM_mailhost = "mailhost"; private final String PARAM_mailto = "mailto"; private final String PARAM_ftpserver= "ftpserver"; private final String PARAM_firstpage= "firstpage"; // --------------------------------------------------------------------------------------// Recupera un argomento specifico // --------------------------------------------------------------------------------------String GetParameter(String strName, String args[]) { if (args == null) { return getParameter(strName); } int i; String strArg = strName + "="; String strValue = null; int nLength = strArg.length(); try { for (i = 0; i < args.length; i++) { String strParam = args[i].substring(0, nLength); if (strArg.equalsIgnoreCase(strParam)) { strValue = args[i].substring(nLength); if (strValue.startsWith("\"")) { strValue = strValue.substring(1); if (strValue.endsWith("\"")) strValue = strValue.substring(0, strValue.length() - 1); } break; } } } catch (Exception e) {} return strValue; } // --------------------------------------------------------------------------------------// Recupera i tre argomenti assegnandoli ciascuno alla propria variabile // --------------------------------------------------------------------------------------void GetParameters(String args[]) { String param = ""; param = GetParameter(PARAM_mailhost, args); if (param != null) m_mailhost = param; param = GetParameter(PARAM_mailto, args); if (param != null) m_mailto = param; param = GetParameter(PARAM_ftpserver, args); if (param != null) m_ftpserver = param; param = GetParameter(PARAM_firstpage, args); if (param != null) m_firstpage = param; } public void init() { GetParameters(null); new javaCenterFrame(this, m_mailhost, m_mailto, m_ftpserver, m_firstpage); } }
Dopo aver visto le classi principale e quella che gestisce il frame interessiamoci di vedere al classe che presenta a video una lista di WEB presenti in un file chiamato links.txt il quale viene identificato come una risorsa, aperto, letto ed inserito dentro una lista da cui potra essere selezionato. Copyright 2002 Flavio Bernardotti Tel. (39) 380 7097051
Ad esempio : www.bernardotti.al.it|WEB di chi ha scritto questa romanza| www.javasoft.com|Sito SUN dedicato al software Java|
Il file verra identificato come risorsa presente sul WEB mediante la costruzione del suo URL. Dopo averlo aperto mediante la classe stringTokenizer verra analizzato in modo da suddividere la denominazione del sito dalla sua descrizione. Mediante una classe di formattazione i dati verranno inseriti in una lista dalla quale sara possibile selezionare il sito a cui connettersi. La classe javaCenterForm proviene da una classe public domain trovata su internet.
Il suo compito e quello di eseguire formattazioni tipo quelle fatte dalla printf() del C.
La riga di programma che utilizza tale classe per creare la riga da inserire nella lista e la seguente : lista.add(new javaCenterForm("%-40s").form(address) + " " + descrizione); Mediante il metodo showDocument della classe applet verra aperta una nuova pagina del browser con la pagina del sito scelto. applet.getAppletContext().showDocument(u, "_blank");
class {
// -----------------------------------------------------------------------------------// Intercetta le azioni avvenute sugli oggetti registrati // mediante la funzione oggetto.addActionListener(this); // -----------------------------------------------------------------------------------public void actionPerformed(ActionEvent e) { String selected = e.getActionCommand(); if(selected.equals("Connetti")) { setCursor(new Cursor(Cursor.WAIT_CURSOR)); String choiceString = new String(lista.getItem(lista.getSelectedIndex())); StringTokenizer database = new StringTokenizer(choiceString, " "); String connessione = database.nextToken(); sito.setText(connessione); try { // -----------------------------------------------------------------------------------// Crea una risorsa URL data dal nome del sito // e si connette aprendo una pagina nuova del brwser // -----------------------------------------------------------------------------------URL u = new URL(connessione);
LA CLASSE URL
Una delle classi fondamentali, che abbiamo visto nel modulo precedente, e la classe URL. La classe URL rappresenta un puntatore ad una risorsa presente su un WEB la quale viene reperita utilizzando l Uniform Resource Locator. Una risorsa potrebbe essere un normalissimo file o directory od un oggetto piu complesso come ad esempio un interrogazione su un database. Un URL normalmente viene suddiviso in due parti HTTP://
Protocollo
www.bernardotti.al.it
Risorsa
La prima parte specifica il protocollo mentre la seconda la risorsa. Esistono diversi costruttori mediante i quali e possibile creare una risorsa URL. Il piu semplice e il seguente : URL sunSoft = new URL(http://www.javasoft.com/);
Esistono altri costruttori che permettono di specificare le risorse in modo differente, utilizzando anche il numero di porta se necessario.
Ad esempio : URL sunSoft = new URL(http, www.javasoft.com, /index.html); e equivalente a URL sunSoft = new URL(http://www.javasoft.com/index.html);
Ogni costruttore URL puo generare un eccezione legata al protocollo errato o alla risorsa sconosciuta. L eccezione puo essere intercettata con il seguente costrutto :
try { URL sunSoft = new URL(http://www.javasoft.com/); } catch(MalformedURLException e) { handler all eccezione } La classe URL contiene inoltre diversi metodi destinati a ricevere informazioni legate alla URL stessa. Fate attenzione che non e detto che tutte le informazioni debbano essere presenti.
Vediamo i seguenti metodi : getProtocol() getHost() Ritorna il protocollo Ritorna il nome dell host
Alcune volte dopo che e stata creata un URL e possibile utilizzare il metodo openConnection() per creare un collegamento tra il programma Java e l URL stesso. Per esempio e possibile creare una connessione con un sito, Altavista ad esempio, mediante il codice : try { URL urlTmp = new URL("http://www.altavista.digital.com/"); URLConnection urlCon = urlTmp.openConnection(); } catch (MalformedURLException e) {} catch (IOException e) {} Se la connessione ha avuto successo questa potra essere utilizzata per funzioni di lettura e di scrittura. Molte funzioni legate al reperimento di immagini, suoni, files ecc. necessitano dell URL. Ad esempio : public Image getImage(URL url) public Image getImage(URL url, String name) I seguenti metodi mostrano alcuni esempi pratici.
Image image1 = getImage(getCodeBase(), "imageFile.gif"); Image image2 = getImage(getDocumentBase(), "anImageFile.jpeg"); Image image3 = getImage(new URL("http://java.sun.com/graphics/people.gif"));
Esistono due metodi della classe Applet, utilizzati moltissime volte, che permettono di ricavare, in ordine : 1. 2. L URL della pagina che chiama l applet L URL dell applet
Le funzioni sono in ordine : Applet.getDocumentBase() Applet.getCodeBase() Come abbiamo appena visto i due metodi sono stati utilizzati nel punto in cui era necessario fornire come argomenti lURL dell host da cui era stato caricato l applet. LA CLASSE URLConnection
Questa classe contiene molti metodi utili quando si lavora con URL HTTP. Fate attenzione che si tratta di una classe astratta e quindi non puo essere istanziata direttamente. Invece di utilizzare un costruttore vedremo come puo essere utilizzato il metodo openConnection() della classe URL La seguente funzione mostra come eseguire la lettura sfruttando la classe URLConnection. Esempio :
import java.net.*; import java.io.*;
public class URLConnReadr { public static void main(String[] args) throws Exception { URL tmpUrl = new URL("http://www.altavista.digital.com/"); URLConnection URLConn = tmpUrl.openConnection(); BufferedReader in = new BufferedReader( new InputStreamReader(URLConn.getInputStream())); String inputLine; while ((inputLine = in.readLine()) != null) System.out.println(inputLine); in.close();
Nella classe URLConnection esistono un grosso numero di metodi e variabili. Due di queste variabili e due metodi che settano queste variabili sono degni di nota in quanto permettono di eseguire funzioni di input e di output sulla connessione creata. In pratica le variabili sono : doOutput doInput A seconda del valore che viene settato (true/false) si indica che l applet vuole eseguire, in ordine, dell output e dell input sulla URLConnection. Queste variabili possono essere settate dai metodi : void setDoOutput(boolean) void setDoInput(boolean) Altri due metodi, uno visto nel codice in alto, permettono di ricavare rispettivamente un stream di output ed uno di input dall URLConnection. I due metodi sono : OutputStream getOutputStream() InputStream getInputStream() LA CLASSE InetAddress
Esistono alcune classi che spesso risultano essere utili come ad esempio la InetAddress la quale permette di creare e registrare degli indirizzi utilizzati da altre classi. Quest ultima classe di fatto non possiede costruttori pubblici ma in compenso dispone di diversi metodi statici che possono essere utilizzati per creare delle istanze della classe. Tutti i metodi sono statici e devono essere utilizzati nel seguente modo. InetAddress addr = InetAddress.getByName(www.javasoft.com); InetAddress addr = InetAddress.getLocalHost(); InetAddress addr[] = InetAddress.getAllByName(www.javasoft.com); Le precedenti funzioni generano un UnknownHostException se il sistema non e collegato a un DNS. Per DNS si intende Domain Name Server. In altre parole il TCP/IP permette di far riferimento agli host di una rete mediante appositi nomi invece di usare l indirizzo IP. In pratica il DNS e il metodo che ci permette di riferirci ad un sistema quello che normalmente costituito dal nomeHost.nomeDominio (i vari www.javasoft.com, www.bernardotti.al.it ecc.) Inoltre la classe InetAddress include numerose variabili e funzioni per memorizzare indirizzi host Internet. public String hostName public int address public String localHostName Questa variabile contiene il nome dell host nella forma www.xx.yy L indirizzo numerico dell host (x.y.z.j) Contiene il nome dell host locale ovvero quello del computer su cui viene eseguita l applicazione.
Dopo questa panoramica sulla classe URL utilizzata nella prima parte del programma vediamo una seconda parte ovvero quella che si interessa dell invio di messaggi all host. La classe e suddivisa in due parti. La prima crea la maschera video in cui viene richiesto di inserire l email del mittente e il testo del messaggio. Il server mail utilizzato per l invio viene specificato nei parametri della pagina HTML mediante la voce <param name=mailhost value=www.bernardotti.al.it> La seconda parte e quella invece che si interessa della creazione del messaggio e del suo invio.
Questo non significa che, dopo aver aperto un Socket su quella porta, tutto cio che verra scritto verra inviato come mail. I dati scritti su tale socket dovranno essere formattati in un determinato modo per essere considerati un messaggio valido e quindi per essere smistato. Le informazioni dovrebbero avere la seguente formattazione :
HELO host mittente MAIL FROM: mittente RCPT TO: ricevente DATA Messaggio (qualsiasi numero linee) . QUIT
Esiste una classe in sun.net.smtp che permette la gestione del messaggio. Nel nostro modulo riscriveremo completamente la parte che si interessa della creazione e dell invio del messaggio in modo tale da vedere in funzione alcune classi legate alla gestione della rete. Parte 3 file javaCenter.java
// -------------------------------------------------------------------------------// Classe che crea il messaggio e lo invia // In pratica svolge le funzioni della classe sun.net.smtp // -------------------------------------------------------------------------------class javaCenterSmtp { static final int DEFAULT_PORT = 25; static final String EOL = "\r\n"; protected DataInputStream reply = null; protected PrintStream send = null; protected Socket sock = null; public javaCenterSmtp( String hostid) throws UnknownHostException, IOException { this(hostid, DEFAULT_PORT); } public javaCenterSmtp( String hostid, int port) throws UnknownHostException, IOException { // -------------------------------------------------------------------------------// Apre un socket sulla porta 25 // La porta 25 e relativa al demone di gestione mail // -------------------------------------------------------------------------------sock = new Socket( hostid, port ); reply = new DataInputStream( sock.getInputStream() ); send = new PrintStream( sock.getOutputStream() ); String rstr = reply.readLine(); if (!rstr.startsWith("220")) throw new ProtocolException(rstr); while (rstr.indexOf('-') == 3) { rstr = reply.readLine(); if (!rstr.startsWith("220")) throw new ProtocolException(rstr);
Questa e la classe che si interessera fisicamente del messaggio. La classe che segue invece e quella che gestisce la maschera dei dati e che richiama la classe appena vista. In questa parte ritroviamo le funzioni che settano il gestore di layout e che posizionano gli oggetti come i pulsanti e i campi di testo in cui inserire i dati a video. Parte 4 file javaCenter.java
// -------------------------------------------------------------------------------// Gestisce la maschera dei dati // -------------------------------------------------------------------------------class javaCenterSendMail extends Panel implements ActionListener
Per la gestione della formattazione dei campi e stata utilizzata una classe che semplifica l utilizzo del gestore di layout GridBagLayout ed una per la visualizzazione dei messaggi temporanei. Il posizionamento dei vari pulsanti, campi di testo ecc. avverra nel seguente modo.
Button cerca = new Button("Cerca"); constrainer.constrain(cerca, 50, 4, 10, 1, 1, 0, GridBagConstraints.BOTH, GridBagConstraints.WEST); add(cerca);
Prima di vedere le classi legate all uso della rete utilizzate nei due moduli precedenti riporto queste due classi. Parte 5 file javaCenter.java
// -------------------------------------------------------------------------------// Dialog creata per visualizzare messaggi temporanei // quali ad esempio segnalazioni di errore. // Viene creata a partire dalla classe Dialog con il solo // pulsante OK, che permette di uscirne dopo aver letto il testo.
// -------------------------------------------------------------------------------class javaCenterMSGBox extends Dialog implements ActionListener, WindowListener { public javaCenterMSGBox(Frame parent, String title, String message) { super(parent, title, true); setLayout(new FlowLayout(FlowLayout.CENTER)); Label testMsg = new Label(message); add(testMsg); Button ok = new Button("Ok"); add(ok); ok.addActionListener(this); addWindowListener(this); setBackground(Color.lightGray); setSize(400, 100); setVisible(true); }
LA CLASSE Socket
Nella parte che si interessava dell invio del messaggio cera la seguente parte di codice :
sock = new Socket( hostid, port ); reply = new DataInputStream( sock.getInputStream() ); send = new PrintStream( sock.getOutputStream() );
Un socket puo essere considerato come il punto di connessione a due vie esistente tra due programmi che girano in rete. In altre parole un socket e la rappresentazione in Java di una connessione TCP. In pratica quando si vuole eseguire un collegamento ad un sistema in rete si conosce l indirizzo di questo. Mediante il numero di porta e possibile richiedere la connessione ad un software specifico che gira su questa macchina. Nel nostro caso abbiamo utilizzato il socket aperto utilizzando il nome del server mail e la porta 25 (quella del demone mail) per aprire uno stream di output sul quale scrivere i dati relativi al messaggio da inviare. Come e possibile vedere anche dalle due righe di codice appena riportate la fase di scrittura si suddivide in due fasi : 1 2 apertura del socket sul host + numero di porta apertura in scrittura di uno stream
Come avrete visto gli stream aperti sono di fatto due. Uno per scriverci i dati del messaggio e l altro per leggere le repliche del demone mail. E possibile utilizzare la classe socket per la creazione di software client/server. Supponiamo che sul server giri un programma relativo ad un gioco che apre un socket su una fatidica porta 2222. Qualsiasi client potra comunicare con tele software aprendo anchesso un socket utilizzando il nome dell host e il numero di porta 2222. Il software sul sever www.aquilotto.com avra la forma : Socket sock = new Socket(2222);
Sul client invece si avra : Socket sock = new Socket(www.aquilotto.com, 2222); Chiaramente questo e il concetto di base in quanto nel caso di una gestione reale multiutente si dovrebbe eseguire un implementazione tramite thread. LA CLASSE ServerSocket
Questa classe rappresenta un connessione TCP in attesa di ricezione. Non appena viene ricevuta una richiesta di connessione la classe ServerSocket restituisce un oggetto Socket. Ad esempio : ServerSocket servSock = new ServerSocket(5555); definisce un server che monitorizza la porta 5555.
class {
GridBagConstraints constraints = new GridBagConstraints(); javaCenterConstrainer constrainer = new javaCenterConstrainer(this, constraints); constrainer.getDefaultConstraints().insets = new Insets(5, 5, 5, 5); GridBagLayout gridbag = new GridBagLayout(); setLayout(gridbag); Label strToSearch = new Label("Ricerca su motore :"); constrainer.constrain(strToSearch, 0, 2, 25, 1, 1, 0, GridBagConstraints.BOTH, GridBagConstraints.WEST); add(strToSearch); c = new Choice(); constrainer.constrain(c, 25, 2, 25, 1, 1, 0, GridBagConstraints.BOTH, GridBagConstraints.WEST); add(c); c.addItem("1Blink");
public void actionPerformed(ActionEvent e) { String choiceString; String selected = e.getActionCommand(); if(selected.equals("Cerca")) { String s = ""; String s1 = tf.getText(); String s2 = ""; s2 = s1.replace(' ', '+'); tf.setText(s2); s = c.getSelectedItem(); if(s == "Cade Brazil") if(tf.getText().length() > 0) s1 = "http://busca.cade.com.br/scripts/engine.exe?p1=" + tf.getText() + "&p2=1&p3=1"; else if(tf.getText().length() < 1) s1 = "http://www.cade.com.br/"; if(s == "Euroseek") if(tf.getText().length() > 0) s1 = "http://www.euroseek.net/query?iflang=uk&query=" + tf.getText() + "&domain=world&lang=world"; else if(tf.getText().length() < 1) s1 = "http://www.euroseek.net/page?ifl=uk"; if(s == "Cari Malaysia") if(tf.getText().length() > 0) s1 = "http://206.184.233.23/cariurl.cgi?" + tf.getText(); else if(tf.getText().length() < 1) s1 = "http://www.cari.com.my/"; if(s == "Oomph! Korea") if(tf.getText().length() > 0) s1 = "http://www.oomph.net/~dasen21/dasencgi/brief.cgi?v_db=1&v_userid=158&v_query=" + tf.getText() + "&v_hangul=1&v_expert=Search"; else if(tf.getText().length() < 1) s1 = "http://www.oomph.net/"; if(s == "Goo Japan") if(tf.getText().length() > 0) s1 = "http://www.goo.ne.jp/default.asp?MT=" + tf.getText() + "&SM=MC&WTS=ntt&DE=2&DC=10&_v=2"; else if(tf.getText().length() < 1) s1 = "http://www.goo.ne.jp/"; if(s == "1Blink") if(tf.getText().length() > 0) s1 = "http://www.1blink.com/search.cgi?q=" + tf.getText(); else if(tf.getText().length() < 1) s1 = "http://www.1blink.com/"; if(s == "Savvy Search") if(tf.getText().length() > 0) s1 = "http://williams.cs.colostate.edu:1969/nph-search?KW=" + tf.getText() + "&classic=on&t1=x&t2=x&t3=x&t4=x&t5=x&t6=x&t7=x&t8=x&t9=x&t10=x&Boolean=AND&Hits=10&Mode=MakePlan&df=nor mal&AutoStep=on"; else if(tf.getText().length() < 1) s1 = "http://www.cs.colostate.edu/~dreiling/smartform.html"; if(s == "Canada") if(tf.getText().length() > 0) s1 = "http://results.canada.com/search/search.asp? RG=world&SM=must%3Awords&QRY=" + tf.getText() + "&PS=10&DT=1&GO.x=30&GO.y=8"; else if(tf.getText().length() < 1) s1 = "http://www.canada.com/"; if(s == "KHOJ") if(tf.getText().length() > 0) s1 = "http://www.khoj.com/bin/khoj_search?searchkey=" + tf.getText(); else if(tf.getText().length() < 1) s1 = "http://www.khoj.com/"; if(s == "AliWeb") if(tf.getText().length() > 0) s1 = "http://www.aliweb.com/form2.pl?query=" + tf.getText() + "&showdescription=on&titlefield=on&descriptionfield=on&keywordfield=on&urlfield=on&hits=20&domain=&searchtype=Wh ole+Word&types=Any"; else if(tf.getText().length() < 1) s1 = "http://www.aliweb.com/"; if(s == "Liszt") if(tf.getText().length() > 0)
Questa parte assume un notevole interesse in quanto dalla fusione di tre moduli presenti in questo programma potrebbero nascere delle idee interessanti. Ad esempio un altra funzione che vedremo e una che permette di analizzare delle strutture di pagine HTML indicando quelle che contengono parole o frasi specificate. Programmando questo modulo in modo tale che l analisi la faccia su pagine ritornate dai motori di ricerca su indicati si potrebbe creare un programma che invia automaticamente una
class javaCenterFTP extends Panel implements ActionListener { private TextField server = null; private TextField directory = null; private TextField fFile = null; private TextArea lsMessage = null; private Button bServer; private Button download; private Button chDir; private FtpClient fcAluFtp=new FtpClient(); private TelnetInputStream tisList=null; private TelnetInputStream tisGet=null; private TelnetOutputStream tosPut=null; public { javaCenterFTP(String ftpServer) super(); GridBagConstraints constraints = new GridBagConstraints(); javaCenterConstrainer constrainer = new javaCenterConstrainer(this, constraints); constrainer.getDefaultConstraints().insets = new Insets(5, 5, 5, 5); GridBagLayout gridbag = new GridBagLayout(); setLayout(gridbag); Label strTmp = new Label("Server :"); constrainer.constrain(strTmp, 0, 5, 11, 1, 1, 0, GridBagConstraints.BOTH, GridBagConstraints.WEST); add(strTmp); server = new TextField(ftpServer, 40); constrainer.constrain(server, 11, 5, 40, 1, 1, 0, GridBagConstraints.BOTH, GridBagConstraints.WEST); add(server); bServer = new Button("Connetti"); constrainer.constrain(bServer, 51, 5, 10, 1, 1, 0, GridBagConstraints.BOTH, GridBagConstraints.WEST); add(bServer); strTmp = new Label("Directory:"); constrainer.constrain(strTmp, 0, 6, 11, 1, 1, 0, GridBagConstraints.BOTH, GridBagConstraints.WEST); add(strTmp); directory = new TextField("/pub", 40); constrainer.constrain(directory, 11, 6, 40, 1, 1, 0, GridBagConstraints.BOTH, GridBagConstraints.WEST); add(directory); chDir = new Button("CHDIR"); constrainer.constrain(chDir, 51, 6, 10, 1, 1, 0, GridBagConstraints.BOTH, GridBagConstraints.WEST); add(chDir); strTmp = new Label("File :"); constrainer.constrain(strTmp, 0, 7, 11, 1, 1, 0, GridBagConstraints.BOTH, GridBagConstraints.WEST); add(strTmp); fFile = new TextField("", 40); constrainer.constrain(fFile, 11, 7, 40, 1, 1, 0, GridBagConstraints.BOTH, GridBagConstraints.WEST); add(fFile); download = new Button("Preleva"); constrainer.constrain(download, 51, 7, 10, 1, 1, 0, GridBagConstraints.BOTH, GridBagConstraints.WEST);
I metodi appena visti utilizzano quelli della classe sun.net.ftp per eseguire la connessione al server FTP, per eseguire la navigazione sulle directory del sistema e per prelevare i files. Come potete vedere a seguito di una richiesta di cambio directory viene eseguita anche una DIR (ls) in modo tale da mostrare i contenuti del nuovo posizionamento. Avrete notato che l output ricevuto tramite uno stream TELNET viene visualizzato dentro ad una TextArea ovvero ad un campo di edit multiriga che viene adibito, nel programma, a maschera di visualizzazione dei dati che giungono dall host a cui si e connessi. Il programma utilizza sempre il LOGIN anonymous e la mia EMAIL come password in quanto si suppone che ci si voglia connettere a sistemi pubblici che normalmente si attengono a questo sistema. Se vi interessa effettuare il login su host con LOGIN, e quindi PASSWORD, dedicate potete modificare il programma aggiungendo alla maschera di inserimento dei dati anche il campo per contenere il primo dato e un altro per contenerci la password.
fcAluFtp.login("anonymous","[email protected]");
Il precedente codice dovra essere modificato in modo tale che gli argomenti diventino quelli letti dai campi aggiunti. Per gestire un flusso di dati si in input che in output viene utilizzato uno stream Telnet. Uno stream Telnet puo essere ottenuto utilizzando le apposite classi sun.net. Difatti sono presenti le classi TelnetOutputStream e TelnetInputStream per gestire flussi di dati.
tmpLista = new java.awt.List(7, false); tmpLista.setForeground(new Color(0,255,0)); tmpLista.setBackground(new Color(0,60,0)); tmpLista.addItemListener(this); messaggi = new TextArea(5, 30); panel.add(tmpLista); panel.add(messaggi); tmpLista.addItemListener(this); add(panel, "South"); } public void stop() { th = null; } public void run() { register(indexpage ); Search(textfield1.getText() , criteria , indexpage ); stopThread(); } public void startThread() { if( th != null ){ th.stop(); th = null; } th = new Thread( this ); th.start(); } public void stopThread() { button1.setLabel( "Cerca" ); messaggi.appendText("Nessuna altra pagina trovata.\r\n"); messaggi.appendText("Eseguite un doppio click su un eventuale url trovato.\r\n"); if( th != null ) { try{ th.stop(); }catch( Exception e ){} th = null; } } void Search( String search, String criteria, String url ) { String content = ""; try{ content = readURL( url ); } catch( Exception e ) { return; } Enumeration links = parseLinks( content ); messaggi.appendText("Ricerca su " + url + " di " + search + " (" + criteria + ")\r\n"); if(criteria.equalsIgnoreCase( "qualsiasi parola" ) && matchAny( search, content ) ) report( url ); else if( criteria.equalsIgnoreCase( "tutte le parole" ) && matchAll( search, content ) ) report( url ); else if( criteria.equalsIgnoreCase( "frasi" ) && matchPhrase( search, content ) ) report( url ); while( links.hasMoreElements() ) Search( search, criteria, (String)links.nextElement() ); } boolean matchAny( String search, String content ) { String s = search.toLowerCase(); String c = content.toLowerCase(); StringTokenizer tok = new StringTokenizer( s , ", " , false ); while( tok.hasMoreTokens() ){
L esempio visto costituito da 8 pezzi. Dato che nella versione 1.2 del JDK e stata inserita un altra classe List la dichirazione List del AWT creava un errore di ambiguita. Per sopperire al problema la dichiarazione, dove serve e stata fatta con : java.awt.List lista = new java.awt.List(10, false); L applet puo essere compilato sia con il JDK 1.1 (o con 1.2) oppure con il compilatore Microsoft 1.12 (anche con la 6.0). GESTIONE ECCEZIONI
Nelle argomentazioni viste precedentemente abbiamo utilizzato l intercettazione delle eccezioni che potevano essere generate dall utilizzo delle varie classi. Vediamo ora di approfondire il discorso in quanto l argomento ricopre un ruolo molto importante. Avevamo accennato, parlando delle URL, ad un eccezione che veniva generato nel caso in cui si verificava l impossibilita di accedere, per problemi di errata definizione del formato, ad una risorsa. L eccezione in questione era la MalformedURLException.
Errore del protocollo telnet Errore nel protocollo smtp Errore accedendo al server FTP Errore del protocollo FTP Errore del protocollo Nntp
Inizialmente, quando parlavamo della struttura della rete, avevamo visto la definizione del protocollo UDP e avevamo anche detto che esisteva una serie di classi che erano apposite per tale protocollo. Si trattava delle classi per i datagrammi. LA CLASSE DATAGRAMMA
Inizialmente avevamo detto che i datagrammi vengono utilizzati per inviare in modo indipendente dei pacchetti di dati da un applicazione ad un'altra senza garantirne l arrivo. I pacchetti di dati inviati tramite datagrammi in genere sono indipendenti. Per fare un esempio pratico vediamo due moduli, uno per il server e uno per il client, che permettono di inviare le informazioni degli utenti collegati ad un sistema Unix. Supponiamo che esista un programma che a tempi regolari esegua un who (istruzione Unix per vedere l elenco degli utenti collegati al sistema) e che scriva i dati in un file denominato users.txt. Il programma server dovra attendere una richiesta di invio di un datagramma da parte di un software client e dovra inviare il contenuto del file.
import java.io.*; import java.net.*; import java.util.*; public class whoClient { public static void main(String[] args) throws IOException { if (args.length != 1) { System.out.println("Usage: java whoClient <hostname>"); return; } // Crea il datagramma DatagramSocket socket = new DatagramSocket(); byte[] buffer = new byte[512]; InetAddress address = InetAddress.getByName(args[0]); // Invia la richiesta DatagramPacket packet = new DatagramPacket(buffer, buffer.length, address, 5225); socket.send(packet); // Prende la risposta packet = new DatagramPacket(buffer, buffer.length); socket.receive(packet); // Lo visualizza i dati ricevuti String received = new String(packet.getData(), 0); System.out.println("User(s) connected: " + received); socket.close(); } }
Con la versione 1.2 del JDK i packages legati alla gestione della rete sono ulteriormente aumentati facendo diventare il numero dei metodi a disposizione una cosa enorme. Veramente un infinita di metodi sufficenti a perdersi dentro. A peggiorare la situazione ci sono anche le classi create da programmatori e software house che invadono il mercato sia shareware che commerciale. Sun esce con la versione 1.2 ed aggiunge le classi Swing e JFC Microsoft arriva con la sua 3.0 e inserisce AFC. Ogni botta sono centinaia di metodi che si aggiungono a quelli gia esistenti. Senza contare che quello che oggi e recentissimo domani e sorpassatissimo. Con Java e proprio il caso di dire : chi vivra vedra !
Per fare un esempio pratico. Anni fa ricevetti una commessa da Telecom (allora SIP) la quale aveva questo problema. La gestione del personale e quindi presenze, turni ecc., veniva fatta in tutta Italia tramite terminali che permettevano di inserire i dati dentro ai vari Mainframe che accentravano l'elaborazione di questi. Le varie agenzie quindi inserivano tutte le informazioni dentro ai sistemi 3090 tramite questi terminali 3270 su reti IBM SNA e non potevano fare nessuna elaborazione locale delle informazioni. La soluzione per permettere di disporre localmente delle informazioni sarebbe stata quella di poter accedere agli archivi del 3090 IBM, cosa impossibile in quanto il centro di calcolo non dava questa disponibilit, anzi trattava i suoi dati come se fossero TOP SECRET. Allora le soluzioni alternative sarebbero state quelle di digitare due volte i dati, una volta per inserirli nel database locale e un altra volta per metterli nel mainframe.
Scrivendo un linguaggio che gestisse queste problematiche si sarebe facilmente potuto scrivere altre applicazioni per questo tipo di architetture. Comunque questo era solo un esempio in quanto la scrittura di piccoli linguaggi diventa utile per tutti quei casi in cui ci sono problemi ricorrenti. Che cosa significa scriversi un linguaggio dedicato ? Chiaramente parliamo di strutture semplici senza andare in complicazioni particolari. Scriversi un linguaggio orientato significa analizzare i vari problemi che questo deve risolvere e scriversi una tabella sintattica e semantica che descriva le strutture di questo linguaggio. Un linguaggio inanzi tutto composto da vocaboli che possiamo definire con il termine di TOKEN i quali possono essere combinati secondo certe regole semantiche. Prendiamo un operazione di selezione delle informazioni da database. Il token sar SELEZIONA il quale potr essere seguito da un nome di un campo oppure da un carattere * atto a indicare che si vogliono estrarre tutti i campi. Se il termine dopo SELEZIONA * allora il token successivo pu essere solo il nome del DATABASE da cui si vogliono estrarre le informazioni. (1) Nel caso in cui sia un campo di database il token dopo pu essere una virgola (,) a separazione oppure il nome del database.
Nel caso che sia una virgola si estrae un altro token e si ricomincia la valutazione dal punto (1). Quindi le cose da fare per scriversi un linguaggetto sono :
Scriversi il flusso del linguaggio in base ai vari costrutti Scriversi un programma che carichi tutto il programma in un buffer e che possieda una funzione che estrae un TOKEN alla volta (GetToken). Scriversi le varie funzionalita' che devono essere eseguite quando si arriva ad interepratre una certa cosa.
Supponiamo di avere un costrutto del linguaggio che :
SCRIVIAVIDEO [stringa] Chiamiamo GetToken il quale ci restituisce SCRIVIAVIDEO. Capiamo che si tratta di una funzione che deve scrivere la stringa successiva a video. Richiamiamo GetToken il quale ci restituisce la stringa. A questo punto chiamiamo un funzione che stampa a video alla quale passeremo come argomento il secondo token. Il nostro linguaggio dovr possedere anche un analizzatore metematico a cui passare funzioni del tipo : SCRIVIAVIDEO 34*25+2-1 Questa parte di sorgente incorpora il parser matematico. L'ultima funzione in basso entry() legge ciclicamente un funzione e ne stampa il risultato.
char #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define
far buffer[16384]; ERROR DELIMITER VARIABLE NUMBER INSTRUCTION LABEL COUNTER FINISHED INSTR_SE INSTR_INIZIOSE INSTR_FINESE INSTR_ALTRIMENTI INSTR_ESEGUI INSTR_VAIA INSTR_STAMPA 0 2 5 7 0 2 4 6 6 1 3 5 1 3 4
char *funcstr[] = { "IF", "BEGIN", "END", "ELSE", "RUN", "GOTO", "PRINT", "" }; static struct label { char labname[12]; char *prgptr; } lbl[50]; static char char int int void int numlabel = 0; *prog; token[80]; tok_type; tok_istr; level1(float *);
void { }
float vars[26] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; static int is_in(char ch, char *s) { while(*s) if(*s++==ch) return 1; return 0; } static int isdelim(char c) { if(is_in(c, " +-*/%^=()") || c == 9 || c == '\r' || c == 0) return 1; return 0; } static void searchfunction(void) { register i = 0; while(funcstr[i]) { if(!lstrcmp(token,funcstr[i])) { tok_istr = i; return; } ++i; } tok_istr = ERROR; } static void get_token(void) { register char *temp; tok_type = 0; temp = token; while(isspace(*prog)) ++prog; if(*prog == '\0') { tok_type = FINISHED; return; } if(is_in(*prog, "+-/%*^=()")) { tok_type = DELIMITER; *temp++ = *prog++; } if(*prog == '!') { while(!isdelim(*prog)) *temp++ = *prog++; tok_type = VARIABLE; } if(isdigit(*prog)) { while(!isdelim(*prog)) *temp++ = *prog++; tok_type = NUMBER; } if(*prog == ':') { while(!isdelim(*prog))
} static float find_var(char *s) { if(!isalpha(*s)) { serror(1); return (float) 0.0; } return vars[*token - 'A']; } static void putback(void) { char *t; t = token; for(;*t;t++) prog--; } static void unary(char o, float *r) { if(o == '-') *r = -(*r); } static void arith(char o, float *r, float *h) { float t, ex; switch(o) { case '-': *r = *r - *h; break; case '+': *r = *r + *h; break; case '*': *r = *r * *h; break; case '/': *r = *r / *h; break; case '%': t = *r / *h; *r = *r - (t * *h); break; case '^': ex = *r; if(*h == 0) { *r = (float) 1.0; break;
} }
static void level2(float *result) { register char op; float hold; level3(result); while((op = *token) == '+' || op == '-') { get_token(); level3(&hold); arith(op, result, &hold); } } static void level1(float *result) { int slot, ttok_type; char temp_token[80]; if(tok_type == VARIABLE) { lstrcpy(temp_token, token); ttok_type = tok_type; slot = *token - 'A'; get_token(); if(*token != '=') { putback(); lstrcpy(token, temp_token); tok_type = ttok_type; } else { get_token(); level2(result); vars[slot] = *result; return; } } level2(result); } static void get_exp(float *result) { get_token(); if(!*token) return; level1(result); } void { entry(HWND hDlg)
float answer; register i = 0; while(1) { prog = buffer; if(SendMessage(GetDlgItem(hDlg, 103), EM_GETLINE, i, (LONG) (LPSTR) buffer) <= 0) break; get_exp(&answer); wsprintf(buffer, "%ld\n", (long) answer); SetDlgItemText(hDlg, 118, buffer); ++i;
In alto viene gestita una tabella dei simboli che viene utilizzata dalla funzione GetToken la quale quando viene chiamata restituisce non solo il TOKEN ma anche il tipo del token.
staticvoid get_token(void) { register char *temp; tok_type = 0; temp = token; while(isspace(*prog)) ++prog; if(*prog == '\0') { tok_type = FINISHED; return; } if(is_in(*prog, "+-/%*^=()")) { tok_type = DELIMITER; *temp++ = *prog++; } if(*prog == '!') { while(!isdelim(*prog)) *temp++ = *prog++; tok_type = VARIABLE; } if(isdigit(*prog)) { while(!isdelim(*prog)) *temp++ = *prog++; tok_type = NUMBER; } if(*prog == ':') { while(!isdelim(*prog)) *temp++ = *prog++; tok_type = LABEL; } if(*prog == '$') { while(!isdelim(*prog)) *temp++ = *prog++; tok_type = COUNTER; } if(isalpha(*prog)) { searchfunction(); while(!isdelim(*prog)) *temp++ = *prog++; tok_type = INSTRUCTION; } *temp = '\0'; } Come potete vedere in alto anche i tipi di TOKEN sono definiti. #defineERROR0 #defineDELIMITER1 #defineVARIABLE2 #defineNUMBER3 #defineINSTRUCTION4 #defineLABEL5 #defineCOUNTER6 #defineFINISHED7 #defineINSTR_SE0
incrementato. Come potete vedere se il carattere puntato ad prog e' ! allora continua a leggere il nome della variabile per cui al ritorno da GetToken avremo in tok_type il valore VARIABLE e in token il valore del token. Se ci fosse un costrutto del tipo : STAMPA !A chiameremmo la prima volta GetToken il quale ci restituirebbe : tok_type = INSTRUCTION token = STAMPA da cui capiremmo che abbiamo a che fare con un istruzione e precisamente con STAMPA. Il nostro diagramma logico del linguaggio ci potrebbe dire che dopo a tale costrutto potremmo avere una variabile, una stringa o un numero, negli altri casi ci sarebbe errore. Richiamiamo GetToken la quale trovando !A ci restituirebbe : tok_type = VARIABLE token = NOMEVARIABILE Dopo aver visto che si tratta di una variabile potremmo volere che questa valutazione venisse fatta dall'analizzatore matematico.
Quando si chiama GetToken il puntatore del programma viene spostato all'istruzione successiva.
static void putback(void) { char *t; t = token; for(;*t;t++) prog--; } putback fa in modo che il programma torni al token precedente per cui dopo aver trovato la variabile faciamo arretrare il programma e richiamiamo il parser matematico. static void get_exp(float *result) { get_token(); if(!*token)
Come abbiamo visto a questo punto possiamo inserire qualsiasi funzione specificando la sua sintassi e scrivendo il codice che deve essere eseguito. Chiaramente le funzionalit nel nostro caso dovranno essere implementate o mediante una libreria socket oppure utilizzando wincap. A seconda della scelta fatta dovremo aggiungere anche alcune tipologie complesse che sono visualizzabili come strutture non come variabili numeriche o stringa normali. Ma ora iniziamo a creare la sintassi del linguaggio e le loro funzioni di gestione. Partiamo da quelle legate alla gestione dei canali di comunicazione.
0000B7 0000BB 0000BC 0000C0 0000C1 0000C5 0000C6 0000C8 0000C9 0000CA 0000CC 0000CD 0000D0 0000D1 0000D2 0000D3 0000D4 0000D7 0000D8 0000DD 0000DE 0000E1 0000E2 0000E3 0000E4 0000E6 0000E8 0000E9 0000ED 0000EE 0000EF 0000F0 0000F2 0000F3 0000F4 0000F6 0000F8 0000FB 0000FD 0000FF 000102 000143 000163 000168 0001C8 0001FA 000204 000205 000216 000288 0003C6 000400 0004AC 000502 00059A 0005A8 00060D
Dove Fastnet TRI-DATA Systems Inc. Netway products, 3274 emulators Allen-Bradley Western Digital now SMC (Std. Microsystems Corp.) Olicom A/S Farallon Computing Inc HP Intelligent Networks Operation (formerly Eon Systems) Altos Emulex Terminal Servers, Print Servers LANcity Cable Modems (now owned by BayNetworks) Densan Co., Ltd. Industrial Research Limited Develcon Electronics, Ltd. Adaptec, Inc. "Nodem" product SBE Inc Wang Labs PureData Dartmouth College (NED Router) old Novell NE1000's (before about 1987?) (also 3Com) Gould Unigraph Hitachi (laptop built-in) Acer Counterpoint Integrated Micro Products Ltd mips? Aptor Produits De Comm Indust Accton Technology Corporation ISICAD, Inc. April Network Designers Limited [also KNX Ltd, a former division] Alantec Samsung Spider Communications (Montreal, not Spider Systems) Gandalf Data Ltd. - Canada Allied Telesis, Inc. A.M.C. (Applied Microsystems Corp.) DEC Rechner zur Kommunikation High Level Hardware (Orion, UK) Camtec Electronics (UK) Ltd. BBN (Bolt Beranek and Newman, Inc.) internal usage (not registered) IEEE 802 NDC (National Datacomm Corporation) W&G (Wandel & Goltermann) [incorrect according to W&G] Thomas Conrad Corp. Compaq (PageMarq printers) Novell NE3200 Hamilton (Sparc Clones) ESI (Extended Systems, Inc) print servers Global Village (PCcard in Mac portable) Morning Star Technologies Inc Lexmark (Print Server) IBM PCMCIA Ethernet adapter. Apple (PCI bus Macs) PowerComputing (Mac clone) PowerComputing Mac clones Hewlett-Packard JetDirect token-ring
interfaces IBM RISC6000 system Cisco Cisco Racal-Datacom Cisco 2511 Token Ring Technically Elite Concepts Fermilab Compaq Cisco Systems Cisco 75xx Cisco Cisco Cisco 5000 3Com 3C905-TX PCI Cisco 5500 Router Ambicom (was Tandy?) Cisco Kabel Lexmark (Print Server) Cable & Computer Technology Adastra Systems Corp Canopus Co Ltd Orbotech Realtek Nbase Control Technology Inc (Industrial Controls 002025 and Network Interfaces) 002028 Bloomberg ATML (Advanced Telecommunications 00202B Modules, Ltd.) IBM (International Business Machines) 002035 mainframes, Etherjet printers 002036 BMC Software 002042 Datametrics Corp 002045 SolCom Systems Limited 002048 Fore Systems Inc 00204B Autocomputer Co Ltd 00204C Mitron Computer Pte Ltd 002056 Neoproducts 002061 Dynatech Communications Inc 002063 Wipro Infotech Ltd 002066 General Magic Inc 002067 Node Runner Inc 00206B Minolta Co., Ltd Network printers 002078 Runtop Inc 3COM SuperStack II UPS management 002085 module 00208A Sonix Communications Ltd 00208B Focus Enhancements 00208C Galaxy Networks Inc 002094 Cubix Corporation 0020A5 Newer Technology 0020A6 Proxim Inc 0020AF 3COM Corporation 0020B6 Agile Networks Inc 0020B9 Metricom, Inc. 0020C5 Eagle NE2000 0020C6 NECTEC Versalynx Corp. "The One Port" terminal 0020D0 server 0020D2 RAD Data Communications Ltd 0020D3 OST (Ouet Standard Telematique) 0020D8 NetWave 0020DA Xylan 0020DC Densitron Taiwan Ltd PreMax PE-200 (PCMCIA NE2000-clone 0020E0 card, sold by InfoExpress) 000629 00067C 0006C1 000701 00070D 000852 000855 0008C7 001011 00101F 00102F 00104B 001079 00107A 0010F6 001700 002000 002008 00200C 002011 002017 002018 00201A
0020E5 0020EE 0020F6 0020F8 004001 004005 004009 00400B 00400C 00400D 004010 004011 004013 004014 004015 004017 00401C 00401F 004020 004023 004025 004026 004027 004028 00402A 00402B 00402F 004030 004032 004033 004036 004039 00403C 004041 004043 004048 00404C 00404D 00404F 004050 004052 004054 004057 004059 00405B 00405D 004066 004067 004068 004069 00406A 00406E 00406F 004072 004074 004076 004078 00407F 004082 004085 004086 004087
Apex Data Gtech Corporation Net Tek & Karlnet Inc Carrera Computers Inc Zero One Technology Co Ltd (ZyXEL?) TRENDware International Inc.; Linksys; Simple Net; all three reported Tachibana Tectron Co Ltd Crescendo (now owned by Cisco) General Micro Systems, Inc. LANNET Data Communications Sonic Mac Ethernet interfaces Facilities Andover Environmental Controllers NTT Data Communication Systems Corp Comsoft Gmbh Ascom XCd XJet - HP printer server card AST Pentium/90 PC (emulating AMD EISA card) Colorgraph Ltd Pilkington Communication Logic Corporation Molecular Dynamics Melco Inc SMC Massachusetts [Had:Sigma (?), maybe the "S"?] Netcomm Canoga-Perkins TriGem Xlnt Designs Inc (XDI) GK Computer Digital Communications Addtron Technology Co., Ltd. TribeStar Optec Daiichi Denko Co Ltd Forks, Inc. Fujikura Ltd. Nokia Data Communications SMD Informatica S.A. Hypertec Pty Ltd. Telecomm Techniques Space & Naval Warfare Systems Ironics, Incorporated Star Technologies Inc Thinking Machines Corporation Lockheed-Sanders Yoshida Kogyo K.K. Funasset Limited Star-Tek Inc Hitachi Cable, Ltd. Omnibyte Corporation Extended Systems Lemcom Systems Inc Kentek Information Systems Inc Corollary, Inc. Sync Research Inc Applied Innovation Cable and Wireless AMP Incorporated Wearnes Automation Pte Ltd Agema Infrared Systems AB Laboratory Equipment Corp SAAB Instruments AB Michels & Kleberhoff Computer Ubitrex Corporation
004088 00408A 00408C 00408E 00408F 004090 004091 004092 004094 004095 004096 00409A 00409C 00409D 00409E 00409F 0040A4 0040A6 0040AA 0040AD 0040AE 0040AF 0040B4 0040B5 0040B6 0040B9 0040BD 0040C1 0040C2 0040C3 0040C5 0040C6 0040C7 0040C8 0040CC 0040CF 0040D2 0040D4 0040D7 0040D8 0040DC 0040DF 0040E1 0040E2 0040E3 0040E5 0040E7 0040E9 0040EA 0040ED 0040F0 0040F1 0040F4 0040F5 0040F6 0040F9 0040FA 0040FB 0040FD 0040FF 004F49 004F4B 00504D
Mobuis NuBus (Mac) combination video/EtherTalk TPS Teleprocessing Sys. Gmbh Axis Communications AB CXR/Digilog WM-Data Minfo AB Ansel Communications PC NE2000 compatible twisted-pair ethernet cards Procomp Industria Eletronica ASP Computer Products, Inc. Shographics Inc Eagle Technologies [UMC also reported] Telesystems SLW Inc Network Express Inc Transware DigiBoard Ethernet-ISDN bridges Concurrent Technologies Ltd. Lancast/Casat Technology Inc Rose Electronics Cray Research Inc. Valmet Automation Inc SMA Regelsysteme Gmbh Delta Controls, Inc. Digital Products, Inc. (DPI). 3COM K.K. Video Technology Computers Ltd Computerm Corporation MACQ Electronique SA Starlight Networks Inc Bizerba-Werke Wilheim Kraut Applied Computing Devices Fischer and Porter Co. Micom Communications Corp. Fibernet Research, Inc. Danpex Corporation Milan Technology Corp. Silcom Manufacturing Technology Inc Strawberry Tree Inc Pagine Corporation Gage Talker Corp. Studio Gen Inc Ocean Office Automation Ltd Tritec Electronic Gmbh Digalog Systems, Inc. Marner International Inc Mesa Ridge Technologies Inc Quin Systems Ltd Sybus Corporation Arnos Instruments & Computer Accord Systems, Inc. PlainTree Systems Inc Network Controls International Inc Micro Systems Inc Chuo Electronics Co., Ltd. Cameo Communications, Inc. OEM Engines Katron Computers Inc Combinet Microboards Inc Cascade Communications Corp. LXE Telebit Corporation Personal NetBlazer Realtek Pine Technology Ltd. Repotec Group
00504E 006008 006009 006025 00602F 00603E 006047 006052 00605C 006067 006070 006083 00608C 006094 006097 0060B0 008000 008001 008004 008005 008006 008007 008009 00800D 00800F 008010 008012 008013 008015 008016 008017 008019 00801A 00801B 00801C 008021 008023 008024 008026 008029 00802A 00802C 00802D 00802E 008033 008034 008035 008037 008038 00803B 00803D 00803E 00803F 008042 008043 008045 008046 008048 008049 00804C 00804D
UMC UM9008 NE2000-compatible ISA Card for PC 3Com Found in a 3Com PCI form factor 3C905 TX board Cisco Catalyst 5000 Ethernet switch Active Imaging Inc. Cisco Cisco 100Mbps interface Cisco Realtek (RTL 8029 == PCI NE2000) Cisco Acer Lan Cisco routers (2524 and 4500) Cisco Systems, Inc. 3620/3640 routers 3Com (1990 onwards) AMD PCNET PCI 3Com Hewlett-Packard Multitech Systems Inc Periphonics Corporation Antlow Computers, Ltd. Cactus Computer Inc. Compuadd Corporation Dlog NC-Systeme Jupiter Systems (older MX-600 series machines) Vosswinkel FU SMC (Standard Microsystem Corp.) Commodore IMS Corp. IMS failure analysis tester Thomas Conrad Corp. Seiko Systems Inc Wandel & Goltermann PFU Dayna Communications "Etherprint" product Bell Atlantic Kodiak Technology Cisco Newbridge Networks Corporation Integrated Business Networks Kalpana Network Products Corporation Microdyne Corporation Test Systems & Simulations Inc The Sage Group PLC Xylogics, Inc. Annex terminal servers Plexcom, Inc. Formation (?) SMT-Goupil Technology Works Ericsson Business Comm. Data Research & Applications APT Communications, Inc. Surigiken Co Ltd Synernetics Hyundai Electronics Force Computers Networld Inc Matsushita Electric Ind Co University of Toronto Compex, used by Commodore and DEC at least Nissin Electric Co Ltd Contec Co., Ltd. Cyclone Microsystems, Inc.
008051 008052 008057 00805A 00805B 00805C 00805F 008060 008062 008063 008064 008067 008069 00806A 00806B 00806C 00806D 00806E 00806F 008071 008072 008074 008079 00807B 00807C 00807D 008082 008086 008087 00808A 00808B 00808C 00808D 00808E 008090 008092 008093 008094 008096 008098 00809A 00809B 00809D 00809F 0080A1 0080A3 0080A6 0080A7 0080AD 0080AE 0080AF 0080B1 0080B2 0080B6 0080BA 0080C0 0080C2 0080C6 0080C7 0080C8 0080C9 0080CE
ADC Fibermux Network Professor Adsoft Ltd Tulip Computers International BV Condor Systems, Inc. Agilis(?) Compaq Computer Corporation Network Interface Corporation Interface Co. Richard Hirschmann Gmbh & Co Wyse Square D Company Computone Systems ERI (Empac Research Inc.) Schmid Telecommunication Cegelec Projects Ltd Century Systems Corp. Nippon Steel Corporation Onelan Ltd SAI Technology Microplex Systems Ltd Fisher Controls Microbus Designs Ltd Artel Communications Corp. FiberCom Equinox Systems Inc PEP Modular Computers Gmbh Computer Generation Inc. Okidata Summit (?) Dacoll Limited Frontier Software Development Westcove Technology BV Radstone Technology Microtek International Inc Japan Computer Industry, Inc. Xyron Corporation Sattcontrol AB HDS (Human Designed Systems) X terminals TDK Corporation Novus Networks Ltd Justsystem Corporation Datacraft Manufactur'g Pty Ltd Alcatel Business Systems Microtest Lantronix (see also 0800A3) Republic Technology Inc Measurex Corp CNet Technology Used by Telebit (among others) Hughes Network Systems Allumer Co., Ltd. Softcom A/S NET (Network Equipment Technologies) Themis corporation Specialix (Asia) Pte Ltd Penril Datability Networks IEEE 802.1 Committee Soho Xircom, Inc. D-Link (also Solectek Pocket Adapters, and LinkSys PCMCIA) Alberta Microelectronic Centre Broadcast Television Systems
0080D0 0080D3 0080D4 0080D6 0080D7 0080D8 0080DA 0080E0 0080E3 0080E7 0080EA 0080F0 0080F1 0080F3 0080F4 0080F5 0080F7 0080FB 0080FE 00A000 00A092 00A0D1 00A0D2 00A024 00A040 00A0C9 00A0CC 00AA00 00B0D0 00C000 00C001 00C002 00C003 00C004 00C005 00C006 00C007 00C008 00C009 00C00A 00C00B 00C00C 00C00D 00C00E 00C00F 00C011 00C012 00C013 00C014 00C015 00C016 00C017 00C018 00C01A 00C01B 00C01C 00C01D 00C01F 00C020 00C021
Computer Products International Shiva Appletalk-Ethernet interface Chase Limited Apple Mac Portable(?) Fantum Electronics Network Peripherals Bruel & Kjaer XTP Systems Inc Coral (?) Lynwood Scientific Dev Ltd The Fiber Company Kyushu Matsushita Electric Co Opus Sun Electronics Corp Telemechanique Electrique Quantel Ltd Zenith Communications Products BVM Limited Azure Technologies Inc Bay Networks Ethernet switch Intermate International [LAN printer interfaces] National Semiconductor [COMPAQ Docking Station] Allied Telesyn 3com Apple (PCI Mac) Intel (PRO100B cards) MacSense 100Base-TX Adapter for Mac Also seen in PCs (?) Intel Computer Products International Lanoptics Ltd Diatek Patient Managment Sercomm Corporation Globalnet Communications Japan Business Computer Co.Ltd Livingston Enterprises Inc Portmaster (OEMed by Cayman) Nippon Avionics Co Ltd Pinnacle Data Systems Inc Seco SRL KT Technology (s) Pte Inc Micro Craft Norcontrol A.S. ARK PC Technology, Inc. Advanced Logic Research Inc Psitech Inc QNX Software Systems Ltd. [also Quantum Software Systems Ltd] Interactive Computing Devices Netspan Corp Netrix Telematics Calabasas New Media Corp Electronic Theatre Controls Fluke Lanart Corp Corometrics Medical Systems Socket Communications Interlink Communications Ltd. Grand Junction Networks, Inc. S.E.R.C.E.L. Arco Electronic, Control Ltd. Netexpress
00C023 00C024 00C025 00C027 00C028 00C029 00C02A 00C02B 00C02C 00C02D 00C02E 00C02F 00C030 00C031 00C032 00C033 00C034 00C035 00C036 00C039 00C03B 00C03C 00C03D 00C03E 00C03F 00C040 00C041 00C042 00C043 00C044 00C045 00C046 00C047 00C048 00C049 00C04D 00C04E 00C04F 00C050 00C051 00C055 00C056 00C057 00C058 00C059 00C05B 00C05C 00C05D 00C05E 00C060 00C061 00C063 00C064 00C065 00C066 00C067 00C068 00C069 00C06A 00C06B 00C06C 00C06D 00C06F
Tutankhamon Electronics Eden Sistemas De Computacao SA Dataproducts Corporation Cipher Systems, Inc. Jasco Corporation Kabel Rheydt AG Ohkura Electric Co Gerloff Gesellschaft Fur Centrum Communications, Inc. Fuji Photo Film Co., Ltd. Netwiz Okuma Corp Integrated Engineering B. V. Design Research Systems, Inc. I-Cubed Limited Telebit Corporation Dale Computer Corporation Quintar Company Raytech Electronic Corp Silicon Systems Multiaccess Computing Corp Tower Tech S.R.L. Wiesemann & Theis Gmbh Fa. Gebr. Heller Gmbh Stores Automated Systems Inc ECCI Digital Transmission Systems Datalux Corp. Stratacom Emcom Corporation Isolation Systems Inc Kemitron Ltd Unimicro Systems Inc Bay Technical Associates US Robotics Total Control (tm) NETServer Card Mitec Ltd Comtrol Corporation Dell Toyo Denki Seizo K.K. Advanced Integration Research Modular Computing Technologies Somelec Myco Electronics Dataexpert Corp Nippondenso Corp Networks Northwest Inc Elonex PLC L&N Technologies Vari-Lite Inc ID Scandinavia A/S Solectek Corporation Morning Star Technologies Inc May be miswrite of 0003C6 General Datacomm Ind Inc Scope Communications Inc Docupoint, Inc. United Barcode Industries Philp Drake Electronics Ltd California Microwave Inc Zahner-Elektrik Gmbh & Co KG OSI Plus Corporation SVEC Computer Corp Boca Research, Inc. Komatsu Ltd
00C070 00C071 00C072 00C073 00C074 00C075 00C076 00C077 00C078 00C079 00C07A 00C07B 00C07D 00C07F 00C080 00C081 00C082 00C084 00C085 00C086 00C087 00C089 00C08A 00C08B 00C08C 00C08D 00C08E 00C08F 00C090 00C091 00C092 00C093 00C095 00C096 00C097 00C098 00C09B 00C09C 00C09D 00C09F 00C0A0 00C0A1 00C0A2 00C0A3 00C0A4 00C0A7 00C0A8 00C0A9 00C0AA 00C0AB 00C0AC 00C0AD 00C0AE 00C0B0 00C0B2 00C0B3 00C0B4 00C0B5 00C0B6 00C0B7 00C0B8 00C0B9 00C0BA
Sectra Secure-Transmission AB Areanex Communications, Inc. KNX Ltd Xedia Corporation Toyoda Automatic Loom Works Ltd Xante Corporation I-Data International A-S Daewoo Telecom Ltd Computer Systems Engineering Fonsys Co Ltd Priva BV Ascend Communications ISDN bridges/routers RISC Developments Ltd Nupon Computing Corp Netstar Inc Metrodata Ltd Moore Products Co Data Link Corp Ltd Canon The Lynk Corporation UUNET Technologies Inc Telindus Distribution Lauterbach Datentechnik Gmbh RISQ Modular Systems Inc Performance Technologies Inc Tronix Product Development Network Information Technology Matsushita Electric Works, Ltd. Praim S.R.L. Jabil Circuit, Inc. Mennen Medical Inc Alta Research Corp. Znyx (Network Appliance box); Jupiter Systems (MX-700 series) Tamura Corporation Archipel SA Chuntex Electronic Co., Ltd. Reliance Comm/Tec, R-Tec Systems Inc TOA Electronic Ltd Distributed Systems Int'l, Inc. Quanta Computer Inc Advance Micro Research, Inc. Tokyo Denshi Sekei Co Intermedium A/S Dual Enterprises Corporation Unigraf OY SEEL Ltd GVC Corporation Barron McCann Ltd Silicon Valley Computer Jupiter Technology Inc Gambit Computer Communications Computer Communication Systems Towercom Co Inc DBA PC House GCC Technologies,Inc. Norand Corporation Comstat Datacomm Corporation Myson Technology Inc Corporate Network Systems Inc Meridian Data Inc American Power Conversion Corp Fraser's Hill Ltd. Funk Software Inc Netvantage
00C0BB 00C0BD 00C0BE 00C0BF 00C0C0 00C0C1 00C0C2 00C0C3 00C0C4 00C0C5 00C0C6 00C0C8 00C0C9 00C0CA 00C0CB 00C0CD 00C0D0 00C0D1 00C0D2 00C0D4 00C0D5 00C0D6 00C0D9 00C0DB 00C0DC 00C0DE 00C0DF 00C0E1 00C0E2 00C0E3 00C0E4 00C0E5 00C0E6 00C0E7 00C0E8 00C0E9 00C0EA 00C0EC 00C0ED 00C0EE 00C0EF 00C0F0 00C0F1 00C0F2 00C0F3 00C0F4 00C0F5 00C0F6 00C0F7 00C0F8 00C0FA 00C0FB 00C0FC 00C0FD 00C0FF 00DD00 00DD01 00DD08 00E011 00E014 00E016 00E01E 00E029
Forval Creative Inc Inex Technologies, Inc. Alcatel - Sel Technology Concepts Ltd Shore Microsystems Inc Quad/Graphics Inc Infinite Networks Ltd. Acuson Computed Sonography Computer Operational SID Informatica Personal Media Corp Micro Byte Pty Ltd Bailey Controls Co Alfa, Inc. Control Technology Corporation Comelta S.A. Ratoc System Inc Comtree Technology Corporation (EFA also reported) Syntellect Inc Axon Networks Inc Quancom Electronic Gmbh J1 Systems, Inc. Quinte Network Confidentiality Equipment Inc IPC Corporation (Pte) Ltd EOS Technologies, Inc. ZComm Inc Kye Systems Corp Sonic Solutions Calcomp, Inc. Ositech Communications Inc Landis & Gyr Powers Inc GESPAC S.A. TXPORT Fiberdata AB Plexcom Inc Oak Solutions Ltd Array Technology Ltd. Dauphin Technology US Army Electronic Proving Ground Kyocera Corporation Abit Corporation Kingston Technology Corporation Shinko Electric Co Ltd Transition Engineering Inc Network Communications Corp Interlink System Co., Ltd. Metacomp Inc Celan Technology Inc. Engage Communication, Inc. About Computing Inc. Canary Communications Inc Advanced Technology Labs ASDG Incorporated Prosum Box Hill Systems Corporation Ungermann-Bass IBM RT Ungermann-Bass Ungermann-Bass Uniden Corporation Cisco Ethernet switch rapid-city (now a part of bay networks) Cisco Lightstream 1010 SMC EtherPower II 10/100
00E02C 00E034 00E039 00E04F 00E083 00E08F 00E098 00E0A3 00E0B0 00E0B8 00E0C5 00E0F7 00E0F9 00E0FE 020406 020701 020701 026060 026086 02608C 02AA3C 02CF1F 02E03B 02E6D3 080001 080002 080003 080005 080006 080007 080008 080009 08000A 08000B 08000D 08000E 08000F 080010 080011 080014 080017 08001A 08001B 08001E 08001F 080020 080022 080023 080025 080026 080027 080028 08002B 08002E 08002F 080030 080032 080036
AST - built into 5166M PC motherboard (win95 id's as Intel) Cisco Paradyne 7112 T1 DSU/CSU Cisco Jato Technologies, Inc. Cisco Systems Catalyst 2900 Linksys PCMCIA card Cisco Cisco Systems Catalyst 2900/5000 AMD PCNet in a Gateway 2000 BCOM Electronics Inc. Cisco Cisco Cisco BBN internal usage (not registered) Interlan [now Racal-InterLAN] DEC (UNIBUS or QBUS), Apollo, Cisco Racal-Datacom 3Com Satelcom MegaPac (UK) 3Com IBM PC; Imagen; Valid; Cisco; Macintosh Olivetti CMC Masscomp; Silicon Graphics; Prime EXL Prominet Corporation Gigabit Ethernet Switch BTI (Bus-Tech, Inc.) IBM Mainframes Computer Vision 3Com (formerly Bridge) ACC (Advanced Computer Communications) Symbolics Symbolics LISP machines Siemens Nixdorf PC clone Apple BBN (Bolt Beranek and Newman, Inc.) Hewlett-Packard Nestar Systems Unisys ICL (International Computers, Ltd.) NCR/AT&T SMC (Standard Microsystems Corp.) AT&T [misrepresentation of 800010?] Tektronix, Inc. Excelan BBN Butterfly, Masscomp, Silicon Graphics National Semiconductor Corp. (used to have Network System Corp., wrong NSC) Tiara? (used to have Data General) Data General Apollo Sharp Sun NBI (Nothing But Initials) Matsushita Denso CDC Norsk Data (Nord) PCS Computer Systems GmbH TI Explorer DEC Metaphor Prime Computer Prime 50-Series LHC300 CERN Tigan Intergraph CAE stations
Fuji Xerox Bull Spider Systems Torus Systems cadnetix Motorola VME bus processor modules DCA (Digital Comm. Assoc.) DSI (DAVID Systems, Inc.) ???? (maybe Xylogics, but they claim not to 080045 know this number) 080046 Sony 080047 Sequent 080048 Eurotherm Gauging Systems 080049 Univation 08004C Encore BICC [3com bought BICC, so may appear 08004E on 3com equipment as well] 080051 Experdata 080056 Stanford University 080057 Evans & Sutherland (?) 080058 ??? DECsystem-20 08005A IBM 080066 AGFA printers, phototypesetters etc. 080067 Comdesign 080068 Ridge 080069 Silicon Graphics 08006A ATTst (?) 08006E Excelan 080070 Mitsubishi 080074 Casio 080075 DDE (Danish Data Elektronik A/S) 080077 TSL (now Retix) 080079 Silicon Graphics 08007C Vitalink TransLAN III 080080 XIOS 080081 Crosfield Electronics 080083 Seiko Denshi 080086 Imagen/QMS 080087 Xyplex terminal servers 080088 McDATA Corporation 080089 Kinetics AppleTalk-Ethernet interface 08008B Pyramid 08008D XyVision XyVision machines 08008E Tandem / Solbourne Computer ? 08008F Chipcom Corp. 080090 Retix, Inc. Bridges 09006A AT&T 10005A IBM 100090 Hewlett-Packard Advisor products 1000D4 DEC Apple A/UX (modified addresses for 1000E0 licensing) LAA (Locally Administered Address) for 2E2E2E Meditech Systems 3Com dual function (V.34 modem + 3C0000 Ethernet) card 400003 Net Ware (?) 444553 Microsoft (Windows95 internal "adapters") 444649 DFI (Diamond Flower Industries) GTC (Not registered!) (This number is a 475443 multicast!) 484453 HDS ??? 484C00 Network Solutions 4854E8 winbond? Information Modes software modified 4C424C addresses (not registered?)
52544C Novell 2000 5254AB REALTEK (a Realtek 8029 based PCI Card) 565857 Aculab plc audio bridges AT&T [misrepresented as 080010? One 800010 source claims this is correct] CNET Technology Inc. (Probably an error, 80AD00 see instead 0080AD) AA0000 DEC obsolete AA0001 DEC obsolete AA0002 DEC obsolete DEC Global physical address for some DEC AA0003 machines DEC Local logical address for DECNET AA0004 systems Western Digital (may be reversed 00 00 C00000 C0?) EC1000 Enance Source Co., Ltd. PC clones(?)
Le passwords di defaults
Queste che seguono sono alcune password di default.
Manufacturer 3Com 3Com 3Com 3Com 3Com 3Com 3Com 3com 3Com 3Com 3Com 3Com 3Com 3Com 3Com 3Com 3Com 3Com 3Com 3com 3com 3com 3Com 3Com 3com 3Com 3Com 3com 3Com 3Com 3com 3Com 3Com 3COM 3com 3com 3com 3Com 3Com 3Com ACC Acc/Newbridge Acc/Newbridge adaptec Adaptec RAID adtran Adtran Adtran Aironet alcatel Alcatel Model Super Stack 2 Switch AccessBuilder 7000 BRI CoreBuilder 2500 Switch 3000/3300 Switch 3000/3300 Switch 3000/3300 Cable Managment System SQL Database (DOSCIC DHCP) NAC (Network Access Card) HiPer ARC Card CoreBuilder 6000 CoreBuilder 7000 SuperStack II Switch 2200 SuperStack II Switch 2700 SuperStack / CoreBuilder SuperStack / CoreBuilder SuperStack / CoreBuilder LinkSwitch and CellPlex LinkSwitch and CellPlex Superstack II 3300FX Switch 3000/3300 3comCellPlex7000 Switch 3000/3300 AirConnect Access Point Superstack II Dual Speed 500 OfficeConnect 5x1 SuperStack 3 Switch 3300XM Super Stack 2 Switch SuperStack II Switch 1100 SuperStack II Switch 1100 super stack 2 switch Office Connect Remote 812 Switch 3000/3300 OCR-812 OS Version 1.25 Any Any Login root manager manager admin security Password letmein manager manager admin security 3com none none tech tech synnet tech tech synnet 3com tech monitor comcomcom security PASSWORD manager manager security manager !root admin !root 0000 Password manager netman netman netman adaptec ADTRAN ADTRAN -
Win2000 & MS DOCSIS_APP adm v4.1.x of HA adm debug tech debug tech admin read write tech debug admin Admin tech monitor n/a security
at least 5.x Any any admin manager manager security manager root admin
root administrato NBX100 2.8 r Home Connect User estheralastr OfficeConnect 5x1 at least 5.x uey SuperStack II Switch 3300 manager Superstack Routers netman Congo/Amazon/Tigris All versions netman Congo/Amazon/Tigris All versions netman Administrato Storage Manager Pro All r tsu 600 ethernet module 18364 TSU 120 e TSU 120 e All 1000 ANT Win98 -
alcatel speed touch home Alcatel/Newbridge/T VPN Gateway imestep 15xx/45xx/7xxx Alcatel/Newbridge/T VPN Gateway 15xx/ imestep Alcatel/Newbridge/T VPN Gateway 15xx/ imestep Allied Tenysin R130 Alteon ACEswitch 180e (telnet) Alteon Web Systems All hardware releases APC MasterSwitches APC Any Apple Network Assistant Apple Airport Arrowpoint any? Ascend All TAOS models Ascend Pipeline Terminal Server Ascom Timeplex Routers AT&T Starlan SmartHUB AWARD Any BIOS Axent Axis AXIS AXIS Axis bay bay Bay Bay / Nortel NetProwler manager NPS 530 StorPoint CD100 200 V1.32 2100 Network Camera cv1001003 ARN
Any Any Any Web OS 5.2 Firmware Pri 3.X 1.1 all Any 9.9 -
permit permit permit friend blank admin apc apc xyzzy public system Ascend manager admin pass pass pass Manager NetICs rwa IP address weblogic bintec biodata Babylon correct masterkey Super Master laflaf password (no password by default) -inuvik49 blank iolan cisco cmaker changeme pixadmin
Bay Network Routers All Bay Networks ASN / ARN Routers Bay Networks Baystack Bay/Nortel Networks Accelar 1xxx switches Bay/Nortel Networks Remote Annex 2000 BEA Weblogic BEA bewan Bintec all Routers Bintec Biodata BIGfire & BIGfire+ Biodata all Babylon-Boxes Borland interbase Borland Interbase Borland/Inprise Interbase BreezeCom AP10, SA10 Station Adapter and BreezeCOM Access Point BreezeCOM Station Adapter and BreezeCOM Access Point Brocade Silkworm Buffalo/MELCO Cabletron Cabletron Cabletron routers and switches Cayman celerity Chase Research Cisco Cisco CISCO CISCO AirStation WLA-L11 any NB Series * 3220-H DSL Router Iolan+ Any Router and Switch ConfigMaker Software Network Registrar N/A
Manager admin none apc apcuser None none admin admin answer See notes N/A AWARD_SW administrato WinNT r 5.02 root 4.28 root admin Linux (ETRAX root Manager 13.20 (caps count !) User Any Manager Any rwa Any admin 5.1 system Any admin all all Any politcally any SYSDBA BreezeNET PR 4.x 3.x 2.x any Any * GatorSurf 5. 10 thru 12 any? 3.0 N/A admin root (cannot be changed) -blank Any cisco n/a ADMIN pixadmin
Cisco Cisco Cisco cisco cisco cisco cisco Cisco cisco cisco Cisco cisco Cisco CISCO cisco cisco cisco Cisco Cisco cisco Cisco cisco cisco CMOS BIOS Cobalt Com21 Comersus Shopping Cart Compaq Compaq Compaq compaq copper mountain Coppercom Coyote-Point Coyote-Point Coyote-Point Coyote-Point Cyclades D-Link D-Link Dell Dell Dell dell Digiboard DLink Dlink DLink Dlink dlink DLink Dupont Digital Water Proofer eci
routers VPN 3000 Concentrator Net Ranger 2.2.1 1600 1601 MGX 1601 any arrowpoint 2503 IDS (netranger) 1600 RaQ * Qube* 3.2 Insight Manager Insight Manager Management Agents Equaliser 4 Equaliser 4 Equaliser 4 Equaliser 4 MP/RT DI-704 DI-701 PowerVault 50F PowerVault 35F Powerapp Web 100 Linux Portserver 8 & 16 DI-206 ISDN router Dl-106 ISDN router DL-701 Cable/DSL Gateway/Firewall DFE-538TX 10/100 Adapter di704 DI 106 Sun Sparc -
san-fran admin attack superuser no default password attack ESSEX or IPC admin dmr99 administrato r operator none equalizer look touch surt admin calvin calvin powerapp dbps Admin 1234 year2000 admin @*nigU^D.ha, ; par0t -
Win 95/98/NT admin Administrato r operator administrato All r eqadmin Free BSD Serial port only root Free BSD Serial port only look - Web Free BSD Browser only (Read a touch - Web Free BSD Browser only (Write super 2.22 (?) WindRiver (E root root RedHat 6.2 root any root 1.* Admin Windows 98 winnt any administrato r root -
Efficient Elron
Firewall
2.5c all all Versions All ALL ALL 6.x Any Any win95 Any -
emai hotmail Ericsson ACC Ericsson (formerly Any router ACC) Extended Systems ExtendNet 4000 / Firewall Extended Systems Print Servers Extreme All Summits extreme black diamond Extreme All Flowpoint 144, 2200 DSL Routers FlowPoint 144, 2200 DSL Routers Flowpoint 2200 Flowpoint 2200 fore Fore Systems ASX 1000/1200 Foundry Networks ServerIronXL fujitsu l460 Future Networks FN 110C Docsis cablemodem gatway solo9100 General Instruments SB2100D Cable Modem gonet Hewlett Packard HP Jetdirect (All Models) Hewlett Packard MPE-XL Hewlett Packard MPE-XL Hewlett Packard Hewlett Hewlett Hewlett Hewlett hp hp IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM ibm IBM IBM IBM IBM Imperia Software Intel Intel Intel Intel Intel Ipswitch janta sales janta sales Jetform Kawa Packard Packard Packard Packard MPE-XL MPE-XL MPE-XL MPE-XL MPE-XL 4150 AS/400 AS/400 AS/400 NetCommerce PRO LAN Server / OS/2 2210 DB2 Lotus Domino Go WebServer (net.commerce edition) AS400 RS/6000 AS400 AS400 as400 AS/400 AS/400 ra6000 AIX Imperia Content Managment System 510T All Routers All Routers Intel PRO/Wireless 2011 Wireless LAN Access Point wireless lan access Point Whats up Gold 6.0 254 254 Jetform_design -
hostname/ip address netman netman admin admin admin Admin ami test fast none HELLO HELLO HELLO
sysadmin netman netman admin extendnet password admin Serial Num Serial Num test abd234 none MANAGER.SYS MGR.SYS FIELD.SUPPOR T CAROLIAN CCC COGNOS HPOFFICE qsecofr qsysopr qpgmr ncadmin password trade db2admin webibm QSECOFR ibm QSECOFR QSRVBAS QSRV QUSER superuser admin babbit babbit Intel comcomcom admin janta211 janta211 -
MGR MGR OPERATOR MANAGER qsecofr qsysopr qpgmr 3.2 ncadmin 2.1, 3.0, 4. username RIP def WinNT db2admin ANY ? Any AIX OS/400 OS/400 AIX Unix Unix/NT webadmin QSECOFR root QSECOFR QSRVBAS QSRV QUSER superuser
LPS1-T Print Server MSS100, MSSVIA, UDS10 LSB4 Printer and Lantronix terminalservers LGIC Goldstream Linkou School Linkou School Linksys Cable/DSL router Linksys BEFSR7(1) OR (4) linksys Linksys BEFSR41 Livingston Livingston_portmaster2/3 Livingston Livingston_officerouter Lucent Portmaster 2 Lucent Cajun Family lucent Portmaster 3 Lucent Packetstar (PSAX) Lucent AP-1000 lucent dsl lucent macromedia freehand MacSense X-Router Pro mcafee microcom hdms Micron Microrouter (Cisco) Any Microrouter (Cisco) Any Microsoft Microsoft Microsoft Microsoft Microsoft Microsoft MICROSOFT Microsoft MICROSOFT Microsoft microsoft Microsoft microsoft mICROSOFT Microsoft Microsoft Motorola Motorola motorola msdloto msdloto Multi-Tech Nanoteq NetApp Netgaer Netgear Netgear Netgear Netgear Netgear Netgear netgear netlink Netopia Netopia Netscreen Windows NT Windows NT Windows NT SQL Server Windows NT NT NT Windows NT NT Ms proxy 2.0 Key Managment Server Motorola-Cablerouter Motorola-Cablerouter cyber surfer msdloto RASExpress Server NetSeq firewall NetCache RH328 RH348 ISDN-Router RH348 RT311 RT314 RT338 RT311/RT314 rt314 R7100 455 NS-5, NS10, NS-100
any any -
system system system system LR-ISDN bill bill admin admin admin blank blank none root !ishtar lucenttech1 public admin hdms letmein letmein pkooltPS start user admin user password router router none NetSeq NetCache 1234 1234 1234 1234 1234 1234 1234 admin netscreen
2.5.1 LR-ISDN bill bill Any Standalone R blank (blank) !root !root !root root unknown !root readwrite public 9 admin unknowen system bios Any Any Administrato All r All Guest All Mail sa 4.0 pkoolt 4.0 free user 4.0 admin 4.0 free user Windows NT 4 cablecom cablecom 5.30a guest * admin any admin Any Admin Any Admin admin 4.6.2 admin v3.1 2.0 netscreen
NeXT Nokia - Telecom NZ M10 Nortel Meridian 1 PBX Contivity Extranet Nortel Switches Nortel Nortel Nortel Networks (Bay) Northern Telecom(Nortel) Novell Novell Novell Novell Novell Novell Novell Novell Novell Novell Novell Novell Novell Novell novell ODS Optivision Oracle Oracle Oracle Oracle Oracle Oracle oracle oracle oracle co. Osicom(Datacom) Pandatel PlainTree RapidStream realtek Remedy Research Machines Rodopi ROLM Samba schoolgirl Securicor3NET Securicor3NET SGI SGI SGI SGI Norstar Modular ICS Norstar Modular ICS Instant Internet Meridian 1 NetWare NetWare NetWare NetWare NetWare NetWare NetWare NetWare NetWare NetWare NetWare NetWare NetWare NetWare 1094 IS Chassis Nac 3000 & 4000 8i Internet Directory Service 7 or later 7 or later 7 or later 8i Database engines Osicom(Datacom) EMUX Waveswitch 100 RS4000-RS8000 8139 Any Classroom Assistant Rodopi billing software 'AbacBill' sql database phones/phone mail SWAT Package member Monet Cezzanne all Embedded Support Partner IRIX IRIX
NeXTStep 3.3 me Telecom OS Release 2 0000 2.x Any Any Any Any any Any Any Any Any Any Any Any Any Any Any Arcserve Any 4.x any 8.1.6 any Any all every all Linux Any Windows 95 admin **ADMIN (**23646) **CONFIG (266344) guest PRINT LASER HPLASER PRINTER LASERWRITER POST MAIL GATEWAY GATE ROUTER BACKUP CHEY_ARCHSVR WINDOWS_PASS THRU ods root sys
Telecom 0000 setup ADMIN (23646) CONFIG (266344) m1link WONDERLAND ods mpegvideo change_on_in stall
cn=orcladmin welcome system sys Scott internal sys sysadm admin rsadmin Demo manager rodopi Any Local User ich manager manager root Administrato r lp OutOfBox, demos, guest, 4DGifts manager change_on_in stall Tiger oracle change_on_in stall sysadm admin default.pass word rsadmin changeme rodopi 111# Local User password hci friend friend n/a Partner lp (none by default)
SGI Shiva Shiva Shiva SMC soho Solaris sonic wall SonicWall SpeedStream Spider Systems Sprint PCS Ssangyoung Sun Sun surecom Symnatec SysKonnect SysKonnect Tekelec Telebit Terayon Terayon Terayon Terayon terayon Terrayon Titbas TopLayer Toshiba toshiba toshiba TrendMicro Trintech Ullu ka pattha USR Vina Technologies voy WatchGuard Webmin Webramp Win2000 Windows 98 se Wireless Inc. Xylan Xylan Xylan xyplex Zyxel zyxel Zyxel Zyxel Zyxel ZYXEL Zyxel Zyxel Zyxel zyxel
IRIX LanRover AccessPort Any? Barricade nbg800 any firewall device Any Firewall Device M250 / M250L SCH2000 SR2501 ep3501/3506 6616 6616 Eagle STP netblazer 3.* TeraLink Getaway TeraLink 1000 Controller TeraLink 1000 Controller TeraLink Getaway AppSwitch 2500 TR-650 480cdt ISVW (VirusWall) eAcquirer App/Data Servers Gand mara TOTALswitch ConnectReach FireBox Webmin 410i etc... Quick Time 4.0 98 se WaveNet 2458 Omnistack 1032CF Omnistack 4024 Omniswitch mx-16xx ISDN-Router Prestige 1000 prestige 300 series ISDN Router Prestige 100IH prestige 300 series prestige 600 series 641 ADSL prestige 128 modem-router ISDN-Router Prestige 1000 ISDN-Router Prestige 1000 -
ALL any? Any unknown admin see notes SunOS 4.1.4 Solaris own os 6.29 SCO Any V2.01.00 any Gandoo Any 3.6.2 3-4.6 Any Unix/Lin Englisch n/a 3.2.8 3.4.9 3.1.8 zynos 2.* any any any -
EZsetup root hello Guest admin password admin Menu - 8 - 0 (see notes) root admin default.pass word default.pass word eagle setup/snmp admin admin user user admin haasadm siteadmin admin admin t3admin Bhosda none (none) admin wradmin root admin admin admin setpriv -
hello blank admin 1234 password hello 040793 2501 surecom eagle setup/nopass wd password password password password nms lucy99 toplayer tr650 admin Trintech Lund amber (none) wg (touch password) trancell rootpass password password switch system 1234 1234 1234 1234 1234 -
("." (finish)
q (quit),
n (next), d (delete), r (reply), h (display SMTP (helo (authorize), mail from: (snd data (mail body), "." (finish) ) POP3 (user [username], pass [password], (retrive message n), dele [n] (delete Get file from ftp-host Get multiple files from ftp-host (can use Copy file to ftp-host
Who is connected Similar to who just displays more info, Display info about logged on users Display info about user Scans for a name or handle Scans the whole remote network for Display the effective current username List user & group ids List the num last users who have logged in,
route Routing (add host/net target gateway 0) netstat -nr Routing table. Show network status ifconfig [device] Show the stats of network device, or all devices: -a ifconfig lo0:1 10.0.2.20 127.0.0.1 up Enables a previously added route (very important!) Put this at the end of the file: /etc/init.d/sysid.net traceroute [hostname] Tracing IP packet from this host to hostname Jobs: ----jobs ps $USER) CTRL + Z kill [pid] / CTRL + C immediately) bg calling fg fg [num] comm & nohup comm & terminal is down CTRL + U CTRL + S CTRL + Q Directories: -----------pwd directory cd [dirname] dirname wil go to your home ~username moves you to mkdir rm, rmdir [dirname] dircmp ln -s [realpath alias] df -bk disktool -u [dir] fsck interactive repair Files: -----ls -l (don't list contents of a folder),
List jobs running in the background List current processes (ps -aef | grep Suspend Kill a job (use pid returned by ps; -9 exit Send to background. Returns num to use when Send to foreground Execute command in background Continue execution of command even when New commandline Stop output Continue
Display the pathname of the current working Change to directory dirname (cd without directory, cd .. moves one directory up, cd username's homedir) Make directory Remove (unlink) files or directories Compare directories Make symbolic links to files Report free disk space on file systems Display disk usage o directory File system consistency check and
List files
-R (recursively subdir listing) ) mv [old new] Move or rename a file or directory (no -r needed) cp [-r file] Copy file (-r (copy directory) ) tar -cf - [source] | (cd [target]; tar -xfvp-;) Fast copying using tar (p: keep permissions, v: verbose) cd [source]; tar -cf - . | (cd [target]; tar -xfvBp - ) Another possibility (p: keep permissions) rm [-rf file] Remove file (-f (don't prompt user), -r (remove directory) ) perl -p -i.old -e 's/oldstring/newstrin/g' *.txt Search and replace of a string in multiple files chmod [o+r file] Change access for file (-R recursively) {u=rw,og+r,a-w} chmod [ugo] 4=r 6=rw 5=rx 7=rwx {644=rw_r__r__} umask [x] Without param=disp with=set {27=rwxr_x__ 67=rwx______} chown [user:group file] Change owner of file chgrp [group] Change the group ownership of a file more [file] Type file (b=back, v=VI, /[string] (search for string) ) cat [file1 file2] > targetfile Concatenate files
catman split -b [bytes file] csplit context dd formats find [path criteria] [n] (changed n days ago),
Create the cat files for the manual Split file to packets with size bytes Split a file with respect to a given Convert and copy files with various data Searches for files (-name ['name'] -mtime
-atime [n] (last read n days ago), -group [gname]) volcheck Mount floppy, content will become visible in /floppy/floppy0 eject After leaving the /floppy/floppy0 directory ejetct the disk fdformat Format a floppy for UNIX fddisk -fmt -f /dev/rfd0a Format a floppy on trevano mformat a: Format a floppy for MS-DOS mcopy [unixfile a:dosfile] Copy to a dos disk or the other way round mdel [a:dosfile] Delete a MS-DOS file dos2unix [file] Convert text file from MS-DOS format to Unix/ISO format unix2dos [file] Convert text file from Unix-ISO format to MS-DOS format mcopy [unixfile a:dosfile] Copy to a dos disk (better use the directory /floppy/floppy0) xhfs Use Mac disks (HFS file system) hfs Use Mac disks (mount /vol/dev/aliases/floppy0, copyin, copyout, dir) perl -p -i.old -e 's/\r/\n/g' [files] Replaces returns with linefeeds (convert from mac to unix or dos to unix) diff [file1] [file2] Compares two files and display line-by-line differences diff3 Display line-by-line differences between 3 files diffmk Mark differences between versions of a troff input file touch [filename] Update the access and modification times of a file mkfile Create a file (e.g. for swap space) Programming: -----------make regenerate programs and files cc gcc [file.c] g++ [file.C] cxx adb, dbx dbxtool debugger cxref cflow javac [file.java] pc Compression: -----------gzip [file] gunzip [file] tar -cvf [targetfile.tar] [source] files tar -xvf [file] tar -tvf [file] archive compress [file] uncompress [file] zcat [file] Printing: --------lpr [-P[printer] file] -#2 (two copies) )
Build source code. Maintain, update, and C Compiler C Compiler C++ Compiler C++ Compiler Debugger SunView interface for the dbx source-level Generate a C program cross-reference Generate a flow graph for a C program JAVA-Compiler Pascal compiler
Compress file (.gz) Decompress file (.gz) Create archive (.tar) from multiple source Unpack archive (.tar) List archive (.tar) doesn't expand the Compress file (.Z) Decompress file (.Z) Display expanded contents
lp [-d[printer] file] -n2 (two copies) ) lp cancel lpc lprm mapge -[num] -h [file] | lpr option) nenscript [-p- file] nenscript [-p- file] | lpr lpq lprm [job-ID] lpstat -a lptest psp1 [file] / psp2 [file] a2ps Other Commands: --------------man [comm] apropos [expr] where [comm] grep, egrep, fgrep [expr] case sensitive), -c (count cut file cut [-c Num-Num] [comm] > [file] [comm] >> [file] [comm] < [file] [comm1] | [comm2] lynx (quit), left (back), enter
Cancel requests to a printer Line printer control program Remove jobs from the printer queue Print num pages on one page with header (-h Translate file to Postscript (stdout) Translate file to PS and print it List queue Remove job from queue List all available printers Generate lineprinter ripple pattern Print text (user defined script) Convert text files to ps (nicely formatted)
Get info about command (-k keyword) Get info about related commands Show path of command Filters out lines containing expr (-i (not only), -v (inverse) ) Remove selected fields from each line of a Cuts lists Write output of command to file Append output of command to file Content of file => input of command Output of command1 => input of command2 Text based version of netscape (g (go), q
(follow link), Search: http://www.google.com) alias [alias comm] Define alias for long commands stty Set or alter the options for a terminal stty erase \^\? Set erase key to backspace (or other terminal settings) h Display history (on trevano only) echo [$var] Print value of var or expr {HOME, PATH, SHELL, USER, PRINTER, DISPLAY} setenv [var val] Set var to val {HOME, PATH, SHELL, USER, PRINTER, DISPLAY} CTRL + ARROW Switch workspace xsetroot -solid blue Set background xinit Initialize X-Server (use strtx to start XServer) rup [hostname] Status of host boot sd(0,6,2) Boot from CD-ROM (check with probe-scsi first) halt / fasthalt Shut down (root only) boot Reboot the system halt Halt the system fastboot Reboot the system without checking the disks fasthalt Halt the system without checking the disks su Become super user (or any other user) starting NFS /usr/lib/nfs start all apps there perl -p -i.old -e 's/oldstring/newstrin/g' *.txt Search and replace of a string in multiple files clear Clear screen nslookup Resolve domain names (server [dnsserver] (specify damain e.g: ElfQrin.com) adduser procedure for adding new users arch display the architecture of the current host at, batch execute a command or script at a specified time atq display the queue of jobs to be run at specified times atrm remove jobs spooled by at or batch automount automatically mount NFS file systems awk pattern scanning and processing language banner display a string in large letters bar create tape archives, and add or extract files basename, dirname display portions of pathnames and filenames
biff give notice of incoming mail messages cal display a calendar calendar a simple reminder service cb a simple C program beautifier click enable or disable the keyboard's keystroke click clock display the time in an icon or window cmdtool run a shell (or program) using the SunView text facility cmp perform a byte-by-byte comparison of two files colrm remove characters from specified columns within each line config build system configuration files cpio copy file archives in and out crontab install, edit, remove or list a user's crontab file ctrace generate a C program execution trace date display or set the date dc desk calculator devinfo print out system device information dkinfo report information about a disk's geometry and partitioning dname print RFS domain and network names domainname set or display name of the current NIS domain dos SunView window for IBM PC/AT applications du display the number of disk blocks used per directory or file dump, rdump incremental file system dump dumpfs dump file system information edquota edit user quotas eeprom EEPROM display and load utility enablenumlock, disablenumlock enable or disable the numlock key env obtain or alter environment variables for command execution eqn, neqn, checkeq typeset mathematics error categorize compiler error messages, insert at responsible source file lines expand, unexpand expand TAB characters to SPACE characters, and vice versa exportfs export and unexport directories to NFS clients exports, xtab directories to export to NFS clients expr evaluate arguments as a logical, arithmetic, or string expression extract_patch extract and execute patch files from installation tapes extract_unbundled extract and execute unbundled-product installation scripts factor, primes factor a number, generate large primes file determine the type of a file by examining its contents fmt, fmt_mail simple text and mail-message formatters fold fold long lines for display on an output device of a given width fonftlip create Sun386i-style vfont file fontedit a vfont screen-font editor format disk partitioning and maintenance utility fortune print a random, hopefully interesting, adage from display the sender and date of newly-arrived mail messages fstab, mtab static filesystem mounting table, mounted filesystems table f77 running Fortran on Suns gfxtool run graphics programs in a SunView window groups display a user's group memberships gterm virtual graphics terminal for the SunView environment gxtest stand alone test for the Sun video graphics board head display first few lines of specified files hostid print the numeric identifier of the current host hostname set or print name of current host system hosts host name data base hosts.equiv, .rhosts trusted remote hosts and users iconedit create and edit images for SunView icons, cursors and panel items id print the user name and ID, and group name and ID imtool image display server for the SunView environment indent indent and format a C program source file iostat report I/O statistics join relational database operator lastcomm show the last commands executed, in reverse order
ld, ld.so link editor, dynamic link editor ldd list dynamic dependencies leave remind you when you have to leave lex lexical analysis program generator logname get the name by which you logged in look find words in the system dictionary or lines in a sorted list mach display the processor type of the current host mail, Mail read or send mail messages mailtool SunView interface for the mail program mkfs construct a file system mkproto construct a prototype file system mount, umount mount and unmount file systems mt magnetic tape control nawk pattern scanning and processing language newaliases rebuild the data base for the mail aliases file newfs create a new file system nice run a command at low priority nl line numbering filter nroff format documents for display or line-printer od octal, decimal, hexadecimal, and ascii dump pagesize display the size of a page of memory paste join corresponding lines of several files, or subsequent lines of one file perfmeter display system performance values in a meter or strip chart ping send ICMP ECHO_REQUEST packets to network hosts pr prepare file for printing, perhaps in multiple columns printenv display environment variables currently set pstat print system facts quota display a user's disk quota and usage rc, rc.boot, rc.local command scripts for auto-reboot and daemons rcp remote file copy rdate set system date from a remote host rdist remote file distribution program reboot restart the operating system renice alter nice value of running processes repquota summarize quotas for a file system restore, rrestore incremental file system restore rev reverse the order of characters in each line rsh remote shell ruptime show host status of local machines script make typescript of a terminal session sdiff contrast two text files by displaying them side-byside sed stream editor sh shell, the standard UNIX system command interpreter and command-level language shelltool run a shell (or other program) in a SunView terminal window showmount show all remote mounts shutdown close down the system at a given time sleep suspend execution for a specified interval sort sort and collate lines spell, hashmake, spellin, hashcheck report spelling errors spline interpolate smooth curve strings find printable strings in an object file or binary strip remove symbols and relocation bits from an object file sundiag system diagnostics suninstall install and upgrade the SunOS operating system sunview the SunView window environment swapon specify additional device for paging and swapping symorder rearrange a list of symbols sync update the super block; force changed blocks to the disk tabs set tab stops on a terminal tail display the last part of a file tbl format tables for nroff or troff tcopy copy a magnetic tape tee replicate the standard output tektool SunView Tektronix 4014 terminal-emulator window test return true or false according to a conditional expression textedit SunView window- and mouse-based text editor time time a command
toolplaces other attributes tput tr trace traffic troff tset, reset tsort tty tunefs uniq units unmount, umount uptime users vacation vi, view, vedit vipw vmstat wall wc whatis whereis a command which yes
display current SunView window locations, sizes, and initialize a terminal or query the terminfo database translate characters trace system calls and signals SunView program to display Ethernet traffic typeset or format documents establish or restore terminal characteristics topological sort display the name of the terminal tune up an existing file system remove or report adjacent duplicate lines conversion program remove a file system show how long the system has been up display a compact list of users logged in reply to mail automatically visual display editor based on ex edit the password file report virtual memory statistics write to all users logged in display a count of lines, words and characters display a one-line summary about a keyword locate the binary, source, and manual page files for locate a command; display its pathname or alias be repetitively affirmative
CSH: ---csh is a shell (command interpreter) with a C-like syntax and advanced interactive features csh, %, @, alias, bg, break, breaksw, case, continue, default, dirs, else, end, endif, endsw, eval, exec, exit, fg, foreach, glob, goto, hashstat, history, if, jobs, label, limit, logout, notify, onintr, popd, pushd, rehash, repeat, set, setenv, shift, source, stop, suspend, switch, then, umask, unalias, unhash, unlimit, unset, unsetenv, while Important directories and files: -------------------------------~/.fvmrc ~/.dtwmrc ~/.dt/* of launch pad), other DTWM ~/.tcshrc ~/.cshrc ~/.login executed once) ~/.rhosts ~/.httpusers ~/.pap-secrets ~/.slirprc ~/.ppprc ~/public_html /usr/bin /usr/local/bin /opt/gnu/bin /usr/sbin /usr/share/man /dev disk drives /vol /etc (startup e.g. S72inetsvc (routing) (DNS IP addresses), hosts, shells (users and their shell and its service), nsswitch.conf (in resolving), ppp/ (pap-secrets and
Window mangager configuration (FVWM) Window mangager configuration (DTWM) (errorlog, startlog, icons, types (setting resources) TC-Shell settings C-Shell settings Login script (for desktop login only, Remote hosts file Alowed users for secret pages PAP secrets for slirp Slirp and ppp config files Home Page directory Applications More applications Gnu stuff like g++, gcc, gzip and more System tools Manual files Devices like ttya (serial port), audio and Automounted volumes (rc2 (things to do at startup), rc2.d passwd, shadow (passwords), resolve.conf ftpusers (users who can't access ftp), important for ftp), services (port numer colum hosts we have to write dns to use dns
[interfacename] (hostname associated (mounting table), ssh_* (ssh stuff) /usr/var/log /usr/local/WWW/logs /var/adm startup process (for debugging /var/spool/mail /usr/local/WWW /usr/local/etc/httpd /usr/dt/config/C/* (Configuration file for the Login
other ppp settings), nodename, hostname. with this interface e.g. le0), fstab ) Home Page Log on SUN Home Page Log on OSF1 messages (Messages from applications and purposes), sulog) Mail (on SUN: /var/mail) WWW-directory (e.g. settings and CGI) WWW-directory on gummibaum Default desktop settings (Xresources
Manager), sys.dtwmrc (default windowmangager configuration), and others) /soft/public/X11/lib/fvwm/system.fvwmrc System fvwmrc file /etc/issue.net Welcome message (before login in) VI: --<ESC> i I a A o O J r R x dd D h / l j / k w,b,e H L M G p ctrl + f ctrl + b :/[string] :?[string] :[n] :w :q :x Navigation inside more, man... -----------------------------SPACE B ENTER Q X-Windows Progs: ---------------xterm / dtterm xmailtool / mailtool emacs / textedit xcalc xv xlock xset Alias: ------alias ls Moves one page down Moves one page up Moves one line down Quit
Command mode Insert Insert at beginning of a line Insert after Insert at the end of the line Insert a line below Insert a line above Connect this and the next line Change char Overwrite Delete char Delete line Delete rest of line Move left / right Move down / up Move cursor one word Home End Middle Go to bottom Undo Page down Page up Search for string Search backwards Goto line n Save Exit Save & exit
Terminal Mail Word processor Calculator Graphic viewer and converter Lock up X-Win settings
ls -l
alias rm rm -rf prompting user alias cp cp -r alias df df -bk alias ps ps -aef | grep $USER alias txt2ps nenscript -palias psp1 /~/Script/psprint1 alias psp2 /~/Script/psprint2
Remove files and directories without Copy files and directories Display free space and used space in bytes List all jobs of user Translate text to PostScript (stdout) Print text on dali Print text on ps2
Shell: -----starts with: #!/bin/sh, contains command lines, must have x-permission, start with ./Scriptname, *=any string (except .), ?=any char, [a-d]=any char from a to d (lower case), be carefull with special chars &=\&, to execute at a specific time use: at hh:mm +[minutes] minutes < Scriptname, to divert to nirvana stout: >&- or stin: <&AltaVista: ---------Standard: <+>="AND" <space>="OR" Advanced: AND OR NEAR URL () NEAR 3.0) )