Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to automate the following scenario:
Login into a router
Give reload
When reloading a router, press ESP key continuously.
When pressing a ESP key , boot> prompt will come. execute some commands in this.
I can do the above things manually, using "Teraterm" and console. But how to do this inside a TCL script.
Please help me to do this.
Thanks,
Balu P.
You first need to find an interactive console program that you can issue the commands from. You may find that plink.exe from the PuTTY suite is suitable. The system telnet.exe is not suitable, as it has a special flag set on it that prevents automation, and TeraTerm isn't suitable because it is a GUI program as far as I can see (GUI program automation is very difficult to say the least, and you probably don't want to do it if there's any easier way).
Once you can do the task interactively, plug it inside of an expect script. It's fairly straight forward.
Start with spawn, making the program run and passing in the arguments required to connect to the other system.
Interact with the remote system.
Listen for a suitable prompt with expect. (Remember, this might include prompts to send a username and password!)
Tell it what to do with send. Remember that \r is how you send a Return.
When you're done, close.
Of course, things get more complex when you're also dealing with conditionals, error conditions and timeouts; expect can handle those, but the code is a bit more complex. Ask another question once you've got a concrete problem we can help you with.
I have use console server to automate this. Its working fine
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
Last year I started to develop a small "program" (not sure how this is called) in Access to help the family shop with the stock list and product prices, etc.
A few months ago, a client of the company started to ask for my Access's program because he needed one for its stock and they haven't found one yet. I was a bit scared of giving them the program because they could copy and steal my work.
Finally, my family suggested me to encrypt it in order to not be able to open its code, but I don't know how to do it.
So my questions are:
Is there a way to block the access to my VBA code in each Form? Through MS Access config or with more code, for me, it's the same.
Is there a way to block the duplication of its Forms or the whole file?
How can I secure my code?
I'm using MS Access 2016.
Edit: I've already got 2 downvotes and close flags, if you could explain to me in comments which thing do you think it's wrong I could try to fix it.
Access 2016 allows you to save as .accde format which is in effect an executable file. It seems that is what you need
Heres's how
you can also hide most of the Access environment so users can't really tell its Access
like so
Saving as an executable file as SEarl1986 said may be your best bet. I am unsure what happens to their database if you need to update your code tho.
Another way is to open Visual Basic, go to Tools, and "yourfilenames" properties, then under the protection tab you can "lock the project for viewing" and add a password.
It isn't foolproof as their is a method to break the password by editing the file with a hex editing tool, but it's a good lock that will deter most people. It will protect your code from prying eyes.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I've made a webpage on HTML and I want to run a .cpp application on it. With the way I've learnt to do it, the code is displayed.
The only way to do this is ActiveX, which by default is not supported by anything anymore. Only Internet Explorer supports it, but even that needs to be specifically allowed.
But you'd still have to first compile the cpp-code and do quite a huge amount of programming work before you'd have an valid ActiveX -dll. Then you'd also somehow need to deploy it for all website clients.
TL;DR: No, no no no. Running C/C++ for web clients is no-go.
However, if you are looking for something like that website client should be able to invoke a C++ application at the server, this is very possible. You still need to have that application compiled for the server environment though. For small "run and get the results" -tasks I've found it easiest to use ajax to call php -scripts, as php can execute stuff on server.
Signed Java Applets can run executables from browser, but it's not welcomed nowadays.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to automate the following scenario:
Login into a router
Give reload
When reloading a router, press ESP key continuously.
When pressing a ESP key , boot> prompt will come. execute some commands in this.
I can do the above things manually, using "Teraterm" and console. But how to do this inside a TCL script.
Please help me to do this.
Thanks,
Balu P.
You first need to find an interactive console program that you can issue the commands from. You may find that plink.exe from the PuTTY suite is suitable. The system telnet.exe is not suitable, as it has a special flag set on it that prevents automation, and TeraTerm isn't suitable because it is a GUI program as far as I can see (GUI program automation is very difficult to say the least, and you probably don't want to do it if there's any easier way).
Once you can do the task interactively, plug it inside of an expect script. It's fairly straight forward.
Start with spawn, making the program run and passing in the arguments required to connect to the other system.
Interact with the remote system.
Listen for a suitable prompt with expect. (Remember, this might include prompts to send a username and password!)
Tell it what to do with send. Remember that \r is how you send a Return.
When you're done, close.
Of course, things get more complex when you're also dealing with conditionals, error conditions and timeouts; expect can handle those, but the code is a bit more complex. Ask another question once you've got a concrete problem we can help you with.
I have use console server to automate this. Its working fine
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Here is a simplifed example.
I have a c program that runs as a daemon on an embedded linux system. For example we will say the program is a calculator that just does addition.
When someone starts the program, I would like a web server to be launched on the system that allows people to remotely use the calculator. The webserver will just serve a simple html page with 1 button "solve" and two input boxes. When someone clicks solve the numbers in the text box need to be sent to the c program, and then the solution needs to be sent back to the web server and displayed on the website.
I hope this isn't overly broad, but I'm just looking for what technologies would be used to accomplish this and a brief overview of how they interact, and hopefully I can take it from there and start digging in.
You don't need to start an external web server. Since your app is a deamon, you could use some HTTP server library inside your application -i.e. have an embedded HTTP server thru that library, e.g. D.Moreno's libonion, GNU libmicrohttpd, EHS, Mongoose etc..
If you already have an external web server, you could configure it to proxy your internal application web service, or make your application a FastCgi (or maybe SCGI) server.
PS. You need to be familiar with HTML5, HTTP, POST request of HTTP, ...
As the interaction is taken place between processes, I think you need interprocess communication mechanism here. However, you may not allowed to change the code of webserver. Here's some thing may help you:
Use database (mysql) which you can use sql to insert/fetch data both sides.
If you use Php or someother script language, try Sockets
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I am developing an open source desktop twitter client. I would like to take advantage on the new xAuth authentication method, however my app is open source which means that if I put the keys directly into the source file, it may be a vulnerability (am I correct? The twitter support guy told me).
On the other hand, putting the key directly into a binary also doesn't make sense. I am writing my application in python, so if I just supply the pyc files, it is one more seconds to get the keys, thanks to the excellent reflection capatibilities of Python. If I create a small .so file with the keys, it is also trivial to obtain the key by looking at the raw binary (keys has fixed length and character set).
What is your opinion? Is it really a secutiry hole to expose the API keys?
Security hole? In broad terms, yes. Realistically though, these aren't nuclear launch codes we're talking about.
About the worst thing that could happen is that someone could take and use your app's keys to do something against Twitter's TOS that will end up getting the keys banned. No user data would be vulnerable since you're not distributing the user tokens (that would be much worse from a security standpoint). Since anyone can register an app in 2 seconds at no cost, the only reason to do that kind of impersonation would be specifically to besmirch the reputation of you or your app.
One thing you could do is leave them out of the source code but make it clear that user's compiling from source need to obtain their own keys and put them in the appropriate place, but leave them in the binary version that you distribute. Not 100% secure, but makes it that little bit harder that will deter a certain number of n'er-do-wells.