Perl Net::Telnet sending CTRL+C - perl

I am using Net::Telnet in my perl script to login to Network device (Huawei Media gateway).
After running command I need to send "CTRL+C" character because few commands output are longer than the current screen size and for more output to be printed it is required to hit
CTRL+C from key board.
I tried searching net but no luck. Anybody has idea how to send this charater once it run a command.
Thanks in advance.
Regards
Mahesh

Have you tried just sending character with ascii code 3?
$t->print("\x03");

I know this is an old post, but since I haven't seen anyone verify that any suggestion works, I figured I would reply.
This worked for me...
print $telnet->cmd("\x03");

Thnx.
print $telnet->cmd("\x03");
worked for me as well.

Related

Appium desktop keep on asking for “platformName” capability even if it is added

I am using Appium Desktop app. After adding all the capabilities. When I Start session, I got an error "An unknown server-side error occurred while processing the command. Original error: You must include a platformName capability"
Screenshot
Like Pankaj Mishra say, it is really.
The APPIUM Desktop UI have some bugs and the only way to solve this problem it's typing the capibilities directly in the fields and never copy paste or edit like a JSON format.
Screenshot of the correct way to do the configuration
APPIUM Desktop UI have some bugs as a result you get this error even if the capabilties are present.
You can refer Here to avoid above issue.
Based on your screenshot, you made a spelling mistake:
flatformName: android
flatformVersion: 8.1
You need to fix f to p and it will work perfectly for you!
Make sure you enter "platformName". Not "platformName ". Can you see the difference? Second one has a hidden space which could often happen when you copy-past the capability name.
make you've write correct words "platformName:" and check your json representation.

MongoDB script doesn't seem to execute properly but no error code or exit code

I am a beginner and will try to explain my question as thoroughly as possible, but thank you in advance for your patience.
I am trying to run a script in MongoDB. The script is using Google Geocoding to update Twitter records. When I run the script, I get a message saying (in short) the code will exit when I have reached my daily limit of 2500 records.
My question is: how do I know when the code has exited and, also, if the script executed successfully?
Nothing seems to be happening but I am not getting an error of any kind. Additionally, when I check the log file, it appears to be blank. I have tried to search this several different ways but I'm not sure I'm using the proper lexicon as I am new to this. Any help would be greatly appreciated.

GSM Modem Minicom Press OK

I am using a minicom to send load from one phone to another. I use the AT+STKTR commands to move on from one task to the next. However, I got stuck when I got a response of "D6!, +Load 09********* to 09********* (Press OK)". What is the command for pressing OK? What is the best solution for this. Thanks for the help. Any help will be appreciated!

Problems with Forms2Go script

I am currently trying to make a form for a website in work. I have created the script in Perl using Forms2Go and have entered the send mail and bin paths given to me. At the first the script wouldn't execute but the hosts made changes to the sever and now it does.
Problem now is the script executes and takes the user to the thank you page but doesn't send the form to the e-mail address which has been tested by the hosting company.
I have a feeling that the send-mail path isn't correct and that is why it is executing but not sending the email, anything else it might be?
Thanks for reading.
Tom
Forms To Go is payware and they do not provide their source code publicly which makes trouble-shooting by the general Internet populace rather difficult. Try their support forum instead. If you're looking for a form mailer that does not suck, install nms TFMail.

How can I download Yahoo Groups?

I want to download some Yahoo Groups (files, photos, messages, memberlist) and I've found these scripts:
http://freshmeat.net/projects/grabyahoogroup/
http://sourceforge.net/project/showfiles.php?group_id=62034
I've downloaded ActivePerl and the needed modules from CPAN (nothing fancy; they're very easy to find). I've managed to install them, but when I run the script I get an error after it tells me that I've successfully logged in:
"Use of uninitialized value $cells in pattern match (m//) at yahoogroups_files.pl line 244, line 2."
I'm guessing that Yahoo changed the layout of the page or something, but I'm not able to update the script myself. I'm a newbie when it comes to Perl and understanding the way Yahoo generates the pages, I only know some basic C++. I want to mention that I'm not lazy, I'll try do fix it myself but I need your help: hints, advice, anything.
PS: I've contacted the author, but he isn't willing to update the scripts.
You would need knowledge in the following fields:
use of an html parser
http knowledge ( get/post/head )
web scraping
I suggest you focus on WWW::Mechanize since it's capable of all these things ( and more )
EDIT: another solution ( that doesn't need programming ) , is this: login with your browser on yahoo groups, store the cookie, and then run wget , passing the stored cookie as a parameter. This way you'll get the task accomplished very fast.
Find your browser's cookies.txt file on your harddrive, and then call wget like this ( if I remember the commands correctly ) :
wget --load-cookies path_to_cookie_file -r -w 60 website
The full man page can be found here
EDIT2: Another option is to use WebDriver to automate firefox. You can use this article as a guide on how to accomplish this.
By the filename I'm assuming you're using Yahoo Group archiver found here: http://sourceforge.net/projects/grabyahoogroup/
I ran the files script against the SubEthaEdit group and it works great. All of the files downloaded without incident.
Looking at the code it seems to barf while processing an html table in a while loop if $cells is empty.
Considering the code did work when I tested it it's possible there's something going on with the listing of that group's files. You'll want to try outputting $content and figure out where and why the regular expression on 243 isn't able to process that html.
EDIT: If you don't mind posting the group this is happening with I'm sure myself or someone else here can try it out and troubleshoot on their own. It's tough to pinpoint what's up when the issue can't be duplicated. Also, try the same group I did and see if it works out for you. Certainly something up with the group you're trying if that works.
Dunno if it will help you, but here's what I did to get the message-download working:
http://sourceforge.net/forum/forum.php?thread_id=3283915&forum_id=209170
(I only used message-download, I didn't look at file-download)
Was tinkering on this a while ago to backup my girlfriend's group messages and files from uni. Upon debugging on the latest scripts I've found out that there seems to be a bug on group_domain declaration (theres also a group declaration bug that i've found on yahoo2maildir.pl of the same project, see $request)
($group_domain) = $url =~ /\/\/(.*?groups.yahoo.com)\//;
in this case, i've overwritten the $request var under the function sub download_folder() with
from <br>
$request = GET "http://$group_domain/group/$group/files$sub_folder/";
<br> to <br>
$request = GET "http://**groups.yahoo.com/group/$user_group**/files$sub_folder/";
grabyahoogroup works well in the latest edition, which can be found at the svn repo:
http://grabyahoogroup.svn.sourceforge.net/viewvc/grabyahoogroup/trunk/yahoo_group/
The version at sourceforge.net/projects/grabyahoogroup/files/ HAS BUGS AND DID NOT WORK FOR ME.
I've been looking for a tool that collects messages/conversations from Yahoo Groups!. I finally found this tool that converts your Yahoo! Groups messages into MBOX format after struggling to try to make my own and searching everywhere on the internet.
Download tools
Both of the following are Google Chrome extensions.
Chrome Extension to Download Members posted by Sam Hobbs (2015).
Chrome Application To Download Messages posted by Mark Fletcher (Jan 2016).
Plain string to Base64 binary data
At some time past September 16, 2010 (at least for me), the messages retrieved are no longer plain text and instead Base 64 binary data (ASCII). Using this swiss converter tool can allow you to read the data as it is.
Sample content from the MBOX format
VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZy4=
Sample result after conversion
The quick brown fox jumps over the lazy dog.
for cause, as of 2019/09
https://github.com/csaftoiu/yahoo-groups-backup
.....