Search Results

Search found 874 results on 35 pages for 'scanner'.

Page 4/35 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How do I detect server status in a port scanner java implementation

    - by akz
    I am writing a port scanner in Java and I want to be able to distinct the following 4 use cases: port is open port is open and server banner was read port is closed server is not live I have the following code: InetAddress address = InetAddress.getByName("google.com"); int[] ports = new int[]{21, 22, 23, 80, 443}; for (int i = 0; i < ports.length; i++) { int port = ports[i]; Socket socket = null; try { socket = new Socket(address, port); socket.setSoTimeout(500); System.out.println("port " + port + " open"); BufferedReader reader = new BufferedReader( new InputStreamReader(socket.getInputStream())); String line = reader.readLine(); if (line != null) { System.out.println(line); } socket.close(); } catch (SocketTimeoutException ex) { // port was open but nothing was read from input stream ex.printStackTrace(); } catch (ConnectException ex) { // port is closed ex.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } finally { if (socket != null && !socket.isClosed()) { try { socket.close(); } catch (Exception e) { e.printStackTrace(); } } } } The problem is that I get a ConnectionException both when the port is closed and the server cannot be reached but with a different exception message: java.net.ConnectException: Connection timed out: connect when the connection was never established and java.net.ConnectException: Connection refused: connect when the port was closed so I cannot make the distinction between the two use cases without digging into the actual exception message. Same thing happens when I try a different approach for the socket creation. If I use: socket = new Socket(); socket.setSoTimeout(500); socket.connect(new InetSocketAddress(address, port), 1000); I have the same problem but with the SocketTimeoutException instead. I get a java.net.SocketTimeoutException: Read timed out if port was open but there was no banner to be read and java.net.SocketTimeoutException: connect timed out if server is not live or port is closed. Any ideas? Thanks in advance!

    Read the article

  • My java.util.Scanner won't work

    - by Kevin Steen Hansen
    Hello Stackoverflow my code is getting this error: Skriv din alder herunder og tryk enter: Exception in thread "main" java.util.NoSuchElementException at java.util.Scanner.throwFor(Scanner.java:907) at java.util.Scanner.next(Scanner.java:1530) at java.util.Scanner.nextInt(Scanner.java:2160) at java.util.Scanner.nextInt(Scanner.java:2119) at Tasteturindtastning.main(Tasteturindtastning.java:20) [Finished in 1.7s with exit code 1] Adn my code is: // Starter java som man plejer, læs i HejVerden.java public class Tasteturindtastning { public static void main(String[] arg) { /* Jeg skal nu angive en variable, men jeg kan ikke bestemme denne variable * Da jeg ønsker at indtastningen fra dette tastetur skal være variablen. * I stedet for int og double bruger jeg så java.util.Scanner, som aflæser * brugerens indtastninger. */ java.util.Scanner tastetur = new java.util.Scanner(System.in); // Printer en opgave/spørgsmål til brugeren System.out.println("Skriv din alder herunder og tryk enter:"); int alder; // Angiver et variablenavn alder = tastetur.nextInt(); // Angiver variablen med værdien fra indtastningen /* Herunder gør jeg brug af et if statement der tjekker værdien for * variablen alder, og ser om den er lig med eller højere end 18, og hvis * dette er tilfældet, så udprinter den en sætning */ if (alder >= 18) System.out.println("Du er myndig, da du er " + alder + " år gammel"); // Printes hvis han er 18 eller ældre } } Can snyone tell me what is wrong?

    Read the article

  • Java: Infinite loop using Scanner in.hasNextInt()

    - by Tomek
    Hi everyone, I am using the following code: while (invalidInput) { // ask the user to specify a number to update the times by System.out.print("Specify an integer between 0 and 5: "); if (in.hasNextInt()) { // get the update value updateValue = in.nextInt(); // check to see if it was within range if (updateValue >= 0 && updateValue <= 5) { invalidInput = false; } else { System.out.println("You have not entered a number between 0 and 5. Try again."); } } else { System.out.println("You have entered an invalid input. Try again."); } } However, if I enter a 'w' it will tell me "You have entered invalid input. Try Again." and then it will go into an infinite loop showing the text "Specify an integer between 0 and 5: You have entered an invalid input. Try again." Why is this happening? Isn't the program supposed to wait for the user to input and press enter each time it reaches the statement: if (in.hasNextInt()) Thanks in advance, Tomek

    Read the article

  • Programming Language for RF scanner [closed]

    - by Sid
    I am a Software Developer mostly on Windows System. I have been tasked to create an App Program for an RF Barcode Scanner. Which I don't have any experience in this kind of software. I am open to learn new Programming Languages to develop the software for this barcode scanner. From which I see on our meeting. It uses Windows or Windows Mobile as OS. Can someone direct me to a tut site or just tell me what language I should use? Requirements is mostly, Log In, UI Entry of Details + Barcode, Process Button. Connection To SQL Server via Wifi Access Point to call the procedure afterwards. I am not developing a Barcode scanner, I am developing a UI Software like a Mobile App. I tried to google but I dont know what exact keywords I should search for. My question is, what PL is mostly used to develop this kind of softwares.

    Read the article

  • How can we control the device driver load order in Windows XP ?

    - by Deniz
    We are trying to install both an HP scanner and a Kodak scanner on an XP machine and the problem is that that HP's scanner driver always places itself into the first and default scanner device position. We are using an automation software on that machine which must use the Kodak scanner as the default scanner. The HP flatbed isn't needed to be the default scanner on that machine. It will always be used manually and through its own software. Our developers did some research 2 years ago couldn't find a solution. Nowadays we are preparing to expand our user base and this problem did surface again on machines with the same configuration. I did a more aggresive search pn the net and found some tips like this one : http://support.microsoft.com/kb/115486 I couldn't realize how to suit this solution to my scenario. Could someone please point me to the right direction ?

    Read the article

  • How can I install a scanner by IP?

    - by user54266
    I'm trying to install a scanner by IP the same way you would install a printer by IP. I don't want to install the horrible HP Solution Center software but I don't know how to install a network scanner without the software. I'm having a hard time googling this because when I search for things like "install network scanner" or "install scanner by IP" all the results are for things like Angry IP Scanner which is clearly different than what I'm trying to get. Thanks in advance. This is for Windows Vista, but Windows 7 instructions will do.

    Read the article

  • Brother MFC-J470DW scan function "Check Connection"

    - by user292599
    I have a Brother MFC-J470DW printer that I have connected to a Linux desktop (running Ubuntu 14.04) using a wireless router network. The printer works fine for printing and copying, but now I want to add the scan function. To set up the scan function, I went to the Brother web page for this printer: http://support.brother.com/g/b/downloadlist.aspx?c=eu_ot&lang=en&prod=mfcj470dw_us_eu_as&os=128 and under Scanner Drivers selected "Scanner driver 64bit (deb package)", "Scan-key-tool 64bit (deb package)", and "Scanner Setting file (deb package)". For each package, I clicked the EULA, and selected "open with Ubuntu Software Center". Then after the USC window pops up, I click on Install and the red line goes from left to right. In each case, the USC window then had a green checkmark and the Install box changes to Reinstall (that's how you know it worked). So now I try it out. Hitting the Scan button on the printer, selecting "Scan to file", and hitting ok produces the message "Check Connection". I checked the Brother Linux Information FAQ (scanner) page and the 14th question seems the same as mine: When I try to use the scan key on my network connected machine, I receive the error "Check connection" or I can not select anything except "scan to FTP". I explored the solution given for this FAQ, but found from ifconfig that I am already using eth0, the default setting, so presumably that is not the problem. I also found brscan-skey installed in /usr/bin and did drrm@drrmlinux2:~$ brscan-skey -t drrm@drrmlinux2:~$ brscan-skey but that didn't help - I still get the "Check connection" message. What can you suggest to fix this problem?

    Read the article

  • Google propose un scanner open-source pour aider les développeurs webs à lutter contre les attaques

    Sécurité : Google propose un scanner open-source Pour aider les développeurs webs à lutter contre les attaques XSS et les injections de code Google vient de mettre à la disposition des développeurs webs un scanner open-source qui permet de tester les applications dès les premières étapes de leurs conceptions pour détecter d'éventuelles failles de sécurité. Baptisé Skipfish, l'outil offrirait, d'après les dires de son auteur, des fonctionnalités similaires à celles de Nmap ou Nessus. Il utilise la détection dite heuristique et permet de mettre à jour les vulnérabilités aux attaques de types cross-scritping (XSS) et aux injections SDQ et XML, entre autres failles.

    Read the article

  • File doesn't exist when trying to change permissions following the avasys image scan manual

    - by Howard Graham
    I was finally able to connect to avasys.jp and downloaded and installed iscan_2.28.1-3.ltdl7_amd64.deb iscan-data_1.13.0-1_all.deb. The programs appeared to install correctly. I then ran sane-find-scanner and got back: found USB scanner (vendor=0x04b8, product=0x012d) at libusb:001:003 I then ran lsusb and got back: Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 003: ID 04b8:012d Seiko Epson Corp. Perfection V10/V100 (GT-S600/F650) Bus 001 Device 004: ID 03f0:4817 Hewlett-Packard Bus 002 Device 002: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse the avasys image scan manual instructed me to run chmod 0666 /proc/bus/usb/001/003 which returned chmod: cannot access `/proc/bus/usb/001/003': No such file or directory In 12.04, no such directory exists. 12.04 appears to deal with USB in another way. What must I do to get the usb port 001/003 recognized by xsane and sane as the port where the scanner can be located? What must I do to continue installing the scanner?

    Read the article

  • Canon MP280 All in One prints but scanner not recognized

    - by Chris
    I recently installed Ubuntu 12.04 LTS after not using any Linux distro for several years. My Canon MP280 worked perfectly as far as printing goes and I was even able to set it up on a Samba share and print from a Windows 7 machine. However when I open Simple Scan it does not detect a scanner. I did find some instructions online but the scanner is still not recognized in Simple Scan even after installing a couple .deb packages from the Canon site. I also couldn't seem to find the ScanGear package after installing those .deb packages as well but I haven't had a chance to delve fully into it. Thanks for your time!

    Read the article

  • Question about InputMismatchException while using Scanner

    - by aser
    The question : Input file: customer’s account number, account balance at beginning of month, transaction type (withdrawal, deposit, interest), transaction amount Output: account number, beginning balance, ending balance, total interest paid, total amount deposited, number of deposits, total amount withdrawn, number of withdrawals package sentinel; import java.io.*; import java.util.*; public class Ex7 { /** * @param args the command line arguments */ public static void main(String[] args) throws FileNotFoundException { int AccountNum; double BeginningBalance; double TransactionAmount; int TransactionType; double AmountDeposited=0; int NumberOfDeposits=0; double InterestPaid=0.0; double AmountWithdrawn=0.0; int NumberOfWithdrawals=0; boolean found= false; Scanner inFile = new Scanner(new FileReader("Account.in")); PrintWriter outFile = new PrintWriter("Account.out"); AccountNum = inFile.nextInt(); BeginningBalance= inFile.nextDouble(); while (inFile.hasNext()) { TransactionAmount=inFile.nextDouble(); TransactionType=inFile.nextInt(); outFile.printf("Account Number: %d%n", AccountNum); outFile.printf("Beginning Balance: $%.2f %n",BeginningBalance); outFile.printf("Ending Balance: $%.2f %n",BeginningBalance); outFile.println(); switch (TransactionType) { case '1': // case 1 if we have a Deposite BeginningBalance = BeginningBalance + TransactionAmount; AmountDeposited = AmountDeposited + TransactionAmount; NumberOfDeposits++; outFile.printf("Amount Deposited: $%.2f %n",AmountDeposited); outFile.printf("Number of Deposits: %d%n",NumberOfDeposits); outFile.println(); break; case '2':// case 2 if we have an Interest BeginningBalance = BeginningBalance + TransactionAmount; InterestPaid = InterestPaid + TransactionAmount; outFile.printf("Interest Paid: $%.2f %n",InterestPaid); outFile.println(); break; case '3':// case 3 if we have a Withdraw BeginningBalance = BeginningBalance - TransactionAmount; AmountWithdrawn = AmountWithdrawn + TransactionAmount; NumberOfWithdrawals++; outFile.printf("Amount Withdrawn: $%.2f %n",AmountWithdrawn); outFile.printf("Number of Withdrawals: %d%n",NumberOfWithdrawals); outFile.println(); break; default: System.out.println("Invalid transaction Tybe: " + TransactionType + TransactionAmount); } } inFile.close(); outFile.close(); } } But is gives me this : Exception in thread "main" java.util.InputMismatchException at java.util.Scanner.throwFor(Scanner.java:840) at java.util.Scanner.next(Scanner.java:1461) at java.util.Scanner.nextInt(Scanner.java:2091) at java.util.Scanner.nextInt(Scanner.java:2050) at sentinel.Ex7.main(Ex7.java:36) Java Result: 1

    Read the article

  • I need a piece software to use with my HP F4280 scanner.

    - by D Connors
    So, I got this printer/scanner about a year ago, and I'm really happy with it. The only thing is that I never really liked the HP scanning software that came with it. A few months ago I reformatted and reinstalled windows 7. Then, once I plugged in the printer, I noticed that windows recognized it automatically, and offered to install all the drivers by itself. So instead of manually installing the driver that came in the CD, I simply let windows automatically install it from its servers, and so far it's great. Instead of HP's scanning software (that really wasn't pleasing me), I got a very simplified interface that is more than enough for my ocasional scanning habits. Until today. Today I had to scan a bunch of old pictures for my father. And that simple interface felt like it was lacking quite a few features to make this repetitive task a little easier. And that's why I'm now looking for a good software to use for scanning. By "good" I mean anything well thought out, and specially anything that will make my life easier when repetitive-scanning. It doesn't need to have professional tweaking options, but having them is not a problem either. You guys got anything?

    Read the article

  • I need scanning software to use with my scanner.

    - by D Connors
    So, I got this (HP F4280) printer/scanner about a year ago, and I'm really happy with it. The only thing is that I never really liked the HP scanning software that came with it. A few months ago I reformatted and reinstalled windows 7. Then, once I plugged in the printer, I noticed that windows recognized it automatically, and offered to install all the drivers by itself. So instead of manually installing the driver that came in the CD, I simply let windows automatically install it from its servers, and so far it's great. Instead of HP's scanning software (that really wasn't pleasing me), I got a very simplified interface that is more than enough for my ocasional scanning habits. Until today. Today I had to scan a bunch of old pictures for my father. And that simple interface felt like it was lacking quite a few features to make this repetitive task a little easier. And that's why I'm now looking for a good software to use for scanning. By "good" I mean anything well thought out, and specially anything that will make my life easier when repetitive-scanning. It doesn't need to have professional tweaking options, but having them is not a problem either. You guys got anything?

    Read the article

  • How do I keep a scanner from throwing exceptions when the wrong type is entered? (java)

    - by David
    Here's some sample code: import java.util.Scanner; class In { public static void main (String[]arg) { Scanner in = new Scanner (System.in) ; System.out.println ("how many are invading?") ; int a = in.nextInt() ; System.out.println (a) ; } } if i run the program and give it an int like 4then everything goes fine. if, on the other hand, i answer too many it doesn't laugh at my funny joke. instead i get this: (as expected) Exception in thread "main" java.util.InputMismatchException at java.util.Scanner.throwFor(Scanner.java:819) at java.util.Scanner.next(Scanner.java:1431) at java.util.Scanner.nextInt(Scanner.java:2040) at java.util.Scanner.nextInt(Scanner.java:2000) at In.main(In.java:9) is there a way so that i can make it so that it either ignores entries that aren't ints or re prompts with "how many are invading?"? i'd like to know how to do both of these.

    Read the article

  • Canon MG8150 - unable to scan document to PC via wireless router, but works via USB connection?

    - by Heidi
    Please help. Get error that scanner disconnected or locked "code:5,146,555" when I try to scan a document to PC or attach to an email. Can't remember this function ever working and I've had this MFD for 2-3 years now. Printer function works fine via wireless, but not scanning. Upgraded my laptop a few months ago from Windows 98 to Windows Vista and reinstalled my printer/scanner software and drivers. Any ideas?

    Read the article

  • Scanner Review: HP Scanjet Professional 1000

    Your notebook computer's newest companion: a $249 ultraportable scanner that takes next to no briefcase space to turn double-sided documents, images, and business cards into PDFs, e-mails, and Outlook entries. We put the peripatetic peripheral to the test.

    Read the article

  • Scanner Review: HP Scanjet Professional 1000

    Your notebook computer's newest companion: a $249 ultraportable scanner that takes next to no briefcase space to turn double-sided documents, images, and business cards into PDFs, e-mails, and Outlook entries. We put the peripatetic peripheral to the test.

    Read the article

  • Website cookie scanner

    - by user359650
    I'm in charge of a relatively big corporate website (circa 95K pages) and need to perform a cookie audit. I can see cookies issued on a per-page basis with Chrome or Firefox console, but given the amount of pages I need a tool to automate the process. I tried to google for website cookie scanner but my search was unfruitful and found: either online tools which only scan the home page paid services (ex1, ex2) Does any of you know about a tool to scan an entire website and generate a report showing which cookies are being used and which page set them?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >