Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
problem with fopen and input Details »»
problem with fopen and input
Version: , by bandersen bandersen is offline
Developer Last Online: Jul 2007 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 02-01-2003 Last Update: Never Installs: 0
 
No support by the author.

Hi - I am trying to get the Tombot AI hack to work but have trouble with the bot reply. I appreciate any help.

This is the section in tomstalkerbot.php that gives the reply:

$rss = preg_replace("#^(.*)\[/quote\]#ies","",$message);
$ff = fopen($ttb_alicelocation . "?input=" . urlencode($rss),"r");
$response = fread($ff,10000);
fclose($ff);

Edit: using the above I only got the smileys in the reply.
I changed it to the following:

$rss = preg_replace("#^(.*)\[/quote\]#ies","",$message);
shell_exec("fetch -o /forums/upload/alice \"$ttb_alicelocation?input=".urlencode($rss)."\"") ;
$ff = fopen("/forums/upload/alice","r");
$response = fread($ff,10000);
fclose($ff);

This is how the reply comes up (se attachment for picture):

Ž³ .Šµ .. ³aimlN=푳 sql’³ src“³
COPYING³,#talk.php?input=are+you+there+now%3F³ ,!talk.php?input=testing+thi s+thing#ÀA¶X2talk.php? input=Testing+after+incl+Mike%27s+changesÇ

(ps:he repeats/ answers the third question with all 3 separate questions/posts)

I use 2.2.9
Php 4.2.3
I am on a shared server, but php.ini does not have safe mode enabled. I have tried to change the $ttb_alicelocation (/forums/upload/alice) to the full path (/user222/username/public_html/forums/upload/alice) with no changes in the reply.

I appreciate any help!

Download Now

File Type: (21.4 KB, 7 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 02-03-2003, 04:13 PM
bandersen's Avatar
bandersen bandersen is offline
 
Join Date: Feb 2002
Location: Oslo
Posts: 211
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK - my server said it disabled "remote" fopen, but that fopen will work for all local files.

Can someone help with the following:
How do I rephrase the following so that it will work /reads as local:

$ff = fopen($ttb_alicelocation . "?input=" . urlencode($rss),"r");

where

$ttb_alicelocation =
"http://www.mydomain.com/forums/upload/alice/src/talk.php";

Could I use something like:

$ttb_alicelocation = "/forums/upload/alice/src/talk.php"; ....ps...that is not working, maybe I'm writing it wrong?

or should I change the $ff = fopen....... to something?
Reply With Quote
  #3  
Old 04-02-2003, 04:22 PM
cirisme cirisme is offline
 
Join Date: Jan 2003
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What I did was change that code to

Code:
include "E:\\network\\Apache2\\htdocs\\forum\\alice\\src\\respond.php";

# Here is where we get the reply.
$botresponse=reply($rss,"5");

$response = $botresponse->response;
I also went into the TomBot files and modified the gettemplate() function to be gettemplate2() so it wouldn't conflict with vBulletin. The only problem with doing it this way is that I get warnings that some regular expressions are empty, but it works fine nonetheless.

(note: this code is the same as what is in the file that it is trying to fopen)
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:30 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06626 seconds
  • Memory Usage 2,229KB
  • Queries Executed 17 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (2)postbit
  • (1)postbit_attachment
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete