slaughter Posted October 4, 2007 Share Posted October 4, 2007 Well i got disapointed..... 3 days I was trying to make my script..... I made one type... nor workig some strange errors.... second..errors... and so on... Finaly when i got fu*k*d up tears in eays... pain in head I thougt what a hell I will make it simple... I made simple scrpit and find out FileOpen($file, 1) $chars = FileRead($file) FileClose($file) FileDelete($file) $chars = StringReplace($chars, chr(0), "[chr0]") Send_to_TCP_server($chars) $chars = Rec_from_client() $chars = StringReplace($chars, "[chr0]", chr(0)) FileOpen($file, 1) $chars = FileWrite($file) FileClose($file) Shuld convert and reconvert withuot any problems? Is it ? HELL NO!!!!!!!!! Thats what I GET! Thats how it loks before replacing receved from client in server side ˙Ų˙ą[chr0]JFIF[chr0][chr0]`[chr0]`[chr0][chr0]˙Ū[chr0]C[chr0] (1#%(:3=<9387@H\N@DWE78PmQW_bghg>Mqypdx\egc˙Ū[chr0]C//c Just a part of JPG file. File size ~200kb After using replace. All 200kb file loks like 30 Bytes: ˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[˙Ų˙ą[ It is bug? O my easy is tired and i am total dummy......... In progress: Windows Server bruteforce GUARD Admin Tools (Remote client control) Bypasing firewall Old stuff: [font="Verdana;"]MD5 Auto Update Calendar XP SS multi usser server & client Autoit Remote Control (ARC)[/font] Link to comment Share on other sites More sharing options...
Richard Robertson Posted October 4, 2007 Share Posted October 4, 2007 I don't believe you really need to replace the characters. Just read it as a binary string, then send that binary string. Try it. Link to comment Share on other sites More sharing options...
slaughter Posted October 4, 2007 Author Share Posted October 4, 2007 I don't believe you really need to replace the characters. Just read it as a binary string, then send that binary string. Try it. You hve in mind FileOpen($file, 16) $chars = FileRead($file) FileClose($file) FileDelete($file) ;;;;;$chars = StringReplace($chars, chr(0), "[chr0]") Send_to_TCP_server($chars) $chars = Rec_from_client() ;;;;;;;;;;;;;;;;$chars = StringReplace($chars, "[chr0]", chr(0)) FileOpen($file, 1) $chars = FileWrite($file) FileClose($file) smth like this? Sory I have not much EXP in data transfer and how wuld be helpfull to post some info... for numb nut.... In progress: Windows Server bruteforce GUARD Admin Tools (Remote client control) Bypasing firewall Old stuff: [font="Verdana;"]MD5 Auto Update Calendar XP SS multi usser server & client Autoit Remote Control (ARC)[/font] Link to comment Share on other sites More sharing options...
slaughter Posted October 4, 2007 Author Share Posted October 4, 2007 Tested this NOT WORKING... :/ HELP HELP HELP!!! In progress: Windows Server bruteforce GUARD Admin Tools (Remote client control) Bypasing firewall Old stuff: [font="Verdana;"]MD5 Auto Update Calendar XP SS multi usser server & client Autoit Remote Control (ARC)[/font] Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 4, 2007 Moderators Share Posted October 4, 2007 FileOpen + Binary Mode String + BinaryToString + FileRead Replace (hex values for char whatever) StringToBinary + FileWrite FileClose Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
slaughter Posted October 4, 2007 Author Share Posted October 4, 2007 FileOpen + Binary Mode String + BinaryToString + FileRead Replace (hex values for char whatever) StringToBinary + FileWrite FileClose WOW Nice idea!!!!!!!! YOU ARE MY GOD! Kisses and hugs! WORKING!!! unc make_jpg_file($fn) $file = FileOpen($fn, 16) ; Check if file opened for writing OK $chars = String(BinaryToString(FileRead($file))) FileClose($file) FileDelete($file) $file = FileOpen($fn, 16) $String = "[chr0]" $Hex = _StringToHex($String) $Hexg = _StringToHex(chr(0)) $data= StringReplace(string(BinaryToString($chars)), $Hex, $Hexg) FileWrite($file, StringToBinary($data)) FileClose($file) EndFunc In progress: Windows Server bruteforce GUARD Admin Tools (Remote client control) Bypasing firewall Old stuff: [font="Verdana;"]MD5 Auto Update Calendar XP SS multi usser server & client Autoit Remote Control (ARC)[/font] Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 4, 2007 Moderators Share Posted October 4, 2007 WOW Nice idea!!!!!!!! YOU ARE MY GOD! Kisses and hugs! WORKING!!! unc make_jpg_file($fn) $file = FileOpen($fn, 16) ; Check if file opened for writing OK $chars = String(BinaryToString(FileRead($file))) FileClose($file) FileDelete($file) $file = FileOpen($fn, 16) $String = "[chr0]" $Hex = _StringToHex($String) $Hexg = _StringToHex(chr(0)) $data= StringReplace(string(BinaryToString($chars)), $Hex, $Hexg) FileWrite($file, StringToBinary($data)) FileClose($file) EndFuncDon't know about "God" ... I just know I've messed with it enough lately to know what issues you are having. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Valuater Posted October 4, 2007 Share Posted October 4, 2007 Don't know about "God" ... I just know I've messed with it enough lately to know what issues you are having. YOU ARE MY GOD! Kisses and hugs!.... by "slaughter" no less.... 8) Link to comment Share on other sites More sharing options...
BrettF Posted October 4, 2007 Share Posted October 4, 2007 YOU ARE MY GOD! Kisses and hugs!.... by "slaughter" no less.... 8)Correction... Smoke is god. Well one of them.... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
weaponx Posted October 4, 2007 Share Posted October 4, 2007 This guy is praising you for pseudcode Smoke! I wish bitches in HR would pray to me when I write 1000+ php lines of code. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 4, 2007 Moderators Share Posted October 4, 2007 This guy is praising you for pseudcode Smoke! I wish bitches in HR would pray to me when I write 1000+ php lines of code.I hear that... people in my office don't even have a clue how much work goes into something, they look at it as just another app... Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
slaughter Posted October 5, 2007 Author Share Posted October 5, 2007 I hear that... people in my office don't even have a clue how much work goes into something, they look at it as just another app... Long time i worked IT Engenir in one company.....Office pepole look to web and down evern thnk that to show his own vage on screan takes programer to write helll long script....:/ In progress: Windows Server bruteforce GUARD Admin Tools (Remote client control) Bypasing firewall Old stuff: [font="Verdana;"]MD5 Auto Update Calendar XP SS multi usser server & client Autoit Remote Control (ARC)[/font] Link to comment Share on other sites More sharing options...
joos Posted October 5, 2007 Share Posted October 5, 2007 (edited) I shout for help now, I am trying to search in a text file for a setting. I am not sure of the best way to search through the file looking for something. I would be looking for this. Give_Something = * and I want to read this then replace it with Give_Something = '"ABC C:\prg\thing" %f %p-' I just get errors Any help would be good. Thanks Joe Edited October 5, 2007 by joos Link to comment Share on other sites More sharing options...
joos Posted October 5, 2007 Share Posted October 5, 2007 I shout for help now, I am trying to search in a text file for a setting. I am not sure of the best way to search through the file looking for something. I would be looking for this.Give_Something = *and I want to read this then replace it with Give_Something = '"ABC C:\prg\thing" %f %p-' I just get errorsAny help would be good.ThanksJoe Found it now! Teachers Note*Must look harder* For anyomnne else looking I am using StringReplace Link to comment Share on other sites More sharing options...
slaughter Posted October 5, 2007 Author Share Posted October 5, 2007 I shout for help now, I am trying to search in a text file for a setting. I am not sure of the best way to search through the file looking for something. I would be looking for this. Give_Something = * and I want to read this then replace it with Give_Something = '"ABC C:\prg\thing" %f %p-' I just get errors Any help would be good. Thanks Joe StringReplace have bug. If you uses it with not normal charekters [0-9, a-z,A-Z, anyting on keybord] will work well but if using like reading from file? Here bugs strats!!!! if yu dint get any result from sringreplace() with normal varibles try convert everyting to binary! look at my script http://www.autoitscript.com/forum/index.php?showtopic=54601 there i solved out all problems with string replace,slpit write In progress: Windows Server bruteforce GUARD Admin Tools (Remote client control) Bypasing firewall Old stuff: [font="Verdana;"]MD5 Auto Update Calendar XP SS multi usser server & client Autoit Remote Control (ARC)[/font] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now