• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Series of commands

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
public ClientConnection(Server server,Socket client,int connection_id)
{
try
{
in=client.getInputStream();
out=client.getOutputStream();
command_file="cmd_"+connection_id+".sh"; // for working linux commands send
output_file="cmd_"+connection_id+".out";
cf_out=new BufferedWriter(new FileWriter(new File(command_file)));
new Thread(this).start();
}
catch(Exception e)
{ System.out.println(e.toString());
}
}

is it possible
command_file="cmd_"+connection_id+".bat";
output_file="cmd_"+connection_id+".out";
my client needed to run until he wanted to no.
run mode like this
Enter Command : dir
Enter command : date
Enter command : N here n is the flag
 
    Bookmark Topic Watch Topic
  • New Topic