HardSPL CDMA Whitelist Code - Touch Pro2 CDMA

Guys,
A buddy of mine modified Fenny's code from IMEI Whitelist GSM Hardspl to work with CDMA. I just need someone to compile code and test.
Code:
Random random = new Random();
string imei = textBox1.Text;
string mid = (random.Next().ToString("X8") + random.Next().ToString("X8")).ToLower();
string hid = random.Next().ToString("X8").ToLower();
System.Text.UTF8Encoding encoding = new System.Text.UTF8Encoding();
System.Security.Cryptography.SHA256 hasher = System.Security.Cryptography.SHA256.Create();
string hex = BitConverter.ToString(hasher.ComputeHash(encoding.GetBytes(((mid + hid + imei + "6BRSDB*(LNsa;JN5)"))))).Replace("-", "").ToLower(); ;
string request = ("mid=" + mid + "&hid=" + hid + "&imei=" + imei + "&auth=" + hex + "&v=" + 110);
System.Net.ServicePointManager.Expect100Continue = false;
System.Net.HttpWebRequest webRequest = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create("http://www.htc-unlocks.com/rhodiumw.php");
webRequest.Headers.Clear();
webRequest.KeepAlive = true;
webRequest.Method = "POST";
webRequest.ContentType = "application/x-www-form-urlencoded";
webRequest.UserAgent = "WinHTTP Example/1.0";
System.IO.Stream webResponse = webRequest.GetRequestStream();
System.IO.StreamWriter webResponseSender = new System.IO.StreamWriter(webResponse);
webResponseSender.Write(request);
webResponseSender.Close();
System.Net.HttpWebResponse didI = (System.Net.HttpWebResponse)webRequest.GetResponse();
System.IO.BinaryReader binaryReader = new System.IO.BinaryReader(didI.GetResponseStream());
byte[] buffered = binaryReader.ReadBytes(512);
if (encoding.GetString(buffered) == "reject")
label2.Text = "Failed";
else
{
System.IO.File.WriteAllBytes(imei+".txt", buffered);
label2.Text = "Success";
}

OK, I have the code compiled.
run the exe file.
enter your IMEI number (do not include last 01)
you shoud get success and it will create a <IMEI_NUMBER>.txt file
rename <IMEI_NUMBER>.txt to chk.txt and copy to windows folders on your phone
now run hardSPL and enjoy.
note if you get a failed message you either enter the last 01, or enter incorrect IMEI or your phone is already blacklisted and it's to late.
My phone is blacklisted so I can not fully test. please post results.
I also want to thank Fenny for his hard work with his GSM version of the whitelister.
With out his code my buddy would have never been able to rewrite to work for CDMA TP2

hopefully you don't mind, i posted this @ geeks....test should come back soon, i linked this thread .

mr8820 said:
hopefully you don't mind, i posted this @ geeks....test should come back soon, i linked this thread .
Click to expand...
Click to collapse
no not at all post in all related sites are fine.

Related

Need help with Visual C#

Hello!
I have an old barcode reader with Windows CE.
I'm trying to make a simple application, that saves the scanned barcode into a file.
The next is working code, that show the scanned barcode and exits. I want the value scanned ( lpScanBuf ) to be saved into a textfile. Not to overwrite the existing file, but add to existing values (append) inside the file:
#include <windows.h>
#include <ScanCAPI.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpszCmdLine, int nCmdShow)
{
HANDLE hScanner = NULL;
LPSCAN_BUFFER lpScanBuf = NULL;
DWORD dwScanSize = 7095;
SCAN_Open(TEXT("SCN1:"), &hScanner);
SCAN_Enable(hScanner);
lpScanBuf = SCAN_AllocateBuffer(TRUE, dwScanSize);
SCAN_ReadLabelWait(hScanner, lpScanBuf, 0);
MessageBox(NULL,(LPTSTR)SCNBUF_GETDATA(lpScanBuf),TEXT("HelloScan"),MB_OK);
<< HERE SHOULD BE SOMETHING, THAT SAVES THE VALUE lpScanBuf INTO A TEXTFILE >>
SCAN_Disable(hScanner);
SCAN_DeallocateBuffer(lpScanBuf);
SCAN_Close(hScanner);
return 0;
}
Click to expand...
Click to collapse
I have tried in several ways, but always get an error:
using System;
using System.IO;
File.WriteAllText(@"test.txt", lpScanBuf);
or
System.IO.File.AppendAllText(@"test.txt", lpScanBuf);
Click to expand...
Click to collapse
-----------------------------------------
Found some ideas... but i don't know how to apply these..
lstrcpy (qty,buffer);
memset(buffer,0,sizeof(buffer));
swprintf(buffer,TEXT("%s,%s\n"),barcode);
fr=fopen("barcode.txt","a+"));
fwrite(fr, s_str);
fwrite(buffer,sizeof(TCHAR),lstrlen(buffer),fr);
fclose(fr);
Click to expand...
Click to collapse
And another idea...
string filename = "myFile.txt";
using (StreamWriter writer = new StreamWriter(filename, true))
{
writer.Write(lpScanBuf + " ");
}
Click to expand...
Click to collapse

[DEV] Framebuffer console

Make a backup first.
So i have managed to get framebuffer console output , but its stil not working.
So any help is wellcome.
The error i get is more the same as This.
You can try this kernel ( fastboot flash zimage zImage ) <- Dont flash if you dont know what your doing .
more info about whats going on is here.
Vids
With framebuffer active , but display is scrambled!.
With framebuffer console and display fixed.
For thoose that dont know what this is , its simpel.
For GNU/Linux we need this to work.
Some Info:
You could use any kernel that works with DHD , mine is Leedroid's Ace Kernel
.Config File
Mod file /drivers/video/msm/msm_fb.c to look (ADD) like this ( add x = 0; y = 0; w = msmfb->xres; h = msmfb->yres; )
x = msmfb->update_info.left;
y = msmfb->update_info.top;
w = msmfb->update_info.eright - x;
h = msmfb->update_info.ebottom - y;
x = 0; y = 0; w = msmfb->xres; h = msmfb->yres; <-----------Do not add this airow
Thats it. Start modding
change log space
0.1 - Enabled frambuffer -> makes screen scrambled
0.2 - Fixed lcd but got atomic panic.
0.3 - fixed Frambuffer console and lcd trying to boot ubuntu but sdcard is mounted after command line partition list is mmcblk0** needs to be mmcblk1p2
Did we realy need console output to the framebuffer to boot ubuntu nativ, or would it only be a importend debug feature during porting?
Following video shows meego booting on an desire, but the have no console output during the boot. Maybe the have the same bug when the use tty on the framebuffer!?
http://www.youtube.com/watch?v=GtnfHNjcdzg
Not needed !!!! -->
Most for debugging , and evry thing i try i cant get ubuntu to boot.
Also did find sometging about cmdline hack as command line seems to be skipt --> look at setup.c the modded command line.
This could be an alternative:
http://sven.killig.de/android/N1/serial/
Try following zImage.
Jhinta said:
Make a backup first.
So i have managed to get framebuffer console output , but its stil not working.
So any help is wellcome.
The error i get is more the same as This.
You can try this kernel ( fastboot flash zimage zImage ) <- Dont flash if you dont know what your doing .
more info about whats going on is here.
Vids
With framebuffer active , but display is scrambled!.
With framebuffer console and display fixed.
For thoose that dont know what this is , its simpel.
For GNU/Linux we need this to work.
Some Info:
You could use any kernel that works with DHD , mine is Leedroid's Ace Kernel
.Config File
Mod file /drivers/video/msm/msm_fb.c to look (ADD) like this ( add x = 0; y = 0; w = msmfb->xres; h = msmfb->yres; )
x = msmfb->update_info.left;
y = msmfb->update_info.top;
w = msmfb->update_info.eright - x;
h = msmfb->update_info.ebottom - y;
x = 0; y = 0; w = msmfb->xres; h = msmfb->yres; <-----------Do not add this airow
Thats it. Start modding
Click to expand...
Click to collapse
Hi can you help out on enabling Mediatek framebuffer, Alcatel OT918D ?
On compiling I get this error
http://pastebin.com/N6Ct51ub
I think the problem is the files are not in the linux/kernel/drivers/video directory
here is the makefile in linux/kernel/drivers/video
http://pastebin.com/3kfRnrKA
while in the mediatek/drivers directory we have :
http://pastebin.com/mDSTthG0
I need framebuffer console for debugging, please help out if you can.

[Q] Load SQLite DB

I have SQLite DB file. I copy him to StorageFile and open it by SQLite
Code:
...............................
using SQLiteClient;
using Community.CsharpSqlite;
namespace PhoneApp1
{
public partial class MainPage : PhoneApplicationPage
{
// Конструктор
private string fileName = "DB";
public MainPage()
{
InitializeComponent();
IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication();
System.IO.Stream src = Application.GetResourceStream(new Uri(fileName, UriKind.Relative)).Stream;
IsolatedStorageFileStream dest = new IsolatedStorageFileStream(fileName, System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.Write, store);
src.Position = 0;
CopyStream(src, dest);
dest.Flush();
dest.Close();
src.Close();
dest.Dispose();
IsolatedStorageFile tmp= IsolatedStorageFile.GetUserStoreForApplication();
if (!tmp.FileExists(fileName))
{
return;
}
SQLiteConnection db = new SQLiteConnection(fileName);
try
{
db.Open();
SQLiteCommand cmd = db.CreateCommand("SELECT * FROM table");
var lst = cmd.ExecuteQuery<Test>();
ApplicationTitle.Text = "Selected " + lst.ToList().Count + " items\r\nTime ";
}
catch (SQLiteException ex)
{
ApplicationTitle.Text = "Error: " + ex.Message;
}
}
private static void CopyStream(System.IO.Stream input, IsolatedStorageFileStream output)
{
byte[] buffer = new byte[32768];
long TempPos = input.Position;
int readCount;
do
{
readCount = input.Read(buffer, 0, buffer.Length);
if (readCount > 0)
{
output.Write(buffer, 0, readCount);
}
} while (readCount > 0);
input.Position = TempPos;
}
}
public class Test
{
public Test()
{
}
int _id;
public int id
{
get { return _id; }
set { _id = value; }
}
}
}
Result : ApplicationTitle = unable to opendatabase file.
Why? Plz help.
Probably because you doing something wrong, for example, opening SQLiteConnection
Seems like correct syntax should be
Code:
new SqliteConnection("Version=3,uri=file:db")
Download and try source code from http://wp7sqlite.codeplex.com/SourceControl/list/changesets#
error "Couldn't open database file version=3,urlB"
file DB i created from command "backup DB File". It's right?
I have no idea what kind of file do you have. I just downloaded and ran example from sources mentioned above and it works fine (but with few assertions). BTW you should have a complete source code of SQLite, just debug into SQLite procedures and check what's wrong.
Example work fine. I want read database from project file (Content).He isn't located in StorageFile. I use him after i'm saving myfile to StorageFile .
evgen_wp said:
Example work fine. I want read database from project file (Content).He isn't located in StorageFile. I use him after i'm saving myfile to StorageFile .
Click to expand...
Click to collapse
I already understood you. Add your code (to save database file from resource stream to isf) to example, and test conn.Open() call using F11 (Step Into). You'll see what's wrong. I don't have your database file and have no idea what did you put inside
File did not have time to create. It is ... work now.he can open empty file but can't open file with data
P.S. I use Sqlite Client for Windows Phone from http://sqlitewindowsphone.codeplex.com/
Why don't you use another codeplex project I've posted above? It works fine for me (tested because of your question).
P.S. Don't forget to push "Thanks" button. It's not a paid Microsoft customer service and I'm not your support guy.

[Completed] [Q] No response on trying to post data to webservice

This is a development project I would have submitted under the DevDB forum but it says-
You do not have permission to edit a project. If reaching this message in error, please notify an administrator.
Click to expand...
Click to collapse
On to my trouble -
I am trying to post some data to my webservice but when I am testing it out in my device I am not getting error but at the same time nothing really happens, the tablet is responding just fine everything works but my webservice is not getting any data nor does the application show any error.
I have added some Toast messages to check the flow of logic and from what I can determine the app goes into the method to send data to the webservice and then just does nothing.
This is my code
Code:
//Method to post data to webservice
public void post() throws UnsupportedEncodingException
{
try {
Toast.makeText(getBaseContext(), "Creating new user", Toast.LENGTH_SHORT).show();
HttpURLConnection urlConnection = (HttpURLConnection) (new URL("some url that the forum wont let me post").openConnection());
urlConnection.setConnectTimeout(1500);
urlConnection.setRequestMethod("POST");
urlConnection.setDoInput(true);
urlConnection.setDoOutput(true);
List<NameValuePair> params = new ArrayList<NameValuePair>();
params.add(new BasicNameValuePair("uname", uname));
params.add(new BasicNameValuePair("pass", password));
params.add(new BasicNameValuePair("email", email));
OutputStream os = urlConnection.getOutputStream();
BufferedWriter writer = new BufferedWriter(
new OutputStreamWriter(os, "UTF-8"));
writer.write(getQuery(params));
writer.flush();
writer.close();
os.close();
urlConnection.connect();
if(urlConnection.getResponseCode() == 200){
InputStream inputStream = new BufferedInputStream(urlConnection.getInputStream());
BufferedReader streamReader = new BufferedReader(new InputStreamReader(inputStream, "UTF-8"));
StringBuilder responseStrBuilder = new StringBuilder();
String inputStr;
while ((inputStr = streamReader.readLine()) != null)
responseStrBuilder.append(inputStr);
JSONObject json = new JSONObject(responseStrBuilder.toString());
String message = json.getString("message");
boolean error = json.getBoolean("error");
error(error, message);
}
} catch (Exception e) {
e.printStackTrace();
}
}
On execution I have found out that the flow dies at
Code:
OutputStream os = urlConnection.getOutputStream()
;
I get no error, no connection is ever established with my webserver.
Why is this happening?
techbr124 said:
This is a development project I would have submitted under the DevDB forum but it says-
On to my trouble -
I am trying to post some data to my webservice but when I am testing it out in my device I am not getting error but at the same time nothing really happens, the tablet is responding just fine everything works but my webservice is not getting any data nor does the application show any error.
I have added some Toast messages to check the flow of logic and from what I can determine the app goes into the method to send data to the webservice and then just does nothing.
This is my code
Code:
//Method to post data to webservice
public void post() throws UnsupportedEncodingException
{
try {
Toast.makeText(getBaseContext(), "Creating new user", Toast.LENGTH_SHORT).show();
HttpURLConnection urlConnection = (HttpURLConnection) (new URL("some url that the forum wont let me post").openConnection());
urlConnection.setConnectTimeout(1500);
urlConnection.setRequestMethod("POST");
urlConnection.setDoInput(true);
urlConnection.setDoOutput(true);
List<NameValuePair> params = new ArrayList<NameValuePair>();
params.add(new BasicNameValuePair("uname", uname));
params.add(new BasicNameValuePair("pass", password));
params.add(new BasicNameValuePair("email", email));
OutputStream os = urlConnection.getOutputStream();
BufferedWriter writer = new BufferedWriter(
new OutputStreamWriter(os, "UTF-8"));
writer.write(getQuery(params));
writer.flush();
writer.close();
os.close();
urlConnection.connect();
if(urlConnection.getResponseCode() == 200){
InputStream inputStream = new BufferedInputStream(urlConnection.getInputStream());
BufferedReader streamReader = new BufferedReader(new InputStreamReader(inputStream, "UTF-8"));
StringBuilder responseStrBuilder = new StringBuilder();
String inputStr;
while ((inputStr = streamReader.readLine()) != null)
responseStrBuilder.append(inputStr);
JSONObject json = new JSONObject(responseStrBuilder.toString());
String message = json.getString("message");
boolean error = json.getBoolean("error");
error(error, message);
}
} catch (Exception e) {
e.printStackTrace();
}
}
On execution I have found out that the flow dies at
Code:
OutputStream os = urlConnection.getOutputStream()
;
I get no error, no connection is ever established with my webserver.
Why is this happening?
Click to expand...
Click to collapse
I'm not an expert for this kind of stuff.
Have a look here: How to call webservice function?.
Maybe this can help.
If not, please ask your question App Development Forums > Coding Discussion, Q&A, and Educational Resources > Java for Android App Development forum.
There you will get quicker and better help.
Thread closed and thank you.

[APP]APK Exporter app

Hello there,
This is my first post here.
I made an application (not a unique one) that helps users to get APk of installed apps and share them also.
As I can't share the link because I'm a fresh new user, this is the id of the app on google play com.game.ammar.apkexporter
And here the piece of code I use to get the APK.
Code:
PackageManager packageManager = getActivity().getPackageManager();
int flags = PackageManager.GET_META_DATA|PackageManager.GET_SHARED_LIBRARY_FILES;
ApplicationInfo applicationInfoo = packageManager.getApplicationInfo(data.getPack(), flags);
File folder = new File(Environment.getExternalStorageDirectory().getPath() +"/APKExporter");
if(!folder.exists())folder.mkdir();
folder = new File(folder.getPath() + "/apk");
if(!folder.exists()) folder.mkdir();
apkFile = new File(folder.getPath() + "/" + applicationInfoo.packageName + ".apk");
copy(new File(applicationInfoo.sourceDir), apkFile);
I want to get a feedback for the app and share my work with all of you.

Categories

Resources