Putty - Can't See Top of Error Stack Trace [closed] - c++

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am coding on Putty (in C++ for what it's worth) and I am currently encountering an error that gives me a really long stack trace. Apparently, the trace is so long that Putty won't let me scroll to the very top where it originated (where I typed "make"). Is there any way around this (except by obviously fixing the error)?

There are two ways.
Change the Window buffer size. Open Putty, load the connection (don't double-click or hit open), click on Window on the left panel and increase the Lines of scrollback to something like 3000 (I think the default is 200).
Same way, load the connection, and then on the left panel under Session you will have the sub-category logging where you can set a file where the entire session history will be recorded.

To increase the lines of scrollback, before you make a putty connection, click on the category Window and increase the lines of scrollback to 10000 or 20000 as may suit you.

Related

How to prevent a windows application from being killed/terminate or stop [closed]

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 6 years ago.
Improve this question
I have a windows c++ application which runs under the normal (non-admin) user. I want that no user should be able to close/stop/terminate this application by any means.
Is there any active directory group policy available to achieve this or I need to do some programming for the same
The only way I know is that your app will launch run 2 or more background processes that check every few ms that your app and the other backgrounds are running, if not it re-launches them.This makes it very had or impossible to terminate your app manually.
You application might need to save its state to disk , if it needs to re-launch to the same stat is was when destroyed
you can also disable the close button or whatever can terminate your application. Also disable the taskmanager so users cannot kill your application
There is a technique called hooking which will allow injection of your code into Windows DLL's, altering certain behaviours performed by the operating system.
This would prevent the operating system killing these proccesses using the core DLL's.
There is a downside to this method though as it may flag up as a virus on anti-rootkit systems as this is a technique often used to prevent the user from killing an infection.

Limited .exe Output in C++ [closed]

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 6 years ago.
Improve this question
I'm sure this is a simple question, but I tried a couple google searches and wasn't sure what keywords to search.
After executing my program in C++ the .exe window that opens is only showing the bottom part of my output, while cutting off the top. Any thoughts on how to view all of my output?
Thank you.
You can redirect the output of the program to a file:
your-program.exe > file.txt
Alternatively, you can pipe the output into more:
your-program.exe | more
This will pause the output of your program when it fills one screen until you press the space bar.
Both approaches have their pros and cons: if you redirect the output to file and open that file while the program is running, you might not see the last chunk of data, because the OS might buffer the data before writing it to hard disk.
If you pipe the output into more then the execution of your program might be suspended while more is waiting for your input.
[Edit: incorporated enhzflep's suggestion of using a redirection to a file.]
suppose you have an "a.exe" program
execute the program like this:
a.exe >1.txt
and open the file "1.txt" with notepad or other editor(such as notepad++).

Coldfusion scheduler event Handler cannot be found [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
Trying to add an Event handler to a scheduled task in ColdFusion11.
I'm supposed to write a component that implements CFIDE.scheduler.ITaskEventHandler and "Specify a dot-delimited CFC path under webroot, for example a.b.server (without the CFC extension)"
I tried to put my component under
ColdFusion11/cfusion/wwwroot
ColdFusion11/cfusion/wwwroot/CFIDE
ColdFusion11/cfusion/wwwroot/CFIDE/scheduler
the Apache webroot
some virtual host webroot
I tried to add some dot notation (?) like CFIDE.scheduler.myEventHandler...
I don't understand if there is some more configuration at server level to understand.
I don't see any error in logs, the scheduler editor just refuse to save an EventHandler he cannot find, with the error
An error occured scheduling the task.
Invalid eventhandler.
Error: Eventhandler myEventHandler could not be found
Any help appreciated
The correct way seems to put the component in ColdFusion11/cfusion/wwwroot/myEventHandler.cfc, set the path as myEventHandler and implement in the component "CFIDE.scheduler.ITaskEventHandler"

Issue while entering response on console [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am connecting to machine using Telnet function, pushing some file to it using Putty and till date it worked fine. But now all of sudden, it has started throwing me an error while I am trying to push some file to the machine using subprocess.Popen().
The error is :
Result: WARNING - POTENTIAL SECURITY BREACH!
The server's host key does not match the one PuTTY has
cached in the registry. This means that either the
server administrator has changed the host key, or you
have actually connected to another computer pretending
to be the server.
Update cached key? (y/n, Return cancels connection) Connection abandoned.
Lost connection
I want to add one step in my scrip that, if console has something like this, then it enter "Yes/y" on console.
I have tried this thing to make it over :
if 'Result: WARNING - POTENTIAL SECURITY BREACH!' in sys.argv:
raw_input("y\n")
time.sleep(1)
But it is not working.. Any help on this!!!
For the first part of your question, you should look in the Registry key HKEY_CURRENT_USER\SoftWare\SimonTatham\PuTTY\SshHostKeys to remove the host computer whose host key has changed (see https://superuser.com/questions/197489/where-does-putty-store-known-hosts-information-on-windows).
For the second part, raw_input() is used to get input from the user, not for submitting values to a subprocess. I'm not sure, but I think that PuTTY's pscp would be getting it's y/n value from stdin, so you could either use subprocess's Popen() to always pass in a "y" just in case (see Python - How do I pass a string into subprocess.Popen (using the stdin argument)?) or you can try passing pscp the "-batch" argument, which sounds like it shouldn't prevent the prompt (see http://the.earth.li/~sgtatham/putty/0.62/htmldoc/Chapter5.html#pscp-usage).

Linux is there any way to set IP address permanently using C/C++? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I reffered many links to change IP address using C/C++. But I found that its only changing the setting temporary (untill the next reboot) and Once the system is rebooted , the all settings are gone.
I referred below links to achieve it.
Qt: Setting the IP
Set IP address using SIOCSIFADDR ioctl
etc. but ended up with temporary settings (remains untill the next reboot)
Is there any way to change the settings permanently through C/C++ ?????
Please direct me to the right path.
At startup Linux uses some configuration file to assign IP-address to an interface. Each distribution has its own file dedicated for that purpose. You should consult your distribution Wiki on the topic of how to set an IP-address at startup.
In general it is an administrative task (i.e. should not be configured dynamically via some custom program), but if you really want to do it in your C/C++ program, then you should parse the network configuration file and place there the address you want to assign at startup.