Page 1 of 3 123 LastLast
Results 1 to 25 of 63

Thread:

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date: Aug:2006
    Location:
    Posts: 4,052

    char key=123; read char; (xor char with key) to output; bit-flip key; repeat
    cp-1251

  2. #2
    MFrost's Avatar
    Join Date: Aug:2005
    Location: /
    Posts: 203
    ... ?
    ... , - ...
    Attached Files

  3. #3
    Registered User
    Join Date: Aug:2006
    Location:
    Posts: 4,052
    .
    : , ( ) (hex) 9fd0 80d1 b5d0

  4. #4
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833
    bit-flip ? . -, '
    EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
    Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|

  5. #5
    Registered User
    Join Date: Aug:2006
    Location:
    Posts: 4,052
    . .

  6. #6
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833

    : ? ?
    EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
    Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|

  7. #7
    Registered User
    Join Date: Aug:2006
    Location:
    Posts: 4,052
    hexdump , kedit, cp1251

    void s(char *i,char *k){*i^=*k;*k=~(*k);} i/o 5
    Last edited by solar_sea; 6th September 2007 at 00:39.

  8. #8
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833
    ! ' !
    EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
    Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|

  9. #9
    Pesho's Avatar
    Join Date: Nov:2001
    Location: Sofia
    Posts: 5,169
    Code:
    #include <iostream>
    #include <fstream>
    using namespace std;
    
    
    int main()
    {
    	ifstream ifs("nachalo.enc");
    	unsigned char key = 123;
    	while (1) {
    		unsigned char c = ifs.get();
    		if (ifs.eof()) break;
    		cout.put(c ^ key);
    		key = ~key;
    	}	
    	return 0;
    }

    Quote Originally Posted by Bombera View Post
    ! ' !


    :
    Attached Files

  10. #10
    Get a Mac moridinbg's Avatar
    Join Date: Dec:2004
    Location: 0x00000000
    Posts: 4,211
    ? .
    :
    #include <stdio.h>

    int main()
    {
    FILE *encoded;

    int key = 123;
    encoded = fopen("/home/elmo/nachalo.enc","r");
    while(feof(encoded) == 0)
    {
    printf("%c", fgetc(encoded)^key);
    key = ~(key);
    }
    fclose(encoded);

    return 0;
    }
    managed . , property eof,

  11. #11
    Registered User
    Join Date: Aug:2006
    Location:
    Posts: 4,052
    feof 0_o, fseek (.. SEEK_END). ( )
    - , cp-1251,
    Dump , cp1251, "" , / . bg_BG CP1251 locales .
    Last edited by solar_sea; 6th September 2007 at 01:28.

  12. #12
    Get a Mac moridinbg's Avatar
    Join Date: Dec:2004
    Location: 0x00000000
    Posts: 4,211
    . . .
    . Game Over?

  13. #13
    rootless wolfshark's Avatar
    Join Date: Dec:2005
    Location:
    Posts: 5,768
    Crashing is NOT normal. It is accepted as normal because of Windows.
    Ah the Geforce 440 MX...all the power of the Geforce 2MX, without nearly a damn being changed...

  14. #14
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833
    #include <stdio.h>

    Code:
    int main(int argc, char* argv[]){
      FILE *encoded,*decoded;
      int key = 123;
      char cBuffer;
    	encoded = fopen("C:\\nachalo.enc","r");
    	decoded = fopen("C:\\decoded.txt","w+");
    	while(feof(encoded) == 0){
    		cBuffer = fgetc(encoded)^key;
    		fputc( cBuffer ,decoded);
    		key = ~(key);
    	}
    	fclose(decoded);
    	fclose(encoded);
    	return 0;
    }
    - . . ?
    ""

    - !
    EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
    Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|

  15. #15
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833
    . .
    EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
    Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|

  16. #16
    Pesho's Avatar
    Join Date: Nov:2001
    Location: Sofia
    Posts: 5,169
    Quote Originally Posted by Bombera View Post
    . .

    feof(). 1 . 'D'

    P.S. 'D'- newline

  17. #17
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833
    !


    :
    Code:
    int main(int argc, char* argv[]){
    	FILE *encoded,*decoded;
    	unsigned char key = 123;
    	char cBuffer;
    	encoded = fopen("C:\\nachalo.enc","r");
    	decoded = fopen("C:\\decoded.txt","w+");
    	while(1){
    		cBuffer = fgetc(encoded)^key;
    		if(feof(encoded))
    			break;
    		fputc( cBuffer ,decoded);
    		key = ~(key);
    	}
    	fclose(decoded);
    	fclose(encoded);
    	return 0;
    }
    :

    Code:
    int _tmain(int argc, TCHAR* argv[]){
      HANDLE hInputFile, hOutputFile;
      TCHAR cBuffer, key = 123;
      DWORD dwBytesWritten, dwBytesRead = sizeof(TCHAR);
    
    	if((hInputFile = CreateFile(__TEXT("C:\\nachalo.enc"), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL)) == INVALID_HANDLE_VALUE)
    		return -1;
    	if((hOutputFile = CreateFile(__TEXT("C:\\decoded.enc"), GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL)) == INVALID_HANDLE_VALUE){
    		CloseHandle(hInputFIile);
    	 	return -1;
    	}
    	while(dwBytesRead){ //  TRUE,      
    		if(!ReadFile(hInputFile,&cBuffer,sizeof(TCHAR),&dwBytesRead,NULL))
    			break;
    		if(dwBytesRead == 0)
    			if(GetLastError() != ERROR_HANDLE_EOF ){
    				CloseHandle(hOutputFile);
    				CloseHandle(hInputFile);
    				return -1;
    			}
    			else
    				break;
    
    		cBuffer^= key;
    		key = ~key;
    		if(!WriteFile(hOutputFile, &cBuffer, sizeof(TCHAR), &dwBytesWritten, NULL)){
    			CloseHandle(hOutputFile);
    			CloseHandle(hInputFile);
    			return -1;
    		}
    	}
    	SetEndOfFile(hOutputFile);
    	CloseHandle(hOutputFile);
    	CloseHandle(hInputFile);
    	return 0;
    }
    Last edited by Bombera; 6th September 2007 at 03:37.
    EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
    Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|

  18. #18
    Registered User
    Join Date: Aug:2006
    Location:
    Posts: 4,052
    , win32 ?
    Code:
    #include <stdio.h>
    #include <stdlib.h>
    
    void s(char *i,char *k){*i^=*k;*k=~(*k);}
    
    int main(int argc, char *argv[]){
            FILE *i; FILE *o;
            char temp,key;
            long l,in;
    
            key = atoi (argv[1]);
            i=fopen(argv[2],"rb");
            fseek(i, 0, SEEK_END);l=ftell(i);rewind(i);
            // ,   feof     ..
            o=fopen(argv[3],"wb+");
            for(in=0;in<l;in++){
                    fread(&temp,1,1,i);
                    s(&temp,&key);
                    fwrite(&temp,1,1,o);
            }
            fclose(i);
            fclose(o);
            return 0;
    }

  19. #19
    philosophus duratea icaci's Avatar
    Join Date: Oct:2006
    Location: Aachen
    Posts: 2,698
    , UTF-8, , CP1251
    Python:
    >>> print ''.join(map(lambda c,i: chr(ord(c) ^ (123, 132)[i % 2]), [c for c in open('nachalo.enc','r').read()], range(os.stat('nachalo.enc')[6]))).decode('UTF-8')
    ( UTF-8, .decode('UTF-8'))
    Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others

  20. #20
    Registered User
    Join Date: Aug:2006
    Location:
    Posts: 4,052
    . , , . ( ? ) ?

  21. #21
    .... thedivaka's Avatar
    Join Date: Mar:2006
    Location: 8.3
    Posts: 4,951



    , ?

    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	C.gif‎ 
Views:	181 
Size:	18.4 KB 
ID:	13769  
    Attached Files
    Last edited by thedivaka; 6th September 2007 at 20:53.

  22. #22
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833
    , ?
    EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
    Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|

  23. #23
    ɐ-əpoɔᴉu⋂ ɐ ə anrieff's Avatar
    Join Date: Apr:2004
    Location: Sofia
    Posts: 8,448
    , . .
    "640K ught to be enough for anybody" - Bill Gates, 1981
    ::Machine specs::Fract::AGG::::Baileys::blog::YouTube channel

  24. #24
    philosophus duratea icaci's Avatar
    Join Date: Oct:2006
    Location: Aachen
    Posts: 2,698
    Quote Originally Posted by anrieff View Post
    print ''.join([chr(int(c,2)) for c in """110000 1001101 1000111 100001 100001 100000 ... 101110 100000""".split()]
    -insulting , ?

    .. Python Challenge
    Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others

  25. #25
    Registered User
    Join Date: Aug:2006
    Location:
    Posts: 4,052
    anrieff- , , omg!!
    (- )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |