Carrotlolz Posted August 24, 2013 Share Posted August 24, 2013 Hello i wrote this script to easily use ncat but the 7zip extracting doesnt work please can someone help because it used to work. Im stumped and dont know what to do. expandcollapse popup#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #Region ### Start Variables Region ### #EndRegion ; Initialization InetGet("http://nmap.org/dist/ncat-portable-5.59BETA1.zip","c:\windows\temp\ncat.zip", 1, 0) InetGet("https://dl.dropboxusercontent.com/s/drog5kn8w74ukrp/7za.exe?token_hash=AAHMxn_smUBBQD5USYZo_b9o6pIP8dLAsg5yPFUUesAYVQ&dl=1","c:\windows\temp\7z.exe", 1, 0) ShellExecute ("c:\windows\temp\7z.exe", "e -y ncat.zip") ; End Initialization #Region ### START Koda GUI section ### $MainForm = GUICreate("Ncat All Purpose Program", 302, 119, 332, 205) $Tab1 = GUICtrlCreateTab(8, 0, 289, 113) GUICtrlSetResizing(-1, $GUI_DOCKAUTO+$GUI_DOCKLEFT+$GUI_DOCKRIGHT+$GUI_DOCKTOP+$GUI_DOCKBOTTOM+$GUI_DOCKHCENTER+$GUI_DOCKWIDTH+$GUI_DOCKHEIGHT) $Ncat_shell = GUICtrlCreateTabItem("Ncat Windows Cmd Shell") $NShellStart = GUICtrlCreateButton("Start", 16, 32, 131, 73) $NShellStop = GUICtrlCreateButton("Stop", 152, 32, 139, 73) GUICtrlSetState(-1,$GUI_SHOW) $TabSheet2 = GUICtrlCreateTabItem("Ncat Listening Shell") $NRShellStart = GUICtrlCreateButton("Start", 16, 32, 129, 65) $NRShellStop = GUICtrlCreateButton("Stop", 152, 32, 131, 65) GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch Select Case $nMsg = $NShellStart ShellExecute("c:\windows\temp\ncat.exe" , " -lvp 7777 -e cmd.exe", "c:\") Case $nMsg = $NShellStop ProcessClose( "ncat.exe") EndSelect WEnd Link to comment Share on other sites More sharing options...
JohnOne Posted August 24, 2013 Share Posted August 24, 2013 (edited) Have you upgraded OS? Possibly downloading and extracting to a windows folder may need #RequireAdmin. Edited August 24, 2013 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Carrotlolz Posted August 24, 2013 Author Share Posted August 24, 2013 (edited) no i dont think you need admin for the temp folder also if i do c:windowstemp7z.exe e -y ncat.zip it extracts just not in my script also i just made the script Edited August 24, 2013 by Carrotlolz Link to comment Share on other sites More sharing options...
Developers Jos Posted August 24, 2013 Developers Share Posted August 24, 2013 What OS are you running then? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Solution Carrotlolz Posted August 24, 2013 Author Solution Share Posted August 24, 2013 I figured it out i needed to specify working dir in shellexecute so its ShellExecute ("c:\windows\temp\7z.exe", "e -y ncat.zip", "c:\windows\temp") also im running win8 64bit and you dont need admin to download or execute programs in temp folder Link to comment Share on other sites More sharing options...
dragan Posted August 24, 2013 Share Posted August 24, 2013 I would suggest using macro-reference, because not all systems are installed in "C:Window", unless you tend to use this script only on your PC of which you know all required destinations ShellExecute (@WindowsDir & "\temp\7z.exe", "e -y ncat.zip", @WindowsDir & "\temp") Link to comment Share on other sites More sharing options...
Carrotlolz Posted August 24, 2013 Author Share Posted August 24, 2013 (edited) $tempDir = @WindowsDir & "\temp" ShellExecute ($tempDir & "\7z.exe", "e -y ncat.zip", $tempDir) thanks would that work Edited August 24, 2013 by Carrotlolz 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